This commit is contained in:
YAS\29473
2025-07-10 10:05:37 +08:00
parent 89ff62d925
commit 5694a027d5
2 changed files with 55 additions and 5 deletions

View File

@@ -28,6 +28,7 @@ import com.jsowell.pile.vo.base.StationInfoVO;
import com.jsowell.pile.vo.web.BillingTemplateVO; import com.jsowell.pile.vo.web.BillingTemplateVO;
import com.jsowell.thirdparty.amap.service.AMapService; import com.jsowell.thirdparty.amap.service.AMapService;
import com.jsowell.thirdparty.platform.service.impl.GuiZhouPlatformServiceImpl; import com.jsowell.thirdparty.platform.service.impl.GuiZhouPlatformServiceImpl;
import com.jsowell.thirdparty.platform.service.impl.SiChuanPlatformServiceImpl;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -225,7 +226,7 @@ public class JsowellTask {
} }
/** /**
* 贵州省平台推送充电站实时功率 * 贵州省平台推送充电站实时功率 15分钟执行一次
*/ */
public void pushStationRealTimePowerInfo() { public void pushStationRealTimePowerInfo() {
String env = SpringUtils.getActiveProfile(); String env = SpringUtils.getActiveProfile();
@@ -243,6 +244,55 @@ public class JsowellTask {
GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl(); GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl();
guiZhouPlatformService.notificationPowerInfo(stationIdList); guiZhouPlatformService.notificationPowerInfo(stationIdList);
//四川省平台推送充电站实时功率
String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
List<StationInfoVO> stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2);
List<String> 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<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
List<String> 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<StationInfoVO> stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2);
List<String> stationIdList2 = stationInfoVOS2.stream()
.map(StationInfoVO::getStationId)
.collect(Collectors.toList());
SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl();
for (String stationId : stationIdList2) {
sichuanPlatformService.notificationOperationStatsInfo(stationId);
}
} }
/** /**

View File

@@ -201,13 +201,13 @@ public class NotificationService {
logger.error("停止充电结果推送error", e); logger.error("停止充电结果推送error", e);
} }
//推送充换电站用能统计信息 //推送充换电站用能统计信息
try { /* try {
if (platformService != null) { if (platformService != null) {
platformService.notificationOperationStatsInfo(stationId); platformService.notificationOperationStatsInfo(stationId);
} }
}catch (Exception e){ }catch (Exception e){
logger.error("推送充换电站用能统计信息error", e); logger.error("推送充换电站用能统计信息error", e);
} }*/
//推送充电账单信息 //推送充电账单信息
try { try {
if (platformService != null) { if (platformService != null) {
@@ -217,14 +217,14 @@ public class NotificationService {
logger.error("推送充电账单信息error", e); logger.error("推送充电账单信息error", e);
} }
//推送充电历史订单信息 //推送充电历史订单信息
try { /* try {
// 根据平台类型获取Service // 根据平台类型获取Service
if (platformService != null) { if (platformService != null) {
platformService.notificationChargeOrderInfoHistory(orderCode); platformService.notificationChargeOrderInfoHistory(orderCode);
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("历史充电订单信息推送error", e); logger.error("历史充电订单信息推送error", e);
} }*/
} }
} }