mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-20 23:29:48 +08:00
update 宁波市平台
This commit is contained in:
@@ -173,11 +173,11 @@ public class CommonService {
|
|||||||
// result = lianLianService.pushStationInfo(dto);
|
// result = lianLianService.pushStationInfo(dto);
|
||||||
result = lianLianService.pushStationInfoV2(dto);
|
result = lianLianService.pushStationInfoV2(dto);
|
||||||
}
|
}
|
||||||
if (StringUtils.equals(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode(), dto.getThirdPartyType())) {
|
// if (StringUtils.equals(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode(), dto.getThirdPartyType())) {
|
||||||
// 中电联
|
// // 中电联
|
||||||
// result = zdlService.pushStationInfo(dto);
|
// // result = zdlService.pushStationInfo(dto);
|
||||||
result = zdlService.pushStationInfoV2(dto);
|
// result = zdlService.pushStationInfoV2(dto);
|
||||||
}
|
// }
|
||||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode(), dto.getThirdPartyType())) {
|
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode(), dto.getThirdPartyType())) {
|
||||||
// 江苏省平台
|
// 江苏省平台
|
||||||
// result = nrService.pushStationInfo(dto);
|
// result = nrService.pushStationInfo(dto);
|
||||||
@@ -259,12 +259,12 @@ public class CommonService {
|
|||||||
lianLianService.pushChargeStatus(orderInfo.getOrderCode());
|
lianLianService.pushChargeStatus(orderInfo.getOrderCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.equals(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode(), thirdPartyType)) {
|
// if (StringUtils.equals(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||||
// 中电联
|
// // 中电联
|
||||||
dto.setThirdPartyType(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode());
|
// dto.setThirdPartyType(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode());
|
||||||
// log.info("推送中电联平台实时数据 pileConnectorCode:{}, connectorStatus:{}", pileConnectorCode, connectorStatus);
|
// // log.info("推送中电联平台实时数据 pileConnectorCode:{}, connectorStatus:{}", pileConnectorCode, connectorStatus);
|
||||||
zdlService.notificationStationStatus(dto);
|
// zdlService.notificationStationStatus(dto);
|
||||||
}
|
// }
|
||||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode(), thirdPartyType)) {
|
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||||
// 先判断缓存中是否有数据
|
// 先判断缓存中是否有数据
|
||||||
String redisKey = CacheConstants.JIANGSU_PUSH_PILE_STATUS + pileConnectorCode;
|
String redisKey = CacheConstants.JIANGSU_PUSH_PILE_STATUS + pileConnectorCode;
|
||||||
@@ -455,10 +455,10 @@ public class CommonService {
|
|||||||
// 推送充电订单信息
|
// 推送充电订单信息
|
||||||
lianLianService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
lianLianService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
||||||
}
|
}
|
||||||
if (StringUtils.equals(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode(), thirdPartyType)) {
|
// if (StringUtils.equals(ThirdPlatformTypeEnum.NING_BO_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||||
// 中电联
|
// // 中电联
|
||||||
zdlService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
// zdlService.pushChargeOrderInfo(orderBasicInfo.getOrderCode());
|
||||||
}
|
// }
|
||||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode(), thirdPartyType)) {
|
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||||
// 江苏平台
|
// 江苏平台
|
||||||
// 推送订单信息
|
// 推送订单信息
|
||||||
|
|||||||
@@ -163,12 +163,13 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String notificationStationInfo(String stationId) {
|
public String notificationStationInfo(String stationId) {
|
||||||
|
List<SupStationInfo> stationInfos = new ArrayList<>();
|
||||||
// 通过id查询站点相关信息
|
// 通过id查询站点相关信息
|
||||||
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.parseLong(stationId));
|
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.parseLong(stationId));
|
||||||
// 查询相关配置信息
|
// 查询相关配置信息
|
||||||
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
||||||
|
|
||||||
String operatorId = ningBoSecretInfoVO.getTheirOperatorId();
|
String operatorId = ningBoSecretInfoVO.getOurOperatorId();
|
||||||
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
||||||
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
||||||
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
||||||
@@ -214,25 +215,18 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
|
|||||||
if (CollectionUtils.isNotEmpty(pileList)) {
|
if (CollectionUtils.isNotEmpty(pileList)) {
|
||||||
info.setEquipmentInfos(pileList); // 充电设备信息列表
|
info.setEquipmentInfos(pileList); // 充电设备信息列表
|
||||||
}
|
}
|
||||||
|
stationInfos.add(info);
|
||||||
|
|
||||||
// 调用中电联平台接口
|
// 调用中电联平台接口
|
||||||
String url = urlAddress + "notification_stationInfo";
|
String url = urlAddress + "notification_stationInfo";
|
||||||
|
|
||||||
JSONObject data = new JSONObject();
|
JSONObject data = new JSONObject();
|
||||||
data.put("StationInfo", info);
|
data.put("StationInfos", stationInfos);
|
||||||
|
|
||||||
String jsonString = JSON.toJSONString(data);
|
String jsonString = JSON.toJSONString(data);
|
||||||
System.out.println("jsonString : " + jsonString);
|
System.out.println("jsonString : " + jsonString);
|
||||||
|
|
||||||
// 获取令牌
|
// 获取令牌
|
||||||
ZDLGetTokenDTO tokenDTO = ZDLGetTokenDTO.builder()
|
|
||||||
.urlAddress(urlAddress)
|
|
||||||
.operatorId(operatorId)
|
|
||||||
.operatorSecret(operatorSecret)
|
|
||||||
.dataSecret(dataSecret)
|
|
||||||
.dataSecretIv(dataSecretIv)
|
|
||||||
.signSecret(signSecret)
|
|
||||||
.build();
|
|
||||||
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||||
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||||
|
|
||||||
@@ -261,7 +255,6 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
|
|||||||
List<SupStationInfo> resultList = new ArrayList<>();
|
List<SupStationInfo> resultList = new ArrayList<>();
|
||||||
for (ThirdPartyStationInfoVO pileStationInfo : pageInfo.getList()) {
|
for (ThirdPartyStationInfoVO pileStationInfo : pageInfo.getList()) {
|
||||||
SupStationInfo stationInfo = new SupStationInfo();
|
SupStationInfo stationInfo = new SupStationInfo();
|
||||||
String stationId = String.valueOf(pileStationInfo.getId());
|
|
||||||
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
||||||
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
||||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||||
@@ -475,16 +468,13 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 枪口状态变化 notification_station_status
|
* 枪口状态变化 notification_station_status
|
||||||
* @param dto
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String notificationStationStatus(PushRealTimeInfoDTO dto) {
|
public String notificationStationStatus(String stationId, String pileConnectorCode, String status, ThirdPartySecretInfoVO secretInfoVO) {
|
||||||
String pileConnectorCode = dto.getPileConnectorCode();
|
|
||||||
String status = dto.getStatus();
|
|
||||||
|
|
||||||
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
||||||
String operatorId = ningBoSecretInfoVO.getTheirOperatorId();
|
String operatorId = ningBoSecretInfoVO.getOurOperatorId();
|
||||||
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
||||||
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
||||||
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
||||||
@@ -516,17 +506,16 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
|
|||||||
* @throws CryptoException
|
* @throws CryptoException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String notificationChargeOrderInfo(String orderCode) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException, CryptoException {
|
public String notificationChargeOrderInfo(String orderCode, ThirdPartySecretInfoVO thirdPartySecretInfoVO) {
|
||||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||||
|
|
||||||
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
String operatorId = thirdPartySecretInfoVO.getOurOperatorId();
|
||||||
String operatorId = ningBoSecretInfoVO.getTheirOperatorId();
|
String operatorSecret = thirdPartySecretInfoVO.getTheirOperatorSecret();
|
||||||
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
String signSecret = thirdPartySecretInfoVO.getTheirSigSecret();
|
||||||
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
String dataSecret = thirdPartySecretInfoVO.getTheirDataSecret();
|
||||||
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
String dataSecretIv = thirdPartySecretInfoVO.getTheirDataSecretIv();
|
||||||
String dataSecretIv = ningBoSecretInfoVO.getTheirDataSecretIv();
|
String urlAddress = thirdPartySecretInfoVO.getTheirUrlPrefix();
|
||||||
String urlAddress = ningBoSecretInfoVO.getTheirUrlPrefix();
|
|
||||||
|
|
||||||
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_CHARGE_ORDER_INFO.getValue();
|
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_CHARGE_ORDER_INFO.getValue();
|
||||||
Date chargeStartTime = orderBasicInfo.getChargeStartTime();
|
Date chargeStartTime = orderBasicInfo.getChargeStartTime();
|
||||||
@@ -799,7 +788,7 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
||||||
String operatorId = ningBoSecretInfoVO.getTheirOperatorId();
|
String operatorId = ningBoSecretInfoVO.getOurOperatorId();
|
||||||
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
||||||
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
||||||
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
||||||
@@ -836,7 +825,7 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
||||||
String operatorId = ningBoSecretInfoVO.getTheirOperatorId();
|
String operatorId = ningBoSecretInfoVO.getOurOperatorId();
|
||||||
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
||||||
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
||||||
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
||||||
@@ -874,7 +863,7 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
|
|||||||
// 查询相关配置信息
|
// 查询相关配置信息
|
||||||
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
ThirdPartySecretInfoVO ningBoSecretInfoVO = getNingBoSecretInfoVO();
|
||||||
|
|
||||||
String operatorId = ningBoSecretInfoVO.getTheirOperatorId();
|
String operatorId = ningBoSecretInfoVO.getOurOperatorId();
|
||||||
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
String operatorSecret = ningBoSecretInfoVO.getTheirOperatorSecret();
|
||||||
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
String signSecret = ningBoSecretInfoVO.getTheirSigSecret();
|
||||||
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
String dataSecret = ningBoSecretInfoVO.getTheirDataSecret();
|
||||||
|
|||||||
Reference in New Issue
Block a user