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:
@@ -27,6 +27,8 @@ import com.jsowell.pile.service.*;
|
|||||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
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.common.NotificationDTO;
|
||||||
|
import com.jsowell.thirdparty.common.NotificationService;
|
||||||
import com.jsowell.thirdparty.platform.service.impl.GuiZhouPlatformServiceImpl;
|
import com.jsowell.thirdparty.platform.service.impl.GuiZhouPlatformServiceImpl;
|
||||||
import com.jsowell.thirdparty.platform.service.impl.JiLinPlatformServiceImpl;
|
import com.jsowell.thirdparty.platform.service.impl.JiLinPlatformServiceImpl;
|
||||||
import com.jsowell.thirdparty.platform.service.impl.SiChuanPlatformServiceImpl;
|
import com.jsowell.thirdparty.platform.service.impl.SiChuanPlatformServiceImpl;
|
||||||
@@ -67,6 +69,9 @@ public class JsowellTask {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private NotificationService notificationService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AMapService aMapService;
|
private AMapService aMapService;
|
||||||
|
|
||||||
@@ -235,50 +240,75 @@ public class JsowellTask {
|
|||||||
log.debug("PRE环境不执行");
|
log.debug("PRE环境不执行");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 查询出要推送的站点(贵州、)
|
|
||||||
try {
|
List<String> thirdPartyTypeList = Lists.newArrayList(ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode(),
|
||||||
String thirdPartyType = ThirdPlatformTypeEnum.GUI_ZHOU_PLATFORM.getTypeCode();
|
ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode(),
|
||||||
|
ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode()
|
||||||
|
);
|
||||||
|
|
||||||
|
for (String thirdPartyType : thirdPartyTypeList) {
|
||||||
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
List<StationInfoVO> stationInfoVOS = thirdPartyStationRelationService.selectStationList(thirdPartyType);
|
||||||
|
if (CollectionUtils.isEmpty(stationInfoVOS)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
List<String> stationIdList = stationInfoVOS.stream()
|
List<String> stationIdList = stationInfoVOS.stream()
|
||||||
.map(StationInfoVO::getStationId)
|
.map(StationInfoVO::getStationId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
GuiZhouPlatformServiceImpl guiZhouPlatformService = new GuiZhouPlatformServiceImpl();
|
for (String stationId : stationIdList) {
|
||||||
guiZhouPlatformService.notificationPowerInfo(stationIdList);
|
NotificationDTO dto = new NotificationDTO();
|
||||||
} catch (Exception e) {
|
dto.setStationId(stationId);
|
||||||
log.error("贵州省平台推送充电站实时功率失败", e);
|
dto.setPlatformType(thirdPartyType);
|
||||||
|
notificationService.notificationStationPowerInfo(dto);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查询出要推送的站点(贵州、)
|
||||||
|
// try {
|
||||||
|
// 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();
|
||||||
|
// guiZhouPlatformService.notificationPowerInfo(stationIdList);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// log.error("贵州省平台推送充电站实时功率失败", e);
|
||||||
|
// }
|
||||||
|
|
||||||
//四川省平台推送充电站实时功率
|
//四川省平台推送充电站实时功率
|
||||||
try {
|
// try {
|
||||||
String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
|
// String thirdPartyType2 = ThirdPlatformTypeEnum.SI_CHUAN_PLATFORM.getTypeCode();
|
||||||
List<StationInfoVO> stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2);
|
// List<StationInfoVO> stationInfoVOS2 = thirdPartyStationRelationService.selectStationList(thirdPartyType2);
|
||||||
|
//
|
||||||
List<String> stationIdList2 = stationInfoVOS2.stream()
|
// List<String> stationIdList2 = stationInfoVOS2.stream()
|
||||||
.map(StationInfoVO::getStationId)
|
// .map(StationInfoVO::getStationId)
|
||||||
.collect(Collectors.toList());
|
// .collect(Collectors.toList());
|
||||||
|
//
|
||||||
SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl();
|
// SiChuanPlatformServiceImpl sichuanPlatformService = new SiChuanPlatformServiceImpl();
|
||||||
sichuanPlatformService.notificationPowerInfo(stationIdList2);
|
// sichuanPlatformService.notificationPowerInfo(stationIdList2);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
log.error("四川省平台推送充电站实时功率失败", e);
|
// log.error("四川省平台推送充电站实时功率失败", e);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 吉林省平台推送充电站实时功率
|
// 吉林省平台推送充电站实时功率
|
||||||
try {
|
// try {
|
||||||
String thirdPartyType3 = ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode();
|
// String thirdPartyType3 = ThirdPlatformTypeEnum.JI_LIN_PLATFORM.getTypeCode();
|
||||||
List<StationInfoVO> stationInfoVOS3 = thirdPartyStationRelationService.selectStationList(thirdPartyType3);
|
// List<StationInfoVO> stationInfoVOS3 = thirdPartyStationRelationService.selectStationList(thirdPartyType3);
|
||||||
|
//
|
||||||
List<String> stationIdList3 = stationInfoVOS3.stream()
|
// List<String> stationIdList3 = stationInfoVOS3.stream()
|
||||||
.map(StationInfoVO::getStationId)
|
// .map(StationInfoVO::getStationId)
|
||||||
.collect(Collectors.toList());
|
// .collect(Collectors.toList());
|
||||||
|
//
|
||||||
JiLinPlatformServiceImpl jiLinPlatformService = new JiLinPlatformServiceImpl();
|
// JiLinPlatformServiceImpl jiLinPlatformService = new JiLinPlatformServiceImpl();
|
||||||
jiLinPlatformService.notificationPowerInfo(stationIdList3);
|
// jiLinPlatformService.notificationPowerInfo(stationIdList3);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
log.error("吉林省平台推送充电站实时功率失败", e);
|
// log.error("吉林省平台推送充电站实时功率失败", e);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user