mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.jsowell.quartz.task;
|
||||
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
@@ -12,6 +14,7 @@ import com.jsowell.pile.service.IPileBillingTemplateService;
|
||||
import com.jsowell.pile.service.IPileStationInfoService;
|
||||
import com.jsowell.pile.service.YKCPushCommandService;
|
||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||
import com.jsowell.thirdparty.amap.service.AMapService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -23,6 +26,7 @@ import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Component("jsowellTask")
|
||||
public class JsowellTask {
|
||||
@@ -41,6 +45,12 @@ public class JsowellTask {
|
||||
@Autowired
|
||||
private IPileStationInfoService pileStationInfoService;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private AMapService aMapService;
|
||||
|
||||
/**
|
||||
* 关闭15分钟未支付的订单
|
||||
* close15MinutesOfUnpaidOrders
|
||||
@@ -126,4 +136,22 @@ public class JsowellTask {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 站点的枪口数据推送到高德
|
||||
*/
|
||||
public void pushToAMap() {
|
||||
Set<String> stationIds = redisCache.getCacheSet(CacheConstants.PUSH_STATION_CONNECTOR);
|
||||
if (CollectionUtils.isEmpty(stationIds)) {
|
||||
return;
|
||||
}
|
||||
log.info("推送到高德的stationId:{}", stationIds);
|
||||
// for (String stationId : stationIds) {
|
||||
// try {
|
||||
// aMapService.pushChargingDeviceDynamics(stationId);
|
||||
// } catch (Exception e) {
|
||||
// log.error("推送到高德error", e);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user