This commit is contained in:
YAS\29473
2025-06-18 16:36:57 +08:00
parent adde60e612
commit f4e0356d2f

View File

@@ -139,8 +139,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
vo.setFailReason(failReason); vo.setFailReason(failReason);
vo.setSuccStat(succStat); vo.setSuccStat(succStat);
return ThirdPartyPlatformUtils.generateResultMapV2(vo, thirdPartySecretInfoVO.getTheirDataSecret(), return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
thirdPartySecretInfoVO.getTheirDataSecretIv(), thirdPartySecretInfoVO.getTheirSigSecret());
} }
@@ -270,7 +269,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
public Map<String, String> queryStationStatus(QueryStationInfoDTO dto) { public Map<String, String> queryStationStatus(QueryStationInfoDTO dto) {
List<String> stationIds = dto.getStationIds(); List<String> stationIds = dto.getStationIds();
List<StationStatusInfo> stationStatusInfos = new ArrayList<>(); List<StationStatusInfo> stationStatusInfos = new ArrayList<>();
ThirdPartySecretInfoVO ningBoSecretInfoVO = getChangZhouSecretInfo(); ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
for (String stationId : stationIds) { for (String stationId : stationIds) {
StationStatusInfo stationStatusInfo = new StationStatusInfo(); StationStatusInfo stationStatusInfo = new StationStatusInfo();
@@ -328,7 +327,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
log.info("返回参数:{}", JSON.toJSONString(map)); log.info("返回参数:{}", JSON.toJSONString(map));
return ThirdPartyPlatformUtils.generateResultMap(map, ningBoSecretInfoVO); return ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO);
} }
@@ -340,7 +339,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
*/ */
@Override @Override
public Map<String, String> queryEquipAuth(QueryEquipmentDTO dto) { public Map<String, String> queryEquipAuth(QueryEquipmentDTO dto) {
ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
EquipmentAuthVO vo = new EquipmentAuthVO(); EquipmentAuthVO vo = new EquipmentAuthVO();
String equipAuthSeq = dto.getEquipAuthSeq(); String equipAuthSeq = dto.getEquipAuthSeq();
@@ -371,8 +370,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
} }
log.info("返回参数:{}", JSON.toJSONString(vo)); log.info("返回参数:{}", JSON.toJSONString(vo));
return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getTheirDataSecret(), return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(), wangKuaiDianPlatformSecretInfo.getTheirSigSecret());
} }
@@ -387,7 +385,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
public Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto) { public Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto) {
List<EquipBusinessPolicyVO.PolicyInfo> policyInfoList = new ArrayList<>(); List<EquipBusinessPolicyVO.PolicyInfo> policyInfoList = new ArrayList<>();
String pileConnectorCode = dto.getConnectorID(); String pileConnectorCode = dto.getConnectorID();
ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
// 截取桩号 // 截取桩号
// String pileSn = StringUtils.substring(pileConnectorCode, 0, 14); // String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
@@ -426,8 +424,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
log.info("返回参数:{}", JSON.toJSONString(vo)); log.info("返回参数:{}", JSON.toJSONString(vo));
return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getTheirDataSecret(), return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(), wangKuaiDianPlatformSecretInfo.getTheirSigSecret());
} }
@@ -445,7 +442,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
// 平台已存在订单 // 平台已存在订单
return null; return null;
} }
ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
// 生成订单 // 生成订单
Map<String, Object> map = orderBasicInfoService.generateOrderForThirdParty(dto); Map<String, Object> map = orderBasicInfoService.generateOrderForThirdParty(dto);
String orderCode = (String) map.get("orderCode"); String orderCode = (String) map.get("orderCode");
@@ -473,8 +470,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
.build(); .build();
log.info("返回参数:{}", JSON.toJSONString(vo)); log.info("返回参数:{}", JSON.toJSONString(vo));
return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getTheirDataSecret(), return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(), wangKuaiDianPlatformSecretInfo.getTheirSigSecret());
} }
@@ -491,13 +487,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
if (orderInfo == null) { if (orderInfo == null) {
return null; return null;
} }
ThirdPartySecretInfoVO ningBoSecretInfoVO = getChangZhouSecretInfo(); ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
String operatorId = Constants.OPERATORID_JIANG_SU; String operatorId = Constants.OPERATORID_JIANG_SU;
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret(); String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret();
String signSecret = ningBoSecretInfoVO.getTheirSigSecret(); String signSecret = thirdPartySecretInfoVO.getTheirSigSecret();
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret(); String dataSecret = thirdPartySecretInfoVO.getTheirDataSecret();
String dataSecretIv = ningBoSecretInfoVO.getTheirDataSecretIv(); String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv();
String urlAddress = ningBoSecretInfoVO.getTheirUrlPrefix(); String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix();
// 推送启动充电结果(调用接口 notification_start_charge_result) // 推送启动充电结果(调用接口 notification_start_charge_result)
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_START_CHARGE_RESULT.getValue(); String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_START_CHARGE_RESULT.getValue();
@@ -533,7 +529,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
if (orderInfo == null) { if (orderInfo == null) {
return null; return null;
} }
ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderInfo.getOrderCode()); OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderInfo.getOrderCode());
// 通过订单号查询实时数据 // 通过订单号查询实时数据
List<RealTimeMonitorData> realTimeData = orderBasicInfoService.getChargingRealTimeData(orderInfo.getTransactionCode()); List<RealTimeMonitorData> realTimeData = orderBasicInfoService.getChargingRealTimeData(orderInfo.getTransactionCode());
@@ -583,8 +579,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
.build(); .build();
} }
log.info("返回参数:{}", JSON.toJSONString(vo)); log.info("返回参数:{}", JSON.toJSONString(vo));
return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getTheirDataSecret(), return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(), wangKuaiDianPlatformSecretInfo.getTheirSigSecret());
} }
@@ -605,14 +600,14 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
BigDecimal voltage = info.getVoltage() == null ? BigDecimal.ZERO : info.getVoltage(); BigDecimal voltage = info.getVoltage() == null ? BigDecimal.ZERO : info.getVoltage();
String soc = info.getSOC() == null ? Constants.ZERO : info.getSOC(); String soc = info.getSOC() == null ? Constants.ZERO : info.getSOC();
// 查询相关配置信息 // 查询相关配置信息
ThirdPartySecretInfoVO ningBoSecretInfoVO = getChangZhouSecretInfo(); ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
String operatorId = Constants.OPERATORID_JIANG_SU; String operatorId = Constants.OPERATORID_JIANG_SU;
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret(); String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret();
String signSecret = ningBoSecretInfoVO.getTheirSigSecret(); String signSecret = thirdPartySecretInfoVO.getTheirSigSecret();
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret(); String dataSecret = thirdPartySecretInfoVO.getTheirDataSecret();
String dataSecretIv = ningBoSecretInfoVO.getTheirDataSecretIv(); String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv();
String urlAddress = ningBoSecretInfoVO.getTheirUrlPrefix(); String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix();
BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalElectricityAmount(); BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalElectricityAmount();
BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalServiceAmount(); BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalServiceAmount();
@@ -672,8 +667,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
vo.setFailReason(0); vo.setFailReason(0);
vo.setStartChargeSeq(orderCode); vo.setStartChargeSeq(orderCode);
log.info("返回参数:{}", JSON.toJSONString(vo)); log.info("返回参数:{}", JSON.toJSONString(vo));
return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getOurDataSecret() return ThirdPartyPlatformUtils.generateResultMap(vo, wangKuaiDianPlatformSecretInfo);
, wangKuaiDianPlatformSecretInfo.getOurDataSecretIv(), wangKuaiDianPlatformSecretInfo.getOurSigSecret());
} }
@@ -689,13 +683,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
if (orderInfo == null) { if (orderInfo == null) {
return null; return null;
} }
ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo();
String operatorId = Constants.OPERATORID_JIANG_SU; String operatorId = Constants.OPERATORID_JIANG_SU;
String operatorSecret = wangKuaiDianPlatformSecretInfo.getTheirOperatorSecret(); String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret();
String signSecret = wangKuaiDianPlatformSecretInfo.getTheirSigSecret(); String signSecret = thirdPartySecretInfoVO.getTheirSigSecret();
String dataSecret = wangKuaiDianPlatformSecretInfo.getTheirDataSecret(); String dataSecret = thirdPartySecretInfoVO.getTheirDataSecret();
String dataSecretIv = wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(); String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv();
String urlAddress = wangKuaiDianPlatformSecretInfo.getTheirUrlPrefix(); String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix();
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STOP_CHARGE_RESULT.getValue(); String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STOP_CHARGE_RESULT.getValue();