mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
update 第三方平台推送方法 由通过站点id查询配置密钥改为通过对应第三方平台类型查询
This commit is contained in:
@@ -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;
|
||||
@@ -322,12 +323,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);
|
||||
@@ -436,9 +440,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);
|
||||
|
||||
Reference in New Issue
Block a user