diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java index 5bc686f9..aa9f039c 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java @@ -537,6 +537,14 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi cacheRateModel.setTfPricesSeq(tfPricesSeq); R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel); + + if (r.getCode() != 200) { + logger.info("添加费率桩服务错误:"+r.getMsg()); + //数据回滚-手动回滚 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return AjaxResult.error("添加费率入缓存失败,请稍后在试"); + } + //修改桩和终端的模板id xhpcChargingStationMapper.updateXhpcChargingPile(chargingStationId,rateModelId); xhpcChargingStationMapper.updateXhpcTerminal(chargingStationId,rateModelId); @@ -1005,6 +1013,12 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi } cacheRateModel.setTfPricesSeq(tfPricesSeq); R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel); + if (r.getCode() != 200) { + logger.info("添加费率桩服务错误:"+r.getMsg()); + //数据回滚-手动回滚 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return AjaxResult.error("添加费率入缓存失败,请稍后在试"); + } //修改桩和终端的模板id xhpcChargingStationMapper.updateXhpcChargingPile(chargingStationId,rateModelId); xhpcChargingStationMapper.updateXhpcTerminal(chargingStationId,rateModelId); diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java index a9d4d850..9e19029e 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcHistoryOrderController.java @@ -88,7 +88,7 @@ public class XhpcHistoryOrderController extends BaseController { * 终端统计 */ @GetMapping("/test3") - @Scheduled(cron = "0 0/8 * * * ?") + //@Scheduled(cron = "0 0/8 * * * ?") public void test3(){ logger.info(">>>>>>>>>>>>>>>>>>>>>>>终端统计定时任务>>>>>>>>>>>>>>>>>>>>>"); logger.info(">>>>>>>>>>>>>>>>>>>>>>>终端统计定时任务>>>>>>>>>>>>>>>>>>>>>"); @@ -99,7 +99,7 @@ public class XhpcHistoryOrderController extends BaseController { * 场站统计 */ @GetMapping("/test2") - @Scheduled(cron = "0 0/7 * * * ?") + //@Scheduled(cron = "0 0/7 * * * ?") public void test2(){ logger.info(">>>>>>>>>>>>>>>>>>>>>>>场站统计定时任务>>>>>>>>>>>>>>>>>>>>>"); logger.info(">>>>>>>>>>>>>>>>>>>>>>>场站统计定时任务>>>>>>>>>>>>>>>>>>>>>"); @@ -111,7 +111,7 @@ public class XhpcHistoryOrderController extends BaseController { * 日期统计 */ @GetMapping("/test1") - @Scheduled(cron = "0 0/6 * * * ?") + //@Scheduled(cron = "0 0/6 * * * ?") public void test1(){ logger.info(">>>>>>>>>>>>>>>>>>>>>>>日期统计定时任务>>>>>>>>>>>>>>>>>>>>>"); logger.info(">>>>>>>>>>>>>>>>>>>>>>>日期统计定时任务>>>>>>>>>>>>>>>>>>>>>"); @@ -403,7 +403,7 @@ public class XhpcHistoryOrderController extends BaseController { * 小时统计 */ @GetMapping("/test") - @Scheduled(cron = "0 0/5 * * * ?") + //@Scheduled(cron = "0 0/5 * * * ?") public void test(){ logger.info(">>>>>>>>>>>>>>>>>>>>>>>小时统计定时任务>>>>>>>>>>>>>>>>>>>>>"); logger.info(">>>>>>>>>>>>>>>>>>>>>>>小时统计定时任务>>>>>>>>>>>>>>>>>>>>>"); diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java index a844b950..f3c1f90c 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java @@ -171,13 +171,11 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService { int number =0; if(!"".equals(userMessage.get("soc")) && userMessage.get("soc") !=null && !"".equals(userMessage.get("soc"))){ number =Integer.parseInt(userMessage.get("soc").toString()); - logger.info("<<<<<<<<<<<<<<<<<<<<<<<<用户>>>>>>>>>>>>>>>>>:"+number); } //平台 String soc = redisService.getCacheObject("global:SOC"); if(!"".equals(soc) && soc!=null){ if(number!=0){ - logger.info("<<<<<<<<<<<<<<<<<<<<<<<<平台>>>>>>>>>>>>>>>>>:"+soc); if(Integer.parseInt(soc)-number<0){ number=Integer.parseInt(soc); } @@ -188,7 +186,6 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService { Map operatorMessage = xhpcChargeOrderMapper.getOperatorMessage(xhpcTerminal.getChargingStationId()); if(operatorMessage !=null && operatorMessage.get("soc") !=null && !"".equals(operatorMessage.get("soc"))){ if(number!=0){ - logger.info("<<<<<<<<<<<<<<<<<<<<<<<<营运商>>>>>>>>>>>>>>>>>:"+operatorMessage.get("soc").toString()); if(Integer.parseInt(operatorMessage.get("soc").toString())-number<0){ number=Integer.parseInt(operatorMessage.get("soc").toString()); } @@ -224,7 +221,7 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService { if (xhpcChargingPileById != null && xhpcChargingPileById.get("power") != null) { xhpcChargeOrder.setPower(xhpcChargingPileById.get("power").toString()); } - xhpcChargeOrder.setRateModelId(xhpcTerminal.getRateModelId()); + xhpcChargeOrder.setRateModelId(Long.valueOf(r1.getData().toString())); if (type == 1) { xhpcChargeOrder.setChargingMode("小华充电微信"); } else {