mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
已经存在退款记录, 不能再次结算
This commit is contained in:
@@ -2,21 +2,13 @@ package com.jsowell.netty.handler;
|
||||
|
||||
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
|
||||
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.enums.ykc.OrderStatusEnum;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.YKCUtils;
|
||||
import com.jsowell.netty.factory.YKCOperateFactory;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||
import com.jsowell.pile.service.ThirdPartySettingInfoService;
|
||||
import com.jsowell.pile.service.ThirdPartyStationRelationService;
|
||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -40,21 +32,6 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
@Autowired
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartySettingInfoService thirdPartySettingInfoService;
|
||||
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private YCBCService ycbcService;
|
||||
|
||||
@Autowired
|
||||
private XDTService xdtService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
YKCOperateFactory.register(type, this);
|
||||
@@ -126,7 +103,6 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
byte[] pileChargedCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||
|
||||
// 查询订单,改为待结算 将结束soc传入
|
||||
// OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(transactionCode);
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
||||
if (Objects.nonNull(orderInfo)) {
|
||||
if (StringUtils.equals(OrderStatusEnum.IN_THE_CHARGING.getValue(), orderInfo.getOrderStatus())) {
|
||||
@@ -137,38 +113,6 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
orderInfo.setChargeEndTime(new Date()); // 结束充电时间
|
||||
}
|
||||
orderBasicInfoService.updateOrderBasicInfo(orderInfo);
|
||||
|
||||
// 以下推送停止充电信息逻辑已全部放到 0x3B 帧中 --2024年1月11日
|
||||
|
||||
// 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);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user