This commit is contained in:
YAS\29473
2025-08-15 09:42:37 +08:00
parent 7a9fe91ea2
commit 9800d44bff
3 changed files with 68 additions and 3 deletions

View File

@@ -390,4 +390,37 @@ public class NotificationService {
}
}
}
/**
* 推送站点用能统计信息
* @param dto
*/
public void notificationOperationStatsInfo(NotificationDTO dto) {
String stationId = dto.getStationId();
String platformType = dto.getPlatformType();
if (StringUtils.isBlank(stationId)) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
}
// 通过stationId 查询该站点需要对接的平台配置
List<ThirdPartySecretInfoVO> secretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
if (CollectionUtils.isEmpty(secretInfoVOS)) {
return;
}
// 调用相应平台的处理方法
for (ThirdPartySecretInfoVO secretInfoVO : secretInfoVOS) {
if (StringUtils.isNotBlank(platformType) && !StringUtils.equals(platformType, secretInfoVO.getPlatformType())) {
// 如果dto中的platformType不为空并且不等于secretInfoVO.getPlatformType()continue
continue;
}
try {
// 根据平台类型获取Service
ThirdPartyPlatformService platformService = ThirdPartyPlatformFactory.getInvokeStrategy(secretInfoVO.getPlatformType());
platformService.notificationOperationStatsInfo(stationId);
} catch (Exception e) {
logger.error("推送充换电站用能统计信息error", e);
}
}
}
}

View File

@@ -1282,7 +1282,11 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
}
/**
* 推送站点统计信息 notification_station_stats_info
* @param stationId
* @return
*/
@Override
public String notificationOperationStatsInfo(String stationId) {
// 1. 获取统计时间范围前一日的00:00:00至23:59:59