update 第三方平台接口

This commit is contained in:
Lemon
2023-10-31 14:31:42 +08:00
parent babcc5cedd
commit f250ff3ca1
8 changed files with 304 additions and 13 deletions

View File

@@ -605,7 +605,7 @@ public class LianLianServiceImpl implements LianLianService {
// 平台已存在订单
return null;
}
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorID());
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
if (configInfo == null) {
return null;
}
@@ -737,7 +737,7 @@ public class LianLianServiceImpl implements LianLianService {
if (orderInfo == null) {
return null;
}
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorID());
ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId());
if (configInfo == null) {
return null;
}
@@ -752,6 +752,8 @@ public class LianLianServiceImpl implements LianLianService {
vo.setStartChargeSeq(orderCode);
vo.setStartChargeSeqStat(3); // 3-停止中
}
vo.setSuccStat(0);
vo.setFailReason(0);
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
// 加密数据

View File

@@ -0,0 +1,12 @@
package com.jsowell.thirdparty.yongchengboche.dto;
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
/**
* TODO
*
* @author Lemon
* @Date 2023/10/30 15:49:51
*/
public class YCBCGetTokenDTO extends ZDLGetTokenDTO {
}

View File

@@ -0,0 +1,18 @@
package com.jsowell.thirdparty.yongchengboche.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
import lombok.Data;
/**
* 甬城泊车通用请求参数DTO
*
* @author Lemon
* @Date 2023/10/30 15:53:35
*/
@Data
public class YCCommonParamsDTO extends CommonParamsDTO {
@JsonProperty(value = "AccessName")
private String accessName;
}

View File

@@ -0,0 +1,105 @@
package com.jsowell.thirdparty.yongchengboche.service;
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
import com.jsowell.pile.dto.QueryEquipmentDTO;
import com.jsowell.pile.dto.QueryStartChargeDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
import java.io.UnsupportedEncodingException;
import java.util.Map;
/**
* 甬城泊车 Service
*
* @author Lemon
* @Date 2023/10/30 15:44:09
*/
public interface YCBCService {
/**
* 获取令牌
* @param dto
* @return
*/
public String YCBCGetToken(YCBCGetTokenDTO dto);
/**
* 查询站点信息
* @param dto
* @return
*/
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto);
/**
* 设备接口状态查询
* 此接口用于批量查询设备实时状态
*
* @param dto
* @return
*/
Map<String, String> queryStationStatus(QueryStationInfoDTO dto);
/**
* 设备状态变化推送
* @param pileConnectorCode
* @param status
* @return
*/
String notificationStationStatus(String pileConnectorCode, String status);
/**
* 请求设备认证
* @param dto
* @return
*/
Map<String, String> queryEquipAuth(QueryEquipmentDTO dto);
/**
* 请求开始充电
* @param dto
* @return
*/
Map<String, String> queryStartCharge(QueryStartChargeDTO dto);
/**
* 推送启动充电结果
* @return
*/
String pushStartChargeResult(String orderCode);
/**
* 查询充电状态
* @param dto
*/
Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto);
/**
* 推送充电状态
* @param orderCode
* @return
*/
String pushChargeStatus(String orderCode) throws UnsupportedEncodingException;
/**
* 请求停止充电
* @param dto
* @return
*/
Map<String, String> queryStopCharge(QueryStartChargeDTO dto);
/**
* 推送停止充电结果(仅在 0x19的帧类型中调用)
* @param orderCode
* @return
*/
String pushStopChargeResult(String orderCode);
/**
* 推送充电订单信息
* @param orderCode
* @return
*/
String pushChargeOrderInfo(String orderCode);
}

View File

@@ -0,0 +1,154 @@
package com.jsowell.thirdparty.yongchengboche.service.impl;
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
import com.jsowell.pile.dto.QueryEquipmentDTO;
import com.jsowell.pile.dto.QueryStartChargeDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.thirdparty.lianlian.service.LianLianService;
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.UnsupportedEncodingException;
import java.util.Map;
/**
* 甬城泊车 Service
*
* @author Lemon
* @Date 2023/10/30 15:44:58
*/
@Service
public class YCBCServiceImpl implements YCBCService {
@Autowired
private ZDLService zdlService;
@Autowired
private LianLianService lianLianService;
/**
* 获取令牌
* @param dto
* @return
*/
@Override
public String YCBCGetToken(YCBCGetTokenDTO dto) {
return zdlService.ZDLGetToken(dto);
}
/**
* 获取充电站信息
* @param dto
* @return
*/
@Override
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
return zdlService.queryStationsInfo(dto);
}
/**
* 设备接口状态查询
* @param dto
* @return
*/
@Override
public Map<String, String> queryStationStatus(QueryStationInfoDTO dto) {
return zdlService.queryStationStatus(dto);
}
/**
* 设备状态变化推送
* @param pileConnectorCode
* @param status
* @return
*/
@Override
public String notificationStationStatus(String pileConnectorCode, String status) {
return zdlService.notificationStationStatus(pileConnectorCode, status);
}
/**
* 请求设备认证
* @param dto
* @return
*/
@Override
public Map<String, String> queryEquipAuth(QueryEquipmentDTO dto) {
return lianLianService.query_equip_auth(dto);
}
/**
* 请求开始充电
* @param dto
* @return
*/
@Override
public Map<String, String> queryStartCharge(QueryStartChargeDTO dto) {
return lianLianService.query_start_charge(dto);
}
/**
* 推送启动充电结果
* @return
*/
@Override
public String pushStartChargeResult(String orderCode) {
return lianLianService.pushStartChargeResult(orderCode);
}
/**
* 查询充电状态
* @param dto
*/
@Override
public Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto) {
return lianLianService.query_equip_charge_status(dto);
}
/**
* 推送充电状态
* @param orderCode
* @return
*/
@Override
public String pushChargeStatus(String orderCode) throws UnsupportedEncodingException {
return lianLianService.pushChargeStatus(orderCode);
}
/**
* 请求停止充电
* @param dto
* @return
*/
@Override
public Map<String, String> queryStopCharge(QueryStartChargeDTO dto) {
return lianLianService.query_stop_charge(dto);
}
/**
* 推送停止充电结果(仅在 0x19的帧类型中调用)
* @param orderCode
* @return
*/
@Override
public String pushStopChargeResult(String orderCode) {
return lianLianService.pushStopChargeResult(orderCode);
}
/**
* 推送充电订单信息
* @param orderCode
* @return
*/
@Override
public String pushChargeOrderInfo(String orderCode) {
return lianLianService.pushChargeOrderInfo(orderCode);
}
}