mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 江苏省平台接口
This commit is contained in:
@@ -8,6 +8,7 @@ import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
|
||||
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.parkplatform.ParkingEnum;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.enums.ykc.OrderStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.enums.ykc.YKCChargingStopReasonEnum;
|
||||
@@ -31,7 +32,9 @@ import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.lutongyunting.service.LTYTService;
|
||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||
import com.jsowell.thirdparty.ruanjie.service.RJService;
|
||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -78,6 +81,12 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private ZDLService zdlService;
|
||||
|
||||
@Autowired
|
||||
private NRService nrService;
|
||||
|
||||
@Autowired
|
||||
private IThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
|
||||
@@ -639,17 +648,31 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
||||
|
||||
// 联联平台 推送订单信息 notification_orderInfo
|
||||
try {
|
||||
// 查询该站点是否推送联联平台
|
||||
// 查询该站点是否推送第三方平台
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo infoByStationId = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationId));
|
||||
if (Objects.nonNull(relationInfo)) {
|
||||
if (Objects.isNull(relationInfo)) {
|
||||
return;
|
||||
}
|
||||
String thirdPartyType = relation.getThirdPartyType();
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), thirdPartyType)) {
|
||||
// 联联平台
|
||||
// 推送订单信息
|
||||
lianLianService.pushOrderInfo(orderBasicInfo.getOrderCode());
|
||||
// 推送充电订单信息
|
||||
lianLianService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getCode(), thirdPartyType)) {
|
||||
// 中电联
|
||||
zdlService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getCode(), thirdPartyType)) {
|
||||
// 江苏平台
|
||||
// 推送订单信息
|
||||
nrService.pushOrderInfo(orderBasicInfo.getOrderCode());
|
||||
}
|
||||
// 调用相关接口
|
||||
} catch (Exception e) {
|
||||
log.error("联联平台 推送订单信息发生异常", e);
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
|
||||
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.enums.ykc.OrderStatusEnum;
|
||||
import com.jsowell.common.enums.ykc.YKCPileFaultReasonEnum;
|
||||
import com.jsowell.common.util.BytesUtil;
|
||||
@@ -19,6 +20,7 @@ import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||
import io.netty.channel.Channel;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -69,6 +71,9 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
@Autowired
|
||||
private ZDLService zdlService;
|
||||
|
||||
@Autowired
|
||||
private NRService nrService;
|
||||
|
||||
@Override
|
||||
public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) {
|
||||
log.info("[===获取桩上传的实时监测数据===] param:{}, channel:{}", JSONObject.toJSONString(ykcDataProtocol), channel.toString());
|
||||
@@ -318,7 +323,7 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
return null;
|
||||
}
|
||||
String pileConnectorCode = pileSn + connectorCode;
|
||||
if (StringUtils.equals("1", relationInfo.getThirdPartyType())) {
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), relationInfo.getThirdPartyType())) {
|
||||
// 联联
|
||||
log.info("推送联联平台实时数据 params: orderBasicInfo:{}", JSON.toJSONString(orderInfo));
|
||||
// 设备状态变化推送 notification_stationStatus
|
||||
@@ -329,11 +334,17 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
||||
}
|
||||
// 推送充电状态
|
||||
lianLianService.pushChargeStatus(orderInfo.getOrderCode());
|
||||
}else if (StringUtils.equals("2", relationInfo.getThirdPartyType())) {
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getCode(), relationInfo.getThirdPartyType())) {
|
||||
// 中电联
|
||||
log.info("推送中电联平台实时数据 params: orderBasicInfo:{}", JSON.toJSONString(orderInfo));
|
||||
zdlService.notificationStationStatus(pileConnectorCode, connectorStatus);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getCode(), relation.getThirdPartyType())) {
|
||||
// 江苏省平台
|
||||
String result = nrService.pushPileStatus(realTimeMonitorData);
|
||||
log.info("推送江苏省平台实时数据 result:{}", result);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("推送第三方平台 实时数据 异常", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user