mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-30 20:17:59 +08:00
新增 华为相关接口调用入口
This commit is contained in:
@@ -29,6 +29,7 @@ import com.jsowell.pile.service.ThirdPartyStationRelationService;
|
|||||||
import com.jsowell.pile.service.ThirdPartySettingInfoService;
|
import com.jsowell.pile.service.ThirdPartySettingInfoService;
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import com.jsowell.service.PileService;
|
import com.jsowell.service.PileService;
|
||||||
|
import com.jsowell.thirdparty.huawei.HuaWeiService;
|
||||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||||
@@ -74,6 +75,9 @@ public class PileStationInfoController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private XDTService xdtService;
|
private XDTService xdtService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HuaWeiService huaWeiService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||||
|
|
||||||
@@ -315,6 +319,10 @@ public class PileStationInfoController extends BaseController {
|
|||||||
// 新电途平台
|
// 新电途平台
|
||||||
result = xdtService.pushStationInfo(dto);
|
result = xdtService.pushStationInfo(dto);
|
||||||
}
|
}
|
||||||
|
if(StringUtils.equals(ThirdPlatformTypeEnum.HUA_WEI.getCode(), dto.getThirdPartyType())) {
|
||||||
|
// 华为
|
||||||
|
result = huaWeiService.notificationOperationSystemInfo(dto);
|
||||||
|
}
|
||||||
response = new RestApiResponse<>(result);
|
response = new RestApiResponse<>(result);
|
||||||
}catch (BusinessException e) {
|
}catch (BusinessException e) {
|
||||||
logger.error("推送第三方平台充电站信息 error",e);
|
logger.error("推送第三方平台充电站信息 error",e);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public enum ThirdPartyOperatorIdEnum {
|
|||||||
YONG_CHENG_BO_CHE("4", "330205020"),
|
YONG_CHENG_BO_CHE("4", "330205020"),
|
||||||
NING_XIA_JIAO_TOU("5", "MA771QENX"),
|
NING_XIA_JIAO_TOU("5", "MA771QENX"),
|
||||||
XIN_DIAN_TU("6", "MA25CNM38"),
|
XIN_DIAN_TU("6", "MA25CNM38"),
|
||||||
|
HUA_WEI("7", ""),
|
||||||
;
|
;
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import com.jsowell.pile.service.programlogic.AbstractProgramLogic;
|
|||||||
import com.jsowell.pile.service.programlogic.ProgramLogicFactory;
|
import com.jsowell.pile.service.programlogic.ProgramLogicFactory;
|
||||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
|
import com.jsowell.thirdparty.huawei.HuaWeiService;
|
||||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||||
import com.jsowell.thirdparty.lutongyunting.service.LTYTService;
|
import com.jsowell.thirdparty.lutongyunting.service.LTYTService;
|
||||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||||
@@ -108,6 +109,9 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RJService rjService;
|
private RJService rjService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HuaWeiService huaWeiService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ThirdPartyParkingConfigService thirdPartyParkingConfigService;
|
private ThirdPartyParkingConfigService thirdPartyParkingConfigService;
|
||||||
|
|
||||||
@@ -718,6 +722,13 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
|
|||||||
// 推送订单信息
|
// 推送订单信息
|
||||||
xdtService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
xdtService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
||||||
}
|
}
|
||||||
|
if (StringUtils.equals(ThirdPlatformTypeEnum.HUA_WEI.getCode(), thirdPartyType)) {
|
||||||
|
// 华为
|
||||||
|
// 推送停止充电结果
|
||||||
|
huaWeiService.notificationStopChargeResult(orderBasicInfo.getOrderCode());
|
||||||
|
// 推送订单信息
|
||||||
|
huaWeiService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
|
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), thirdPartyType)) {
|
||||||
if (StringUtils.equals(orderBasicInfo.getStartMode(), StartModeEnum.THIRD_PARTY_PLATFORM.getValue())) {
|
if (StringUtils.equals(orderBasicInfo.getStartMode(), StartModeEnum.THIRD_PARTY_PLATFORM.getValue())) {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import com.jsowell.pile.service.PileConnectorInfoService;
|
|||||||
import com.jsowell.pile.service.ThirdPartyStationRelationService;
|
import com.jsowell.pile.service.ThirdPartyStationRelationService;
|
||||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||||
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
|
||||||
|
import com.jsowell.thirdparty.huawei.HuaWeiService;
|
||||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||||
import com.jsowell.thirdparty.nanrui.service.NRService;
|
import com.jsowell.thirdparty.nanrui.service.NRService;
|
||||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||||
@@ -85,6 +86,9 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private XDTService xdtService;
|
private XDTService xdtService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HuaWeiService huaWeiService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) {
|
public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) {
|
||||||
// log.info("[===获取桩上传的实时监测数据===] param:{}, channel:{}", JSONObject.toJSONString(ykcDataProtocol), channel.toString());
|
// log.info("[===获取桩上传的实时监测数据===] param:{}, channel:{}", JSONObject.toJSONString(ykcDataProtocol), channel.toString());
|
||||||
@@ -409,6 +413,15 @@ public class UploadRealTimeMonitorHandler extends AbstractHandler {
|
|||||||
String result = xdtService.notificationEquipChargeStatus(orderInfo.getOrderCode());
|
String result = xdtService.notificationEquipChargeStatus(orderInfo.getOrderCode());
|
||||||
log.info("推送新电途平台 充电状态 result:{}", result);
|
log.info("推送新电途平台 充电状态 result:{}", result);
|
||||||
}
|
}
|
||||||
|
if (StringUtils.equals(ThirdPlatformTypeEnum.HUA_WEI.getCode(), relationInfo.getThirdPartyType())) {
|
||||||
|
// 华为平台
|
||||||
|
huaWeiService.notificationStationStatus(pileConnectorCode, changedStatus);
|
||||||
|
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
||||||
|
if (orderInfo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
huaWeiService.notificationEquipChargeStatus(orderInfo.getOrderCode());
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), relationInfo.getThirdPartyType())) {
|
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), relationInfo.getThirdPartyType())) {
|
||||||
// 甬城泊车
|
// 甬城泊车
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ public interface HuaWeiService {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 平台充电设备编码同步
|
* 平台充电设备编码同步 (相当于pushStationInfo)
|
||||||
* 平台 --> 华为
|
* 平台 --> 华为
|
||||||
*
|
*
|
||||||
* notification_operation_system_info
|
* notification_operation_system_info
|
||||||
|
|||||||
@@ -108,7 +108,9 @@ public class HttpRequestUtil {
|
|||||||
String dataSecretIV, String operatorId, String sigSecret){
|
String dataSecretIV, String operatorId, String sigSecret){
|
||||||
String type = ThirdPartyOperatorIdEnum.getTypeByOperatorId(operatorId);
|
String type = ThirdPartyOperatorIdEnum.getTypeByOperatorId(operatorId);
|
||||||
String label = ThirdPlatformTypeEnum.getLabelByCode(type);
|
String label = ThirdPlatformTypeEnum.getLabelByCode(type);
|
||||||
|
if(StringUtils.isBlank(label)) {
|
||||||
|
label = operatorId + "(" + url + ")";
|
||||||
|
}
|
||||||
log.info(label + "发送请求 data:{}", data);
|
log.info(label + "发送请求 data:{}", data);
|
||||||
//加密
|
//加密
|
||||||
byte[] encryptText = Cryptos.aesEncrypt(data.getBytes(),
|
byte[] encryptText = Cryptos.aesEncrypt(data.getBytes(),
|
||||||
|
|||||||
Reference in New Issue
Block a user