mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -19,6 +19,7 @@ import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.PileBasicInfo;
|
||||
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
|
||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.ThirdPartyCommonStartChargeDTO;
|
||||
import com.jsowell.pile.dto.ThirdPartyCommonStopChargeDTO;
|
||||
@@ -223,6 +224,9 @@ public class CommonService {
|
||||
String pileConnectorCode = pileSn + connectorCode;
|
||||
// 将枪口状态转换成对接平台的状态
|
||||
String changedStatus = changeConnectorStatus(connectorStatus, realTimeMonitorData.getPutGunType());
|
||||
PushRealTimeInfoDTO dto = new PushRealTimeInfoDTO();
|
||||
dto.setPileConnectorCode(pileConnectorCode);
|
||||
dto.setStatus(changedStatus);
|
||||
for (ThirdPartyStationRelationVO vo : list) {
|
||||
String thirdPartyType = vo.getThirdPartyType();
|
||||
if (StringUtils.equals(Constants.ONE, vo.getStartMode())) {
|
||||
@@ -237,7 +241,8 @@ public class CommonService {
|
||||
}
|
||||
// log.info("推送联联平台实时数据 params: orderBasicInfo:{}", JSON.toJSONString(orderInfo));
|
||||
// 设备状态变化推送 notification_stationStatus
|
||||
lianLianService.pushConnectorStatus(pileConnectorCode, changedStatus);
|
||||
dto.setThirdPartyType(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getTypeCode());
|
||||
lianLianService.pushConnectorStatus(dto);
|
||||
if (StringUtils.equals(connectorStatus, "03")) {
|
||||
// 充电中
|
||||
lianLianService.pushPileChargeStatusChange(orderInfo.getOrderCode());
|
||||
@@ -247,14 +252,17 @@ public class CommonService {
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||
// 中电联
|
||||
dto.setThirdPartyType(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getTypeCode());
|
||||
// log.info("推送中电联平台实时数据 pileConnectorCode:{}, connectorStatus:{}", pileConnectorCode, connectorStatus);
|
||||
zdlService.notificationStationStatus(pileConnectorCode, changedStatus);
|
||||
zdlService.notificationStationStatus(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||
// 先判断缓存中是否有数据
|
||||
String redisKey = CacheConstants.JIANGSU_PUSH_PILE_STATUS + pileConnectorCode;
|
||||
Object cacheObject = redisCache.getCacheObject(redisKey);
|
||||
|
||||
dto.setThirdPartyType(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode());
|
||||
realTimeMonitorData.setThirdPartyType(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode());
|
||||
// 江苏省平台(充电状态至少一分钟推送一次)
|
||||
if (StringUtils.equals(connectorStatus, "03")) {
|
||||
// 充电状态
|
||||
@@ -276,8 +284,9 @@ public class CommonService {
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode(), thirdPartyType)) {
|
||||
// 新电途平台
|
||||
log.info("新电途平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}", pileConnectorCode, changedStatus);
|
||||
String result1 = xdtService.notificationStationStatus(pileConnectorCode, changedStatus);
|
||||
dto.setThirdPartyType(ThirdPlatformTypeEnum.XIN_DIAN_TU.getTypeCode());
|
||||
log.info("新电途平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
|
||||
String result1 = xdtService.notificationStationStatus(dto);
|
||||
log.info("新电途平台设备状态变化推送 result:{}", result1);
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
||||
if (orderInfo == null) {
|
||||
@@ -298,13 +307,15 @@ public class CommonService {
|
||||
// }
|
||||
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)) {
|
||||
// 甬城泊车
|
||||
dto.setThirdPartyType(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode());
|
||||
// log.info("推送甬城泊车平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}", pileConnectorCode, changedStatus);
|
||||
// 设备状态变化推送 notification_stationStatus
|
||||
String result1 = ycbcService.notificationStationStatus(pileConnectorCode, changedStatus);
|
||||
String result1 = ycbcService.notificationStationStatus(dto);
|
||||
// log.info("推送甬城泊车平台设备状态变化推送 result:{}", result1);
|
||||
// 推送充电状态
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByTransactionCode(transactionCode);
|
||||
@@ -319,9 +330,9 @@ public class CommonService {
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode(), thirdPartyType)) {
|
||||
// 青海省平台
|
||||
String result = qingHaiPlatformService.notificationStationStatus(pileConnectorCode, changedStatus);
|
||||
log.info("推送青海平台设备状态变化推送 pileConnectorCode:{}, changedStatus:{}, result:{}"
|
||||
, pileConnectorCode, changedStatus, result);
|
||||
dto.setThirdPartyType(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode());
|
||||
String result = qingHaiPlatformService.notificationStationStatus(dto);
|
||||
log.info("推送青海平台设备状态变化推送 params:{}", JSON.toJSONString(dto));
|
||||
// 先判断缓存中是否有数据
|
||||
String redisKey = CacheConstants.JIANGSU_PUSH_PILE_STATUS + pileConnectorCode;
|
||||
Object cacheObject = redisCache.getCacheObject(redisKey);
|
||||
@@ -425,9 +436,9 @@ public class CommonService {
|
||||
* @return
|
||||
*/
|
||||
public String commonPushStartChargeResult(OrderBasicInfo orderBasicInfo) {
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过第三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
|
||||
@@ -64,11 +64,10 @@ public interface HuaWeiService {
|
||||
*
|
||||
* notification_stationStatus
|
||||
*
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
String notificationStationStatus(String pileConnectorCode, String status);
|
||||
String notificationStationStatus(PushRealTimeInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
|
||||
@@ -144,13 +144,12 @@ public class HuaWeiServiceImpl implements HuaWeiService {
|
||||
*
|
||||
* notification_stationStatus
|
||||
*
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationStatus(String pileConnectorCode, String status) {
|
||||
return zdlService.notificationStationStatus(pileConnectorCode, status);
|
||||
public String notificationStationStatus(PushRealTimeInfoDTO dto) {
|
||||
return zdlService.notificationStationStatus(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -84,11 +84,10 @@ public interface LianLianService {
|
||||
|
||||
/**
|
||||
* 推送联联平台 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
String pushConnectorStatus(String pileConnectorCode, String status);
|
||||
String pushConnectorStatus(PushRealTimeInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 推送订单信息
|
||||
|
||||
@@ -252,11 +252,11 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
|
||||
public static void main(String[] args) throws UnsupportedEncodingException {
|
||||
String dataSecret = "NHsBDtTanA60vTIu"; // SPBNJ1Z5EQNmpK08 VTAEKDPVN9CUS7WO huawei: zd4NrLWJ38XCTaqP E6gnWuz0QzBW75CR 正式:NHsBDtTanA60vTIu pJahbxk8wG79CMDB
|
||||
String dataSecretIV = "2uyE2Cgu4nVf6egc"; // peRoTcb2C7zqKeII 83UZFFRRZDYNF5CR huawei: RJJecvNTJ48SGMG7 SXejaSUx5yud8UHm 正式:2uyE2Cgu4nVf6egc y259VRq7h8RyFXmT
|
||||
String dataSecret = "YPFVz1OvAS4nSwLW"; // SPBNJ1Z5EQNmpK08 VTAEKDPVN9CUS7WO huawei: zd4NrLWJ38XCTaqP E6gnWuz0QzBW75CR 正式:NHsBDtTanA60vTIu pJahbxk8wG79CMDB
|
||||
String dataSecretIV = "5tLoP60aR9QUB5Mx"; // peRoTcb2C7zqKeII 83UZFFRRZDYNF5CR huawei: RJJecvNTJ48SGMG7 SXejaSUx5yud8UHm 正式:2uyE2Cgu4nVf6egc y259VRq7h8RyFXmT
|
||||
String signSecret = "sRjCDeokckFGpYpA"; // sRjCDeokckFGpYpA
|
||||
String dataString = "R4Z4/rHpm2PgVGuP77+mIm9DZlTITfUjBZt4yrwd6AxKF2WbKv4BWaXc9CXd/pYWn0eC0U21ej28u/QUtGfH0Q7WFLvyojDdaIda6TpQ2etI16+MtUAu/1Eoj7Fr2pTK9GpYOxzx7uS+Ou5K3WI\n" +
|
||||
"Y4gWdC6z0Hi12xEWYlBE4DfOxcJXbQ81//o7GbMAI73XeiOaewroA/VOrZ9e1WwMznWpR8rqywoIqM+51bMBFVo6K6M7WPpp5mY/2be62EgEJNoFiCBP0fCrsBLePpolACYn0lYPEq7C6AKI3Ggf1JilacE4oQ6BaleV3+5UKmcnOrwPb06h/u78FaalIU/kn2E9eWfTvAfa5h7D3bCW2OijPTzJzYTc18TewjNi/OOWE4mQDJ/R2LBDj0Uq1C72h2lYFC27xXVMl5Qqq8uI+M6pYNJn0hcm1Nrswuumv9rATFyAF4fVA2tae130IwRKtBh0zuMUbsD3Px2mc8zsw9gX59GFuZDH+n7uMLWpfg2DwWBgDF6MI0lq/KD4sJOlodEGBkqH2l4nQngYzPmGo7Ycqozi6wRljOOuXpWKDumb+Vu85byhyvfxUFGr32LacG7/s1khpEHrZWacnvBU4DYU=";
|
||||
String dataString = "5TCGlD23wkxgJDWft077y212tE2U5XyR6iMpVesNoIiNiPG6n1sRKSDss\n" +
|
||||
"QcezP+Zfzl1GnHbyTu7tm3IRvYoOg==";
|
||||
|
||||
// 解密data
|
||||
byte[] plainText = Cryptos.aesDecrypt(Encodes.decodeBase64(dataString), dataSecret.getBytes(), dataSecretIV.getBytes());
|
||||
@@ -907,18 +907,21 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
/**
|
||||
* 联联平台推送 设备状态变化推送 notification_stationStatus
|
||||
*
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@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);
|
||||
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
|
||||
// 通过站点id查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(stationVO.getId()));
|
||||
relation.setThirdPartyType(thirdPartyType);
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(stationVO.getId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -930,7 +933,6 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
String dataSecret = relationInfo.getDataSecret();
|
||||
String dataSecretIv = relationInfo.getDataSecretIv();
|
||||
String urlAddress = relationInfo.getUrlAddress();
|
||||
String thirdPartyType = relationInfo.getThirdPartyType();
|
||||
|
||||
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STATION_STATUS.getValue();
|
||||
ConnectorStatusInfo info = ConnectorStatusInfo.builder()
|
||||
@@ -945,15 +947,15 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
String result = "";
|
||||
String token = "";
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getTypeCode(), thirdPartyType)) {
|
||||
YCBCGetTokenDTO dto = new YCBCGetTokenDTO();
|
||||
dto.setOperatorId(operatorId);
|
||||
dto.setDataSecret(dataSecret);
|
||||
dto.setSignSecret(signSecret);
|
||||
dto.setUrlAddress(urlAddress);
|
||||
dto.setDataSecretIv(dataSecretIv);
|
||||
dto.setOperatorSecret(operatorSecret);
|
||||
YCBCGetTokenDTO ycbcGetTokenDTO = new YCBCGetTokenDTO();
|
||||
ycbcGetTokenDTO.setOperatorId(operatorId);
|
||||
ycbcGetTokenDTO.setDataSecret(dataSecret);
|
||||
ycbcGetTokenDTO.setSignSecret(signSecret);
|
||||
ycbcGetTokenDTO.setUrlAddress(urlAddress);
|
||||
ycbcGetTokenDTO.setDataSecretIv(dataSecretIv);
|
||||
ycbcGetTokenDTO.setOperatorSecret(operatorSecret);
|
||||
|
||||
token = ycbcService.YCBCGetToken(dto);
|
||||
token = ycbcService.YCBCGetToken(ycbcGetTokenDTO);
|
||||
result = HttpRequestUtil.YCBCSendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
|
||||
}else {
|
||||
token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
|
||||
@@ -975,9 +977,9 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过第三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -1107,7 +1109,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
}
|
||||
// 通过站点id查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -1175,9 +1177,9 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
public String pushChargeStatus(String orderCode) throws UnsupportedEncodingException {
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -1251,7 +1253,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
}
|
||||
// 通过站点id查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -1323,9 +1325,9 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -1448,9 +1450,9 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -1494,8 +1496,9 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
}
|
||||
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -1572,6 +1575,7 @@ public class LianLianServiceImpl implements LianLianService {
|
||||
// 通过站点id查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
|
||||
@@ -515,6 +515,7 @@ public class NRServiceImpl implements NRService {
|
||||
String pileConnectorCode = realTimeMonitorData.getPileSn() + realTimeMonitorData.getConnectorCode();
|
||||
String connectorStatus = realTimeMonitorData.getConnectorStatus();
|
||||
String transactionCode = realTimeMonitorData.getTransactionCode();
|
||||
String thirdPartyType = realTimeMonitorData.getThirdPartyType();
|
||||
|
||||
// 查出该桩所属哪个站点
|
||||
String pileSn = StringUtils.substring(pileConnectorCode, 0, 14);
|
||||
@@ -522,6 +523,7 @@ public class NRServiceImpl implements NRService {
|
||||
// 通过站点id查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(stationVO.getId()));
|
||||
relation.setThirdPartyType(thirdPartyType);
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
if (relationInfo == null) {
|
||||
return null;
|
||||
@@ -673,9 +675,9 @@ public class NRServiceImpl implements NRService {
|
||||
NROrderInfoVO nrOrderInfoVO = orderBasicInfoService.getNROrderInfoByOrderCode(orderCode);
|
||||
NROrderInfo nrOrderInfo = formatNROrderInfo((nrOrderInfoVO));
|
||||
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(nrOrderInfoVO.getStationId()));
|
||||
relation.setThirdPartyType(nrOrderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
if (relationInfo == null) {
|
||||
return null;
|
||||
|
||||
@@ -213,11 +213,10 @@ public interface ThirdPartyPlatformService {
|
||||
* 设备状态变化推送 notification_stationStatus
|
||||
* 推送充电设备接口状态信息 supervise_notification_station_status
|
||||
*
|
||||
* @param pileConnectorCode 充电枪口编号
|
||||
* @param status 枪口状态
|
||||
* @param dto
|
||||
* @throws UnsupportedOperationException 未实现异常
|
||||
*/
|
||||
default String notificationStationStatus(String pileConnectorCode, String status) {
|
||||
default String notificationStationStatus(PushRealTimeInfoDTO dto) {
|
||||
throw new UnsupportedOperationException("This method is not yet implemented");
|
||||
}
|
||||
|
||||
|
||||
@@ -275,15 +275,17 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
/**
|
||||
* 6.3 设备状态变化推送
|
||||
*
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationStatus(String pileConnectorCode, String status) {
|
||||
// 查出该桩所属哪个站点
|
||||
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileConnectorCode(pileConnectorCode);
|
||||
// 通过站点id查询相关配置信息
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(stationVO.getId());
|
||||
public String notificationStationStatus(PushRealTimeInfoDTO dto) {
|
||||
String thirdPartyType = dto.getThirdPartyType();
|
||||
String pileConnectorCode = dto.getPileConnectorCode();
|
||||
String status = dto.getStatus();
|
||||
// 通过第三方类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setThirdPartyType(thirdPartyType);
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
if (relationInfo == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -320,9 +322,9 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode);
|
||||
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过第三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderBasicInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
if (relationInfo == null) {
|
||||
return null;
|
||||
@@ -659,9 +661,9 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
if (orderInfo == null) {
|
||||
return null;
|
||||
}
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过第三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -853,9 +855,9 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
public String notificationEquipChargeStatus(String orderCode) {
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过第三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
@@ -958,9 +960,9 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
if (orderInfo == null) {
|
||||
return null;
|
||||
}
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过第三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.jsowell.common.util.PageUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.dto.PushOrderSettlementDTO;
|
||||
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryEquipmentDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.service.*;
|
||||
@@ -582,12 +583,15 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
* 设备状态变化推送 notification_stationStatus
|
||||
* 推送充电设备接口状态信息 supervise_notification_station_status
|
||||
*
|
||||
* @param pileConnectorCode 充电枪口编号
|
||||
* @param status 枪口状态
|
||||
* @param dto 枪口状态
|
||||
* @throws UnsupportedOperationException 未实现异常
|
||||
*/
|
||||
@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);
|
||||
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderDetail;
|
||||
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
|
||||
import com.jsowell.pile.dto.QueryOperatorInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
@@ -332,12 +333,15 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
* 设备状态变化推送 notification_stationStatus
|
||||
* 推送充电设备接口状态信息 supervise_notification_station_status
|
||||
*
|
||||
* @param pileConnectorCode 充电枪口编号
|
||||
* @param status 枪口状态
|
||||
* @param dto
|
||||
* @throws UnsupportedOperationException 未实现异常
|
||||
*/
|
||||
@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);
|
||||
PileStationVO stationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
|
||||
@@ -446,9 +450,9 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
public String notificationEquipChargeStatus(String orderCode) {
|
||||
// 根据订单号查询订单信息
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过第三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
relation.setThirdPartyType(orderInfo.getThirdPartyType());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
// ThirdPartySettingInfo settingInfo = thirdPartySettingInfoService.getInfoByStationId(Long.parseLong(orderInfo.getStationId()));
|
||||
if (relationInfo == null) {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
// 平台类型
|
||||
private final String platformType = ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询站点信息 query_stations_info
|
||||
@@ -198,12 +198,15 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
/**
|
||||
* 设备状态变化推送(在0x13中调用统一推送接口)
|
||||
* notification_stationStatus
|
||||
* @param pileConnectorCode 充电枪口编号
|
||||
* @param status 枪口状态
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@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();
|
||||
if (settingInfo == null) {
|
||||
return null;
|
||||
@@ -558,7 +561,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
// 获取青海平台配置密钥信息
|
||||
private ThirdPartyStationRelationVO getQingHaiSettingInfo() {
|
||||
// 通过站点id查询相关配置信息
|
||||
// 通过第三方平台类型查询相关配置信息
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setThirdPartyType(ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode());
|
||||
ThirdPartyStationRelationVO relationInfo = thirdPartyStationRelationService.selectRelationInfo(relation);
|
||||
|
||||
@@ -71,11 +71,10 @@ public interface XDTService {
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
String notificationStationStatus(String pileConnectorCode, String status);
|
||||
String notificationStationStatus(PushRealTimeInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 推送充电订单信息
|
||||
|
||||
@@ -131,13 +131,12 @@ public class XDTServiceImpl implements XDTService {
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationStatus(String pileConnectorCode, String status) {
|
||||
return zdlService.notificationStationStatus(pileConnectorCode, status);
|
||||
public String notificationStationStatus(PushRealTimeInfoDTO dto) {
|
||||
return zdlService.notificationStationStatus(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -46,11 +46,10 @@ public interface YCBCService {
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
String notificationStationStatus(String pileConnectorCode, String status);
|
||||
String notificationStationStatus(PushRealTimeInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
|
||||
@@ -181,13 +181,12 @@ public class YCBCServiceImpl implements YCBCService {
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationStatus(String pileConnectorCode, String status) {
|
||||
return zdlService.notificationStationStatus(pileConnectorCode, status);
|
||||
public String notificationStationStatus(PushRealTimeInfoDTO dto) {
|
||||
return zdlService.notificationStationStatus(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,11 +55,10 @@ public interface ZDLService {
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
String notificationStationStatus(String pileConnectorCode, String status);
|
||||
String notificationStationStatus(PushRealTimeInfoDTO dto);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -421,13 +421,12 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationStatus(String pileConnectorCode, String status) {
|
||||
return lianLianService.pushConnectorStatus(pileConnectorCode, status);
|
||||
public String notificationStationStatus(PushRealTimeInfoDTO dto) {
|
||||
return lianLianService.pushConnectorStatus(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user