update 将 0x19 中推送停止充电结果逻辑放到 0x3B 中

This commit is contained in:
Lemon
2024-01-11 09:51:39 +08:00
parent 3bc7522428
commit 4dbdaa3828
4 changed files with 74 additions and 29 deletions

View File

@@ -138,34 +138,36 @@ public class ChargeEndHandler extends AbstractHandler{
}
orderBasicInfoService.updateOrderBasicInfo(orderInfo);
try {
// 查询该站点是否已对接互联互通平台,如果对接则发送充电结束
// 通过站点id查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo info = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
if (Objects.isNull(relationInfo)) {
return null;
}
// 联联平台
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), relationInfo.getThirdPartyType())) {
// 推送停止充电结果
lianLianService.pushStopChargeResult(orderInfo.getOrderCode());
}
// 新电途平台
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode(), relationInfo.getThirdPartyType())) {
// 推送停止充电结果
xdtService.notificationStopChargeResult(orderInfo.getOrderCode());
}
// 甬城泊车平台
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), relationInfo.getThirdPartyType())) {
ycbcService.pushStopChargeResult(orderInfo.getOrderCode());
}
// 以下推送停止充电信息逻辑已全部放到 0x3B 帧中 --2024年1月11日
} catch (Exception e) {
log.error("联联平台推送停止充电结果异常", e);
}
// try {
// // 查询该站点是否已对接互联互通平台,如果对接则发送充电结束
// // 通过站点id查询相关配置信息
// ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
// relation.setStationId(Long.parseLong(orderInfo.getStationId()));
// ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// // ThirdPartySettingInfo info = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
// if (Objects.isNull(relationInfo)) {
// return null;
// }
// // 联联平台
// if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), relationInfo.getThirdPartyType())) {
// // 推送停止充电结果
// lianLianService.pushStopChargeResult(orderInfo.getOrderCode());
// }
// // 新电途平台
// if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode(), relationInfo.getThirdPartyType())) {
// // 推送停止充电结果
// xdtService.notificationStopChargeResult(orderInfo.getOrderCode());
// }
// // 甬城泊车平台
// if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), relationInfo.getThirdPartyType())) {
// ycbcService.pushStopChargeResult(orderInfo.getOrderCode());
// }
//
// } catch (Exception e) {
// log.error("联联平台推送停止充电结果异常", e);
// }
}

View File

@@ -699,6 +699,8 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
lianLianService.pushOrderInfo(orderBasicInfo.getOrderCode());
// 推送充电订单信息
lianLianService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
// 推送停止充电结果
lianLianService.pushStopChargeResult(orderBasicInfo.getOrderCode());
}
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getCode(), thirdPartyType)) {
// 中电联
@@ -713,6 +715,8 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
// 新电途平台
// 推送订单信息
xdtService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
// 推送停止充电结果
xdtService.notificationStopChargeResult(orderBasicInfo.getOrderCode());
}
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
@@ -721,6 +725,8 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
log.info("甬城泊车平台 推送充电订单信息 param:{}", orderBasicInfo.getOrderCode());
String result = ycbcService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
log.info("甬城泊车平台 推送充电订单信息 result:{}", result);
// 推送停止充电结果
ycbcService.pushStopChargeResult(orderBasicInfo.getOrderCode());
}
}
// 调用相关接口