This commit is contained in:
YAS\29473
2025-07-09 11:53:27 +08:00
parent 89848f5935
commit b50178aad3
2 changed files with 26 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.thirdparty.CommonParamsDTO;
import com.jsowell.thirdparty.lianlian.common.CommonResult;
@@ -209,9 +210,27 @@ public class SiChuanController extends ThirdPartyBaseController {
}
/**
* 推送
* 推送充换电站用能统计信息
* @param stationId
* @return
*/
@GetMapping("/v1/notificationOperationStatsInfo/{stationId}")
public RestApiResponse<?> notificationOperationStatsInfo(@PathVariable("stationId") String stationId) {
RestApiResponse<?> response = null;
String result = null;
try {
result = platformLogic.notificationOperationStatsInfo(stationId);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("{}-推送充换电站用能统计信息 error", platformName, e);
return new RestApiResponse<>(e);
}
logger.info("{}-平台推送充换电站用能统计信息 result:{}",platformName, result);
return response;
}

View File

@@ -44,6 +44,7 @@ import com.jsowell.thirdparty.platform.util.*;
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
import com.yi.business.geo.GeoCodeInfo;
import com.yi.business.geo.TermRelationTreeCoordinate;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -506,8 +507,6 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
//使用对方的密钥配置信息和我方的operatorId
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
log.info("token : " + token);
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
return result;
@@ -690,9 +689,9 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
//充电异常结束
orderStatus = "6";
}
BigDecimal current = realTimeMonitorData.getOutputCurrent() == null ? BigDecimal.ZERO : info.getCurrent();
BigDecimal voltage = realTimeMonitorData.getOutputVoltage() == null ? BigDecimal.ZERO : info.getVoltage();
String soc = realTimeMonitorData.getSOC() == null ? Constants.ZERO : info.getSOC();
BigDecimal current = realTimeMonitorData.getOutputCurrent() == null ? BigDecimal.ZERO : new BigDecimal(realTimeMonitorData.getOutputCurrent());
BigDecimal voltage = realTimeMonitorData.getOutputVoltage() == null ? BigDecimal.ZERO : new BigDecimal(realTimeMonitorData.getOutputVoltage());
String soc = realTimeMonitorData.getSOC() == null ? Constants.ZERO : realTimeMonitorData.getSOC();
String dateTime = DateUtils.getDateTime();
SupEquipChargeStatusInfo supEquipChargeStatusInfo = SupEquipChargeStatusInfo.builder()
@@ -811,6 +810,7 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
connectorStatsInfoList.add(connectorStatsInfo);
equipmentStatsInfo.setConnectorStatsInfos(connectorStatsInfoList);
equipmentStatsInfo.setSupconnectorStatsInfos(connectorStatsInfoList);
equipmentStatsInfoList.add(equipmentStatsInfo);
} else {
// 同一台桩,枪口号不同,累加桩数据,将枪口数据新建
@@ -849,6 +849,7 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService {
.stationTotalSwapTime(Constants.zero)
.stationTotalWarningNum(0)
.equipmentStatsInfos(equipmentStatsInfoList)
.supEquipmentStatsInfos(equipmentStatsInfoList)
.build();
JSONObject json = new JSONObject();