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,9 +1,12 @@
|
||||
package com.jsowell.quartz.task;
|
||||
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.PileStationInfo;
|
||||
import com.jsowell.pile.domain.ykcCommond.PublishPileBillingTemplateCommand;
|
||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.service.IPileStationInfoService;
|
||||
import com.jsowell.pile.service.YKCPushCommandService;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
@@ -34,6 +37,9 @@ public class JsowellTask {
|
||||
@Autowired
|
||||
private YKCPushCommandService ykcPushCommandService;
|
||||
|
||||
@Autowired
|
||||
private IPileStationInfoService pileStationInfoService;
|
||||
|
||||
/**
|
||||
* 关闭15分钟未支付的订单
|
||||
* close15MinutesOfUnpaidOrders
|
||||
@@ -67,8 +73,6 @@ public class JsowellTask {
|
||||
log.info("待启动充电订单:{}", list);
|
||||
for (OrderBasicInfo orderInfo : list) {
|
||||
// 下发充电桩设置指令
|
||||
|
||||
|
||||
String pileSn = orderInfo.getPileSn();
|
||||
// 发送启动充电指令前,再次下发计费模板
|
||||
BillingTemplateVO billingTemplateVO = pileBillingTemplateService.selectBillingTemplateDetailByPileSn(pileSn);
|
||||
@@ -98,4 +102,26 @@ public class JsowellTask {
|
||||
ykcPushCommandService.pushStartChargingCommand(startChargingCommand);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算站点订单报表
|
||||
* jsowellTask.calculateTheSiteOrdersReport()
|
||||
*/
|
||||
public void calculateTheSiteOrdersReport() {
|
||||
// 查询出所有站点
|
||||
PileStationInfo pileStationInfo = new PileStationInfo();
|
||||
pileStationInfo.setDelFlag(Constants.ZERO);
|
||||
List<PileStationInfo> list = pileStationInfoService.selectPileStationInfoList(pileStationInfo);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
// 计算每个站点前一天的报表
|
||||
for (PileStationInfo stationInfo : list) {
|
||||
try {
|
||||
orderBasicInfoService.generateDailyOrderReports(stationInfo.getId() + "");
|
||||
} catch (Exception e) {
|
||||
log.error("计算站点订单报表 发生异常 stationId:{}", stationInfo.getId(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user