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 a567d0904..e4cade2a5 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.JiLinPlatformServiceImpl; import com.jsowell.thirdparty.platform.service.impl.SiChuanPlatformServiceImpl; import org.apache.commons.collections4.CollectionUtils; import org.slf4j.Logger; @@ -295,6 +296,34 @@ public class JsowellTask { } + + /** + * 定时任务,实时站点功率推送 + */ + public void realTimePowerPush() { +/* String env = SpringUtils.getActiveProfile(); + if (StringUtils.equalsIgnoreCase(env, "pre")) { + log.debug("PRE环境不执行"); + return; + }*/ + + String thirdPartyType = ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode(); + List stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType); + + // 获取站点列表 + List stationIdList = stationInfoVOS.stream() + .map(StationInfoVO::getStationId) + .collect(Collectors.toList()); + + JiLinPlatformServiceImpl jilinPlatformService = new JiLinPlatformServiceImpl(); + try { + jilinPlatformService.notificationPowerInfo(stationIdList); + }catch (Exception e){ + log.error("实时站点功率推送失败", e); + } + } + + /** * 定时任务, 订单分账 * jsowellTask.processOrderSplitting()