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);
// }
}