From f4e0356d2ff2ec93c41be2d43ae8b4d0efdfdbd8 Mon Sep 17 00:00:00 2001 From: "YAS\\29473" <2947326429@qq.com> Date: Wed, 18 Jun 2025 16:36:57 +0800 Subject: [PATCH] update --- .../impl/ChangZhouPlatformServiceImpl.java | 66 +++++++++---------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChangZhouPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChangZhouPlatformServiceImpl.java index 286629eb0..38838a180 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChangZhouPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChangZhouPlatformServiceImpl.java @@ -139,8 +139,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { vo.setFailReason(failReason); vo.setSuccStat(succStat); - return ThirdPartyPlatformUtils.generateResultMapV2(vo, thirdPartySecretInfoVO.getTheirDataSecret(), - thirdPartySecretInfoVO.getTheirDataSecretIv(), thirdPartySecretInfoVO.getTheirSigSecret()); + return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO); } @@ -270,7 +269,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { public Map queryStationStatus(QueryStationInfoDTO dto) { List stationIds = dto.getStationIds(); List stationStatusInfos = new ArrayList<>(); - ThirdPartySecretInfoVO ningBoSecretInfoVO = getChangZhouSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo(); for (String stationId : stationIds) { StationStatusInfo stationStatusInfo = new StationStatusInfo(); @@ -328,7 +327,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { 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 public Map queryEquipAuth(QueryEquipmentDTO dto) { - ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo(); EquipmentAuthVO vo = new EquipmentAuthVO(); String equipAuthSeq = dto.getEquipAuthSeq(); @@ -371,8 +370,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { } log.info("返回参数:{}", JSON.toJSONString(vo)); - return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getTheirDataSecret(), - wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(), wangKuaiDianPlatformSecretInfo.getTheirSigSecret()); + return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO); } @@ -387,7 +385,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { public Map queryEquipBusinessPolicy(QueryStartChargeDTO dto) { List policyInfoList = new ArrayList<>(); String pileConnectorCode = dto.getConnectorID(); - ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo(); // 截取桩号 // String pileSn = StringUtils.substring(pileConnectorCode, 0, 14); @@ -426,8 +424,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { log.info("返回参数:{}", JSON.toJSONString(vo)); - return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getTheirDataSecret(), - wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(), wangKuaiDianPlatformSecretInfo.getTheirSigSecret()); + return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO); } @@ -445,7 +442,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { // 平台已存在订单 return null; } - ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo(); // 生成订单 Map map = orderBasicInfoService.generateOrderForThirdParty(dto); String orderCode = (String) map.get("orderCode"); @@ -473,8 +470,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { .build(); log.info("返回参数:{}", JSON.toJSONString(vo)); - return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getTheirDataSecret(), - wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(), wangKuaiDianPlatformSecretInfo.getTheirSigSecret()); + return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO); } @@ -491,13 +487,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { if (orderInfo == null) { return null; } - ThirdPartySecretInfoVO ningBoSecretInfoVO = getChangZhouSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo(); String operatorId = Constants.OPERATORID_JIANG_SU; - String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret(); - String signSecret = ningBoSecretInfoVO.getTheirSigSecret(); - String dataSecret = ningBoSecretInfoVO.getTheirDataSecret(); - String dataSecretIv = ningBoSecretInfoVO.getTheirDataSecretIv(); - String urlAddress = ningBoSecretInfoVO.getTheirUrlPrefix(); + String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret(); + String signSecret = thirdPartySecretInfoVO.getTheirSigSecret(); + String dataSecret = thirdPartySecretInfoVO.getTheirDataSecret(); + String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv(); + String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix(); // 推送启动充电结果(调用接口 notification_start_charge_result) String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_START_CHARGE_RESULT.getValue(); @@ -533,7 +529,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { if (orderInfo == null) { return null; } - ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo(); OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderInfo.getOrderCode()); // 通过订单号查询实时数据 List realTimeData = orderBasicInfoService.getChargingRealTimeData(orderInfo.getTransactionCode()); @@ -583,8 +579,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { .build(); } log.info("返回参数:{}", JSON.toJSONString(vo)); - return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getTheirDataSecret(), - wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(), wangKuaiDianPlatformSecretInfo.getTheirSigSecret()); + return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO); } @@ -605,14 +600,14 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { BigDecimal voltage = info.getVoltage() == null ? BigDecimal.ZERO : info.getVoltage(); String soc = info.getSOC() == null ? Constants.ZERO : info.getSOC(); // 查询相关配置信息 - ThirdPartySecretInfoVO ningBoSecretInfoVO = getChangZhouSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo(); String operatorId = Constants.OPERATORID_JIANG_SU; - String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret(); - String signSecret = ningBoSecretInfoVO.getTheirSigSecret(); - String dataSecret = ningBoSecretInfoVO.getTheirDataSecret(); - String dataSecretIv = ningBoSecretInfoVO.getTheirDataSecretIv(); - String urlAddress = ningBoSecretInfoVO.getTheirUrlPrefix(); + String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret(); + String signSecret = thirdPartySecretInfoVO.getTheirSigSecret(); + String dataSecret = thirdPartySecretInfoVO.getTheirDataSecret(); + String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv(); + String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix(); BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalElectricityAmount(); BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalServiceAmount(); @@ -672,8 +667,7 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { vo.setFailReason(0); vo.setStartChargeSeq(orderCode); log.info("返回参数:{}", JSON.toJSONString(vo)); - return ThirdPartyPlatformUtils.generateResultMapV2(vo, wangKuaiDianPlatformSecretInfo.getOurDataSecret() - , wangKuaiDianPlatformSecretInfo.getOurDataSecretIv(), wangKuaiDianPlatformSecretInfo.getOurSigSecret()); + return ThirdPartyPlatformUtils.generateResultMap(vo, wangKuaiDianPlatformSecretInfo); } @@ -689,13 +683,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { if (orderInfo == null) { return null; } - ThirdPartySecretInfoVO wangKuaiDianPlatformSecretInfo = getChangZhouSecretInfo(); + ThirdPartySecretInfoVO thirdPartySecretInfoVO = getChangZhouSecretInfo(); String operatorId = Constants.OPERATORID_JIANG_SU; - String operatorSecret = wangKuaiDianPlatformSecretInfo.getTheirOperatorSecret(); - String signSecret = wangKuaiDianPlatformSecretInfo.getTheirSigSecret(); - String dataSecret = wangKuaiDianPlatformSecretInfo.getTheirDataSecret(); - String dataSecretIv = wangKuaiDianPlatformSecretInfo.getTheirDataSecretIv(); - String urlAddress = wangKuaiDianPlatformSecretInfo.getTheirUrlPrefix(); + String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret(); + String signSecret = thirdPartySecretInfoVO.getTheirSigSecret(); + String dataSecret = thirdPartySecretInfoVO.getTheirDataSecret(); + String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv(); + String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix(); String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STOP_CHARGE_RESULT.getValue();