mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
新增 甬城泊车相关接口、controller
This commit is contained in:
@@ -3,6 +3,7 @@ package com.jsowell.netty.handler;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
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;
|
||||
@@ -15,6 +16,7 @@ import com.jsowell.pile.service.IThirdPartyStationRelationService;
|
||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -44,6 +46,9 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private YCBCService ycbcService;
|
||||
|
||||
@Autowired
|
||||
private IThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
|
||||
@@ -137,10 +142,19 @@ public class ChargeEndHandler extends AbstractHandler{
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo info = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (Objects.nonNull(relationInfo)) {
|
||||
if (Objects.isNull(relationInfo)) {
|
||||
return null;
|
||||
}
|
||||
// 联联平台
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), relationInfo.getThirdPartyType())) {
|
||||
// 推送停止充电结果
|
||||
lianLianService.pushStopChargeResult(orderInfo.getOrderCode());
|
||||
}
|
||||
// 甬城泊车平台
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), relationInfo.getThirdPartyType())) {
|
||||
ycbcService.pushStopChargeResult(orderInfo.getOrderCode());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("联联平台推送停止充电结果异常", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user