diff --git a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/SiChuanController.java b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/SiChuanController.java index 207dc1f1d..d9b990166 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/SiChuanController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/SiChuanController.java @@ -208,4 +208,14 @@ public class SiChuanController extends ThirdPartyBaseController { return CommonResult.success(0 , "推送充电站信息成功!" , s , null); } + + /** + * 推送 + */ + + + + + + } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java index 6fe108dec..4a043a343 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/NotificationService.java @@ -167,16 +167,42 @@ public class NotificationService { try { // 根据平台类型获取Service ThirdPartyPlatformService platformService = ThirdPartyPlatformFactory.getInvokeStrategy(secretInfoVO.getPlatformType()); + String type = secretInfoVO.getPlatformType(); + //充电订单信息推送 - platformService.notificationChargeOrderInfo(orderCode, secretInfoVO); + //判断实现此接口没有 + // 25 , 20 ,17 ,18,7,24,3,1,10,13,26,16,23,6, 21,15,2 + if(type.equals("25") || type.equals("17") ||type.equals("20") || type.equals("7") || + type.equals("24") || type.equals("3") || type.equals("1") + || type.equals("10") || type.equals("13") || type.equals("26") || type.equals("16") + || type.equals("23") || type.equals("6") || type.equals("21") || type.equals("15") || type.equals("2")){ + platformService.notificationChargeOrderInfo(orderCode, secretInfoVO); + } + //订单信息推送 - platformService.notificationChargeOrderInfo(orderCode); + //12,7,1,10,13,11,6 + if(type.equals("12") || type.equals("7") || type.equals("1") || type.equals("10") || + type.equals("13") || type.equals("11") || type.equals("6")){ + platformService.notificationChargeOrderInfo(orderCode); + } + //停止充电结果推送 - platformService.notificationStopChargeResult(orderCode); + //25 , 7,1,23,6,4,2 + if(type.equals("25") || type.equals("7") || type.equals("1") || + type.equals("23") || type.equals("6") || type.equals("4") || type.equals("2")){ + platformService.notificationStopChargeResult(orderCode); + } + //推送充换电站用能统计信息 - platformService.notificationOperationStatsInfo(stationId); + //18,10,13,26 + if(type.equals("18") || type.equals("10") || type.equals("13") || type.equals("26")){ + platformService.notificationOperationStatsInfo(stationId); + } //推送充电账单信息 - platformService.notificationPayOrderInfo(orderCode); + //25 + if(type.equals("25")){ + platformService.notificationPayOrderInfo(orderCode); + } } catch (Exception e) { logger.error("充电订单信息推送error", e); @@ -184,6 +210,9 @@ public class NotificationService { } } + + + public void commonPushStartChargeResult(NotificationDTO dto) { logger.info("开始调用commonPushStartChargeResult接口"); String stationId = dto.getStationId(); diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/SiChuanPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/SiChuanPlatformServiceImpl.java index 1ae160074..bd1efc01a 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/SiChuanPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/SiChuanPlatformServiceImpl.java @@ -510,14 +510,8 @@ public class SiChuanPlatformServiceImpl implements ThirdPartyPlatformService { // 获取令牌 //使用对方的密钥配置信息和我方的operatorId String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret); - //使用我方的密钥配置信息和我方的operatorId - String token1 = getToken(urlAddress, operatorId, operatorSecret1, dataSecretIv1, signSecret1, dataSecret1); - //使用对方的密钥配置信息和对方的operatorId - String token2 = getToken(urlAddress, operatorId1, operatorSecret, dataSecretIv, signSecret, dataSecret); log.info("token : " + token); - log.info("token1 : " + token1); - log.info("token2 : " + token2); String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);