diff --git a/jsowell-quartz/src/main/java/com/jsowell/quartz/task/JsowellTask.java b/jsowell-quartz/src/main/java/com/jsowell/quartz/task/JsowellTask.java index 215b23099..a567d0904 100644 --- a/jsowell-quartz/src/main/java/com/jsowell/quartz/task/JsowellTask.java +++ b/jsowell-quartz/src/main/java/com/jsowell/quartz/task/JsowellTask.java @@ -28,6 +28,7 @@ import com.jsowell.pile.vo.base.StationInfoVO; import com.jsowell.pile.vo.web.BillingTemplateVO; import com.jsowell.thirdparty.amap.service.AMapService; import com.jsowell.thirdparty.platform.service.impl.GuiZhouPlatformServiceImpl; +import com.jsowell.thirdparty.platform.service.impl.SiChuanPlatformServiceImpl; import org.apache.commons.collections4.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -225,7 +226,7 @@ public class JsowellTask { } /** - * 贵州省平台推送充电站实时功率 + * 贵州省平台推送充电站实时功率 15分钟执行一次 */ public void pushStationRealTimePowerInfo() { String env = SpringUtils.getActiveProfile(); @@ -243,6 +244,55 @@ public class JsowellTask { GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl(); guiZhouPlatformService.notificationPowerInfo(stationIdList); + + //四川省平台推送充电站实时功率 + String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode(); + List stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2); + + List stationIdList2 = stationInfoVOS2.stream() + .map(StationInfoVO::getStationId) + .collect(Collectors.toList()); + + SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl(); + sichuanPlatformService.notificationPowerInfo(stationIdList2); + + } + + + /** + * 推送统计信息 24小时执行一次 + */ + public void pushStatisticsInfo() { + String env = SpringUtils.getActiveProfile(); + if (StringUtils.equalsIgnoreCase(env, "pre")) { + log.debug("PRE环境不执行"); + return; + } + + // 贵州推送充电站统计信息 + String thirdPartyType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(); + List stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType); + + List stationIdList = stationInfoVOS.stream() + .map(StationInfoVO::getStationId) + .collect(Collectors.toList()); + GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl(); + for (String stationId : stationIdList) { + guiZhouPlatformService.notificationOperationStatsInfo(stationId); + } + + //四川省平台推送充电站实时功率 + String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode(); + List stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2); + + List stationIdList2 = stationInfoVOS2.stream() + .map(StationInfoVO::getStationId) + .collect(Collectors.toList()); + SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl(); + for (String stationId : stationIdList2) { + sichuanPlatformService.notificationOperationStatsInfo(stationId); + } + } /** diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java index ab602b598..93415d0a4 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java @@ -201,13 +201,13 @@ public class NotificationService { logger.error("停止充电结果推送error", e); } //推送充换电站用能统计信息 - try { +/* try { if (platformService != null) { platformService.notificationOperationStatsInfo(stationId); } }catch (Exception e){ logger.error("推送充换电站用能统计信息error", e); - } + }*/ //推送充电账单信息 try { if (platformService != null) { @@ -217,14 +217,14 @@ public class NotificationService { logger.error("推送充电账单信息error", e); } //推送充电历史订单信息 - try { +/* try { // 根据平台类型获取Service if (platformService != null) { platformService.notificationChargeOrderInfoHistory(orderCode); } } catch (Exception e) { logger.error("历史充电订单信息推送error", e); - } + }*/ } }