update 第三方平台推送方法 由通过站点id查询配置密钥改为通过对应第三方平台类型查询

This commit is contained in:
Lemon
2024-04-19 15:22:31 +08:00
parent 646e88b057
commit 000b824398
25 changed files with 171 additions and 106 deletions

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous; import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum; import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse; import com.jsowell.common.response.RestApiResponse;
@@ -257,7 +258,11 @@ public class LianLianController extends BaseController {
StringUtils.isBlank(String.valueOf(dto.getStatus()))) { StringUtils.isBlank(String.valueOf(dto.getStatus()))) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
} }
String result = lianLianService.notificationStationStatus(dto.getPileConnectorCode(), dto.getStatus()); PushRealTimeInfoDTO pushRealTimeInfoDTO = new PushRealTimeInfoDTO();
pushRealTimeInfoDTO.setStatus(dto.getStatus());
pushRealTimeInfoDTO.setPileConnectorCode(dto.getPileConnectorCode());
pushRealTimeInfoDTO.setThirdPartyType(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getTypeCode());
String result = lianLianService.notificationStationStatus(pushRealTimeInfoDTO);
response = new RestApiResponse<>(result); response = new RestApiResponse<>(result);
}catch (BusinessException e) { }catch (BusinessException e) {
logger.error("联联平台设备状态变化推送 error",e); logger.error("联联平台设备状态变化推送 error",e);

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous; import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum; import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse; import com.jsowell.common.response.RestApiResponse;
@@ -482,7 +483,11 @@ public class XDTController extends BaseController {
StringUtils.isBlank(String.valueOf(dto.getStatus()))) { StringUtils.isBlank(String.valueOf(dto.getStatus()))) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
} }
String result = xdtService.notificationStationStatus(dto.getPileConnectorCode(), dto.getStatus()); PushRealTimeInfoDTO pushRealTimeInfoDTO = new PushRealTimeInfoDTO();
pushRealTimeInfoDTO.setStatus(dto.getStatus());
pushRealTimeInfoDTO.setPileConnectorCode(dto.getPileConnectorCode());
pushRealTimeInfoDTO.setThirdPartyType(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode());
String result = xdtService.notificationStationStatus(pushRealTimeInfoDTO);
response = new RestApiResponse<>(result); response = new RestApiResponse<>(result);
}catch (BusinessException e) { }catch (BusinessException e) {
logger.error("新电途平台设备状态变化推送 error",e); logger.error("新电途平台设备状态变化推送 error",e);

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous; import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum; import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse; import com.jsowell.common.response.RestApiResponse;
@@ -179,7 +180,11 @@ public class YCBCController extends BaseController {
StringUtils.isBlank(String.valueOf(dto.getStatus()))) { StringUtils.isBlank(String.valueOf(dto.getStatus()))) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
} }
String result = ycbcService.notificationStationStatus(dto.getPileConnectorCode(), dto.getStatus()); PushRealTimeInfoDTO pushRealTimeInfoDTO = new PushRealTimeInfoDTO();
pushRealTimeInfoDTO.setStatus(dto.getStatus());
pushRealTimeInfoDTO.setPileConnectorCode(dto.getPileConnectorCode());
pushRealTimeInfoDTO.setThirdPartyType(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode());
String result = ycbcService.notificationStationStatus(pushRealTimeInfoDTO);
response = new RestApiResponse<>(result); response = new RestApiResponse<>(result);
}catch (BusinessException e) { }catch (BusinessException e) {
logger.error("甬城泊车平台设备状态变化推送 error",e); logger.error("甬城泊车平台设备状态变化推送 error",e);

View File

@@ -4,12 +4,14 @@ import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous; import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum; import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse; import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.JWTUtils; import com.jsowell.common.util.JWTUtils;
import com.jsowell.common.util.StringUtils; import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.dto.PushInfoParamDTO; import com.jsowell.pile.dto.PushInfoParamDTO;
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
import com.jsowell.pile.dto.PushStationInfoDTO; import com.jsowell.pile.dto.PushStationInfoDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO; import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.thirdparty.lianlian.common.CommonResult; import com.jsowell.thirdparty.lianlian.common.CommonResult;
@@ -236,7 +238,11 @@ public class ZDLController extends BaseController {
StringUtils.isBlank(String.valueOf(dto.getStatus()))) { StringUtils.isBlank(String.valueOf(dto.getStatus()))) {
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
} }
String result = zdlService.notificationStationStatus(dto.getPileConnectorCode(), dto.getStatus()); PushRealTimeInfoDTO pushRealTimeInfoDTO = new PushRealTimeInfoDTO();
pushRealTimeInfoDTO.setStatus(dto.getStatus());
pushRealTimeInfoDTO.setPileConnectorCode(dto.getPileConnectorCode());
pushRealTimeInfoDTO.setThirdPartyType(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getTypeCode());
String result = zdlService.notificationStationStatus(pushRealTimeInfoDTO);
response = new RestApiResponse<>(result); response = new RestApiResponse<>(result);
}catch (BusinessException e) { }catch (BusinessException e) {
logger.error("中电联平台设备状态变化推送 error",e); logger.error("中电联平台设备状态变化推送 error",e);

View File

@@ -118,6 +118,8 @@ public class RealTimeMonitorData {
*/ */
private String dateTime; private String dateTime;
private String thirdPartyType;
public String getPileConnectorCode() { public String getPileConnectorCode() {
return this.pileSn + this.connectorCode; return this.pileSn + this.connectorCode;
} }

View File

@@ -111,4 +111,6 @@ public class NROrderInfo {
*/ */
@JSONField(name = "MeterValueEnd") @JSONField(name = "MeterValueEnd")
private BigDecimal meterValueEnd; private BigDecimal meterValueEnd;
private String thirdPartyType;
} }

View File

@@ -0,0 +1,19 @@
package com.jsowell.pile.dto;
import lombok.Data;
/**
* TODO
*
* @author Lemon
* @Date 2024/4/19 14:38:48
*/
@Data
public class PushRealTimeInfoDTO {
private String pileConnectorCode;
private String status;
private String thirdPartyType;
}

View File

@@ -2712,6 +2712,7 @@
SELECT SELECT
t1.station_id as stationId, t1.station_id as stationId,
t1.merchant_id, t1.merchant_id,
t1.third_party_type as thirdPartyType,
t3.organization_code AS operatorId, t3.organization_code AS operatorId,
t1.pile_connector_code AS connectorId, t1.pile_connector_code AS connectorId,
t1.order_code AS startChargeSeq, t1.order_code AS startChargeSeq,

View File

@@ -19,6 +19,7 @@ import com.jsowell.pile.domain.OrderBasicInfo;
import com.jsowell.pile.domain.PileBasicInfo; import com.jsowell.pile.domain.PileBasicInfo;
import com.jsowell.pile.domain.ThirdPartyStationRelation; import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.domain.ThirdpartyParkingConfig; import com.jsowell.pile.domain.ThirdpartyParkingConfig;
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
import com.jsowell.pile.dto.PushStationInfoDTO; import com.jsowell.pile.dto.PushStationInfoDTO;
import com.jsowell.pile.dto.ThirdPartyCommonStartChargeDTO; import com.jsowell.pile.dto.ThirdPartyCommonStartChargeDTO;
import com.jsowell.pile.dto.ThirdPartyCommonStopChargeDTO; import com.jsowell.pile.dto.ThirdPartyCommonStopChargeDTO;
@@ -223,6 +224,9 @@ public class CommonService {
String pileConnectorCode = pileSn + connectorCode; String pileConnectorCode = pileSn + connectorCode;
// 将枪口状态转换成对接平台的状态 // 将枪口状态转换成对接平台的状态
String changedStatus = changeConnectorStatus(connectorStatus, realTimeMonitorData.getPutGunType()); String changedStatus = changeConnectorStatus(connectorStatus, realTimeMonitorData.getPutGunType());
PushRealTimeInfoDTO dto = new PushRealTimeInfoDTO();
dto.setPileConnectorCode(pileConnectorCode);
dto.setStatus(changedStatus);
for (ThirdPartyStationRelationVO vo : list) { for (ThirdPartyStationRelationVO vo : list) {
String thirdPartyType = vo.getThirdPartyType(); String thirdPartyType = vo.getThirdPartyType();
if (StringUtils.equals(Constants.ONE, vo.getStartMode())) { if (StringUtils.equals(Constants.ONE, vo.getStartMode())) {
@@ -237,7 +241,8 @@ public class CommonService {
} }
// log.info("推送联联平台实时数据 params: orderBasicInfo:{}", JSON.toJSONString(orderInfo)); // log.info("推送联联平台实时数据 params: orderBasicInfo:{}", JSON.toJSONString(orderInfo));
// 设备状态变化推送 notification_stationStatus // 设备状态变化推送 notification_stationStatus
lianLianService.pushConnectorStatus(pileConnectorCode, changedStatus); dto.setThirdPartyType(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getTypeCode());
lianLianService.pushConnectorStatus(dto);
if (StringUtils.equals(connectorStatus, "03")) { if (StringUtils.equals(connectorStatus, "03")) {
// 充电中 // 充电中
lianLianService.pushPileChargeStatusChange(orderInfo.getOrderCode()); lianLianService.pushPileChargeStatusChange(orderInfo.getOrderCode());
@@ -247,14 +252,17 @@ public class CommonService {
} }
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getTypeCode(), thirdPartyType)) { if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getTypeCode(), thirdPartyType)) {
// 中电联 // 中电联
dto.setThirdPartyType(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getTypeCode());
// log.info("推送中电联平台实时数据 pileConnectorCode:{}, connectorStatus:{}", pileConnectorCode, connectorStatus); // log.info("推送中电联平台实时数据 pileConnectorCode:{}, connectorStatus:{}", pileConnectorCode, connectorStatus);
zdlService.notificationStationStatus(pileConnectorCode, changedStatus); 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;
Object cacheObject = redisCache.getCacheObject(redisKey); Object cacheObject = redisCache.getCacheObject(redisKey);
dto.setThirdPartyType(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode());
realTimeMonitorData.setThirdPartyType(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode());
// 江苏省平台(充电状态至少一分钟推送一次) // 江苏省平台(充电状态至少一分钟推送一次)
if (StringUtils.equals(connectorStatus, "03")) { if (StringUtils.equals(connectorStatus, "03")) {
// 充电状态 // 充电状态
@@ -276,8 +284,9 @@ public class CommonService {
} }
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode(), thirdPartyType)) { if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode(), thirdPartyType)) {
// 新电途平台 // 新电途平台
log.info("新电途平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}", pileConnectorCode, changedStatus); dto.setThirdPartyType(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode());
String result1 = xdtService.notificationStationStatus(pileConnectorCode, changedStatus); log.info("新电途平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
String result1 = xdtService.notificationStationStatus(dto);
log.info("新电途平台设备状态变化推送 result:{}", result1); log.info("新电途平台设备状态变化推送 result:{}", result1);
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode); OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
if (orderInfo == null) { if (orderInfo == null) {
@@ -298,13 +307,15 @@ public class CommonService {
// } // }
if (StringUtils.equals(ThirdPlatformTypeEnum.HAI_NAN_1_PLATFORM.getTypeCode(), thirdPartyType)) { if (StringUtils.equals(ThirdPlatformTypeEnum.HAI_NAN_1_PLATFORM.getTypeCode(), thirdPartyType)) {
// 海南平台 // 海南平台
haiNanChargeService.notificationStationStatus(pileConnectorCode, changedStatus); dto.setThirdPartyType(ThirdPlatformTypeEnum.HAI_NAN_1_PLATFORM.getTypeCode());
haiNanChargeService.notificationStationStatus(dto);
} }
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) { if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) {
// 甬城泊车 // 甬城泊车
dto.setThirdPartyType(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode());
// log.info("推送甬城泊车平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}", pileConnectorCode, changedStatus); // log.info("推送甬城泊车平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}", pileConnectorCode, changedStatus);
// 设备状态变化推送 notification_stationStatus // 设备状态变化推送 notification_stationStatus
String result1 = ycbcService.notificationStationStatus(pileConnectorCode, changedStatus); String result1 = ycbcService.notificationStationStatus(dto);
// log.info("推送甬城泊车平台设备状态变化推送 result:{}", result1); // log.info("推送甬城泊车平台设备状态变化推送 result:{}", result1);
// 推送充电状态 // 推送充电状态
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode); OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
@@ -319,9 +330,9 @@ public class CommonService {
} }
if (StringUtils.equals(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode(), thirdPartyType)) { if (StringUtils.equals(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode(), thirdPartyType)) {
// 青海省平台 // 青海省平台
String result = qingHaiPlatformService.notificationStationStatus(pileConnectorCode, changedStatus); dto.setThirdPartyType(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode());
log.info("推送青海平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}, result:{}" String result = qingHaiPlatformService.notificationStationStatus(dto);
, pileConnectorCode, changedStatus, result); log.info("推送青海平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
// 先判断缓存中是否有数据 // 先判断缓存中是否有数据
String redisKey = CacheConstants.JIANGSU_PUSH_PILE_STATUS + pileConnectorCode; String redisKey = CacheConstants.JIANGSU_PUSH_PILE_STATUS + pileConnectorCode;
Object cacheObject = redisCache.getCacheObject(redisKey); Object cacheObject = redisCache.getCacheObject(redisKey);
@@ -425,9 +436,9 @@ public class CommonService {
* @return * @return
*/ */
public String commonPushStartChargeResult(OrderBasicInfo orderBasicInfo) { public String commonPushStartChargeResult(OrderBasicInfo orderBasicInfo) {
// 通过站点id查询相关配置信息 // 通过第三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {

View File

@@ -64,11 +64,10 @@ public interface HuaWeiService {
* *
* notification_stationStatus * notification_stationStatus
* *
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
String notificationStationStatus(String pileConnectorCode, String status); String notificationStationStatus(PushRealTimeInfoDTO dto);
/** /**
* 请求设备认证 * 请求设备认证

View File

@@ -144,13 +144,12 @@ public class HuaWeiServiceImpl implements HuaWeiService {
* *
* notification_stationStatus * notification_stationStatus
* *
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
@Override @Override
public String notificationStationStatus(String pileConnectorCode, String status) { public String notificationStationStatus(PushRealTimeInfoDTO dto) {
return zdlService.notificationStationStatus(pileConnectorCode, status); return zdlService.notificationStationStatus(dto);
} }
/** /**

View File

@@ -84,11 +84,10 @@ public interface LianLianService {
/** /**
* 推送联联平台 设备状态变化推送 * 推送联联平台 设备状态变化推送
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
String pushConnectorStatus(String pileConnectorCode, String status); String pushConnectorStatus(PushRealTimeInfoDTO dto);
/** /**
* 推送订单信息 * 推送订单信息

View File

@@ -252,11 +252,11 @@ public class LianLianServiceImpl implements LianLianService {
public static void main(String[] args) throws UnsupportedEncodingException { public static void main(String[] args) throws UnsupportedEncodingException {
String dataSecret = "NHsBDtTanA60vTIu"; // SPBNJ1Z5EQNmpK08 VTAEKDPVN9CUS7WO huawei: zd4NrLWJ38XCTaqP E6gnWuz0QzBW75CR 正式NHsBDtTanA60vTIu pJahbxk8wG79CMDB String dataSecret = "YPFVz1OvAS4nSwLW"; // SPBNJ1Z5EQNmpK08 VTAEKDPVN9CUS7WO huawei: zd4NrLWJ38XCTaqP E6gnWuz0QzBW75CR 正式NHsBDtTanA60vTIu pJahbxk8wG79CMDB
String dataSecretIV = "2uyE2Cgu4nVf6egc"; // peRoTcb2C7zqKeII 83UZFFRRZDYNF5CR huawei: RJJecvNTJ48SGMG7 SXejaSUx5yud8UHm 正式2uyE2Cgu4nVf6egc y259VRq7h8RyFXmT String dataSecretIV = "5tLoP60aR9QUB5Mx"; // peRoTcb2C7zqKeII 83UZFFRRZDYNF5CR huawei: RJJecvNTJ48SGMG7 SXejaSUx5yud8UHm 正式2uyE2Cgu4nVf6egc y259VRq7h8RyFXmT
String signSecret = "sRjCDeokckFGpYpA"; // sRjCDeokckFGpYpA String signSecret = "sRjCDeokckFGpYpA"; // sRjCDeokckFGpYpA
String dataString = "R4Z4/rHpm2PgVGuP77+mIm9DZlTITfUjBZt4yrwd6AxKF2WbKv4BWaXc9CXd/pYWn0eC0U21ej28u/QUtGfH0Q7WFLvyojDdaIda6TpQ2etI16+MtUAu/1Eoj7Fr2pTK9GpYOxzx7uS+Ou5K3WI\n" + String dataString = "5TCGlD23wkxgJDWft077y212tE2U5XyR6iMpVesNoIiNiPG6n1sRKSDss\n" +
"Y4gWdC6z0Hi12xEWYlBE4DfOxcJXbQ81//o7GbMAI73XeiOaewroA/VOrZ9e1WwMznWpR8rqywoIqM+51bMBFVo6K6M7WPpp5mY/2be62EgEJNoFiCBP0fCrsBLePpolACYn0lYPEq7C6AKI3Ggf1JilacE4oQ6BaleV3+5UKmcnOrwPb06h/u78FaalIU/kn2E9eWfTvAfa5h7D3bCW2OijPTzJzYTc18TewjNi/OOWE4mQDJ/R2LBDj0Uq1C72h2lYFC27xXVMl5Qqq8uI+M6pYNJn0hcm1Nrswuumv9rATFyAF4fVA2tae130IwRKtBh0zuMUbsD3Px2mc8zsw9gX59GFuZDH+n7uMLWpfg2DwWBgDF6MI0lq/KD4sJOlodEGBkqH2l4nQngYzPmGo7Ycqozi6wRljOOuXpWKDumb+Vu85byhyvfxUFGr32LacG7/s1khpEHrZWacnvBU4DYU="; "QcezP+Zfzl1GnHbyTu7tm3IRvYoOg==";
// 解密data // 解密data
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes()); byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes());
@@ -907,18 +907,21 @@ public class LianLianServiceImpl implements LianLianService {
/** /**
* 联联平台推送 设备状态变化推送 notification_stationStatus * 联联平台推送 设备状态变化推送 notification_stationStatus
* *
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
@Override @Override
public String pushConnectorStatus(String pileConnectorCode, String status) { public String pushConnectorStatus(PushRealTimeInfoDTO dto) {
String pileConnectorCode = dto.getPileConnectorCode();
String status = dto.getStatus();
String thirdPartyType = dto.getThirdPartyType();
// 查出该桩所属哪个站点 // 查出该桩所属哪个站点
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14); String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn); PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
// 通过站点id查询相关配置信息 // 通过站点id查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(stationVO.getId())); relation.setStationId(Long.parseLong(stationVO.getId()));
relation.setThirdPartyType(thirdPartyType);
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationVO.getId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationVO.getId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -930,7 +933,6 @@ public class LianLianServiceImpl implements LianLianService {
String dataSecret = relationInfo.getDataSecret(); String dataSecret = relationInfo.getDataSecret();
String dataSecretIv = relationInfo.getDataSecretIv(); String dataSecretIv = relationInfo.getDataSecretIv();
String urlAddress = relationInfo.getUrlAddress(); String urlAddress = relationInfo.getUrlAddress();
String thirdPartyType = relationInfo.getThirdPartyType();
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STATION_STATUS.getValue(); String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STATION_STATUS.getValue();
ConnectorStatusInfo info = ConnectorStatusInfo.builder() ConnectorStatusInfo info = ConnectorStatusInfo.builder()
@@ -945,15 +947,15 @@ public class LianLianServiceImpl implements LianLianService {
String result = ""; String result = "";
String token = ""; String token = "";
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) { if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) {
YCBCGetTokenDTO dto = new YCBCGetTokenDTO(); YCBCGetTokenDTO ycbcGetTokenDTO = new YCBCGetTokenDTO();
dto.setOperatorId(operatorId); ycbcGetTokenDTO.setOperatorId(operatorId);
dto.setDataSecret(dataSecret); ycbcGetTokenDTO.setDataSecret(dataSecret);
dto.setSignSecret(signSecret); ycbcGetTokenDTO.setSignSecret(signSecret);
dto.setUrlAddress(urlAddress); ycbcGetTokenDTO.setUrlAddress(urlAddress);
dto.setDataSecretIv(dataSecretIv); ycbcGetTokenDTO.setDataSecretIv(dataSecretIv);
dto.setOperatorSecret(operatorSecret); ycbcGetTokenDTO.setOperatorSecret(operatorSecret);
token = ycbcService.YCBCGetToken(dto); token = ycbcService.YCBCGetToken(ycbcGetTokenDTO);
result = HttpRequestUtil.YCBCSendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret); result = HttpRequestUtil.YCBCSendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
}else { }else {
token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret); token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
@@ -975,9 +977,9 @@ public class LianLianServiceImpl implements LianLianService {
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode); OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
// 通过站点id查询相关配置信息 // 通过第三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -1107,7 +1109,7 @@ public class LianLianServiceImpl implements LianLianService {
} }
// 通过站点id查询相关配置信息 // 通过站点id查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -1175,9 +1177,9 @@ public class LianLianServiceImpl implements LianLianService {
public String pushChargeStatus(String orderCode) throws UnsupportedEncodingException { public String pushChargeStatus(String orderCode) throws UnsupportedEncodingException {
// 根据订单号查询订单信息 // 根据订单号查询订单信息
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
// 通过站点id查询相关配置信息 // 通过三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -1251,7 +1253,7 @@ public class LianLianServiceImpl implements LianLianService {
} }
// 通过站点id查询相关配置信息 // 通过站点id查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -1323,9 +1325,9 @@ public class LianLianServiceImpl implements LianLianService {
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode); OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
// 通过站点id查询相关配置信息 // 通过三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -1448,9 +1450,9 @@ public class LianLianServiceImpl implements LianLianService {
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
// 通过站点id查询相关配置信息 // 通过三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -1494,8 +1496,9 @@ public class LianLianServiceImpl implements LianLianService {
} }
// 通过站点id查询相关配置信息 // 通过站点id查询相关配置信息
// 通过三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -1572,6 +1575,7 @@ public class LianLianServiceImpl implements LianLianService {
// 通过站点id查询相关配置信息 // 通过站点id查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setStationId(Long.parseLong(orderInfo.getStationId()));
relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {

View File

@@ -515,6 +515,7 @@ public class NRServiceImpl implements NRService {
String pileConnectorCode = realTimeMonitorData.getPileSn() + realTimeMonitorData.getConnectorCode(); String pileConnectorCode = realTimeMonitorData.getPileSn() + realTimeMonitorData.getConnectorCode();
String connectorStatus = realTimeMonitorData.getConnectorStatus(); String connectorStatus = realTimeMonitorData.getConnectorStatus();
String transactionCode = realTimeMonitorData.getTransactionCode(); String transactionCode = realTimeMonitorData.getTransactionCode();
String thirdPartyType = realTimeMonitorData.getThirdPartyType();
// 查出该桩所属哪个站点 // 查出该桩所属哪个站点
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14); String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
@@ -522,6 +523,7 @@ public class NRServiceImpl implements NRService {
// 通过站点id查询相关配置信息 // 通过站点id查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(stationVO.getId())); relation.setStationId(Long.parseLong(stationVO.getId()));
relation.setThirdPartyType(thirdPartyType);
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
if (relationInfo == null) { if (relationInfo == null) {
return null; return null;
@@ -673,9 +675,9 @@ public class NRServiceImpl implements NRService {
NROrderInfoVO nrOrderInfoVO = orderBasicInfoService.getNROrderInfoByOrderCode(orderCode); NROrderInfoVO nrOrderInfoVO = orderBasicInfoService.getNROrderInfoByOrderCode(orderCode);
NROrderInfo nrOrderInfo = formatNROrderInfo((nrOrderInfoVO)); NROrderInfo nrOrderInfo = formatNROrderInfo((nrOrderInfoVO));
// 通过站点id查询相关配置信息 // 通过三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(nrOrderInfoVO.getStationId())); relation.setThirdPartyType(nrOrderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
if (relationInfo == null) { if (relationInfo == null) {
return null; return null;

View File

@@ -213,11 +213,10 @@ public interface ThirdPartyPlatformService {
* 设备状态变化推送 notification_stationStatus * 设备状态变化推送 notification_stationStatus
* 推送充电设备接口状态信息 supervise_notification_station_status * 推送充电设备接口状态信息 supervise_notification_station_status
* *
* @param pileConnectorCode 充电枪口编号 * @param dto
* @param status 枪口状态
* @throws UnsupportedOperationException 未实现异常 * @throws UnsupportedOperationException 未实现异常
*/ */
default String notificationStationStatus(String pileConnectorCode, String status) { default String notificationStationStatus(PushRealTimeInfoDTO dto) {
throw new UnsupportedOperationException("This method is not yet implemented"); throw new UnsupportedOperationException("This method is not yet implemented");
} }

View File

@@ -275,15 +275,17 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
/** /**
* 6.3 设备状态变化推送 * 6.3 设备状态变化推送
* *
* @param pileConnectorCode * @param dto
* @param status
*/ */
@Override @Override
public String notificationStationStatus(String pileConnectorCode, String status) { public String notificationStationStatus(PushRealTimeInfoDTO dto) {
// 查出该桩所属哪个站点 String thirdPartyType = dto.getThirdPartyType();
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileConnectorCode(pileConnectorCode); String pileConnectorCode = dto.getPileConnectorCode();
// 通过站点id查询相关配置信息 String status = dto.getStatus();
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(stationVO.getId()); // 通过第三方类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setThirdPartyType(thirdPartyType);
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
if (relationInfo == null) { if (relationInfo == null) {
return null; return null;
} }
@@ -320,9 +322,9 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode); OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
// 通过站点id查询相关配置信息 // 通过第三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
if (relationInfo == null) { if (relationInfo == null) {
return null; return null;
@@ -659,9 +661,9 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
if (orderInfo == null) { if (orderInfo == null) {
return null; return null;
} }
// 通过站点id查询相关配置信息 // 通过第三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -853,9 +855,9 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
public String notificationEquipChargeStatus(String orderCode) { public String notificationEquipChargeStatus(String orderCode) {
// 根据订单号查询订单信息 // 根据订单号查询订单信息
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
// 通过站点id查询相关配置信息 // 通过第三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {
@@ -958,9 +960,9 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
if (orderInfo == null) { if (orderInfo == null) {
return null; return null;
} }
// 通过站点id查询相关配置信息 // 通过第三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {

View File

@@ -21,6 +21,7 @@ import com.jsowell.common.util.PageUtils;
import com.jsowell.common.util.StringUtils; import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.*; import com.jsowell.pile.domain.*;
import com.jsowell.pile.dto.PushOrderSettlementDTO; import com.jsowell.pile.dto.PushOrderSettlementDTO;
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
import com.jsowell.pile.dto.QueryEquipmentDTO; import com.jsowell.pile.dto.QueryEquipmentDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO; import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.service.*; import com.jsowell.pile.service.*;
@@ -582,12 +583,15 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
* 设备状态变化推送 notification_stationStatus * 设备状态变化推送 notification_stationStatus
* 推送充电设备接口状态信息 supervise_notification_station_status * 推送充电设备接口状态信息 supervise_notification_station_status
* *
* @param pileConnectorCode 充电枪口编号 * @param dto 枪口状态
* @param status 枪口状态
* @throws UnsupportedOperationException 未实现异常 * @throws UnsupportedOperationException 未实现异常
*/ */
@Override @Override
public String notificationStationStatus(String pileConnectorCode, String status) { public String notificationStationStatus(PushRealTimeInfoDTO dto) {
String thirdPartyType = dto.getThirdPartyType();
String status = dto.getStatus();
String pileConnectorCode = dto.getPileConnectorCode();
// 查出该桩所属哪个站点 // 查出该桩所属哪个站点
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14); String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn); PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);

View File

@@ -20,6 +20,7 @@ import com.jsowell.pile.domain.OrderBasicInfo;
import com.jsowell.pile.domain.OrderDetail; import com.jsowell.pile.domain.OrderDetail;
import com.jsowell.pile.domain.ThirdPartyPlatformConfig; import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
import com.jsowell.pile.domain.ThirdPartyStationRelation; import com.jsowell.pile.domain.ThirdPartyStationRelation;
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO; import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
import com.jsowell.pile.dto.QueryOperatorInfoDTO; import com.jsowell.pile.dto.QueryOperatorInfoDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO; import com.jsowell.pile.dto.QueryStationInfoDTO;
@@ -322,12 +323,15 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
* 设备状态变化推送 notification_stationStatus * 设备状态变化推送 notification_stationStatus
* 推送充电设备接口状态信息 supervise_notification_station_status * 推送充电设备接口状态信息 supervise_notification_station_status
* *
* @param pileConnectorCode 充电枪口编号 * @param dto
* @param status 枪口状态
* @throws UnsupportedOperationException 未实现异常 * @throws UnsupportedOperationException 未实现异常
*/ */
@Override @Override
public String notificationStationStatus(String pileConnectorCode, String status) { public String notificationStationStatus(PushRealTimeInfoDTO dto) {
String thirdPartyType = dto.getThirdPartyType();
String status = dto.getStatus();
String pileConnectorCode = dto.getPileConnectorCode();
// 查出该桩所属哪个站点 // 查出该桩所属哪个站点
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14); String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn); PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
@@ -436,9 +440,9 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
public String notificationEquipChargeStatus(String orderCode) { public String notificationEquipChargeStatus(String orderCode) {
// 根据订单号查询订单信息 // 根据订单号查询订单信息
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
// 通过站点id查询相关配置信息 // 通过第三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setStationId(Long.parseLong(orderInfo.getStationId())); relation.setThirdPartyType(orderInfo.getThirdPartyType());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId())); // ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
if (relationInfo == null) { if (relationInfo == null) {

View File

@@ -93,7 +93,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
// 平台类型 // 平台类型
private final String platformType = ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode(); private final String platformType = ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode();
/** /**
* 查询站点信息 query_stations_info * 查询站点信息 query_stations_info
@@ -198,12 +198,15 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
/** /**
* 设备状态变化推送(在0x13中调用统一推送接口) * 设备状态变化推送(在0x13中调用统一推送接口)
* notification_stationStatus * notification_stationStatus
* @param pileConnectorCode 充电枪口编号 * @param dto
* @param status 枪口状态
* @return * @return
*/ */
@Override @Override
public String notificationStationStatus(String pileConnectorCode, String status) { public String notificationStationStatus(PushRealTimeInfoDTO dto) {
String thirdPartyType = dto.getThirdPartyType();
String status = dto.getStatus();
String pileConnectorCode = dto.getPileConnectorCode();
ThirdPartyStationRelationVO settingInfo = getQingHaiSettingInfo(); ThirdPartyStationRelationVO settingInfo = getQingHaiSettingInfo();
if (settingInfo == null) { if (settingInfo == null) {
return null; return null;
@@ -558,7 +561,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
// 获取青海平台配置密钥信息 // 获取青海平台配置密钥信息
private ThirdPartyStationRelationVO getQingHaiSettingInfo() { private ThirdPartyStationRelationVO getQingHaiSettingInfo() {
// 通过站点id查询相关配置信息 // 通过第三方平台类型查询相关配置信息
ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
relation.setThirdPartyType(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode()); relation.setThirdPartyType(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode());
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation); ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);

View File

@@ -71,11 +71,10 @@ public interface XDTService {
/** /**
* 设备状态变化推送 * 设备状态变化推送
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
String notificationStationStatus(String pileConnectorCode, String status); String notificationStationStatus(PushRealTimeInfoDTO dto);
/** /**
* 推送充电订单信息 * 推送充电订单信息

View File

@@ -131,13 +131,12 @@ public class XDTServiceImpl implements XDTService {
/** /**
* 设备状态变化推送 * 设备状态变化推送
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
@Override @Override
public String notificationStationStatus(String pileConnectorCode, String status) { public String notificationStationStatus(PushRealTimeInfoDTO dto) {
return zdlService.notificationStationStatus(pileConnectorCode, status); return zdlService.notificationStationStatus(dto);
} }
/** /**

View File

@@ -46,11 +46,10 @@ public interface YCBCService {
/** /**
* 设备状态变化推送 * 设备状态变化推送
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
String notificationStationStatus(String pileConnectorCode, String status); String notificationStationStatus(PushRealTimeInfoDTO dto);
/** /**
* 请求设备认证 * 请求设备认证

View File

@@ -181,13 +181,12 @@ public class YCBCServiceImpl implements YCBCService {
/** /**
* 设备状态变化推送 * 设备状态变化推送
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
@Override @Override
public String notificationStationStatus(String pileConnectorCode, String status) { public String notificationStationStatus(PushRealTimeInfoDTO dto) {
return zdlService.notificationStationStatus(pileConnectorCode, status); return zdlService.notificationStationStatus(dto);
} }
/** /**

View File

@@ -55,11 +55,10 @@ public interface ZDLService {
/** /**
* 设备状态变化推送 * 设备状态变化推送
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
String notificationStationStatus(String pileConnectorCode, String status); String notificationStationStatus(PushRealTimeInfoDTO dto);
/** /**

View File

@@ -421,13 +421,12 @@ public class ZDLServiceImpl implements ZDLService {
/** /**
* 设备状态变化推送 * 设备状态变化推送
* @param pileConnectorCode * @param dto
* @param status
* @return * @return
*/ */
@Override @Override
public String notificationStationStatus(String pileConnectorCode, String status) { public String notificationStationStatus(PushRealTimeInfoDTO dto) {
return lianLianService.pushConnectorStatus(pileConnectorCode, status); return lianLianService.pushConnectorStatus(dto);
} }
/** /**