mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
新增 新电途相关Service
This commit is contained in:
116
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/XDTService.java
vendored
Normal file
116
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/XDTService.java
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
package com.jsowell.thirdparty.xindiantu.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.lianlian.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 新电途Service
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2023/12/27 14:27:42
|
||||
*/
|
||||
public interface XDTService {
|
||||
/**
|
||||
* 获取令牌
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public String getToken(ZDLGetTokenDTO dto);
|
||||
|
||||
/**
|
||||
* 生成token
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> generateToken(CommonParamsDTO dto) throws UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* 查询站点信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 查询统计信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStationStats(QueryStationInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryEquipAuth(QueryEquipmentDTO dto);
|
||||
|
||||
/**
|
||||
* 请求开始充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStartCharge(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 查询业务策略信息结果
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
String notificationStationStatus(String pileConnectorCode, String status);
|
||||
|
||||
/**
|
||||
* 推送充电订单信息
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String pushChargeOrderInfo(String orderCode);
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* @param dto
|
||||
*/
|
||||
Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto);
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStopCharge(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @return
|
||||
*/
|
||||
String notificationStartChargeResult(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送停止充电结果(仅在 0x19的帧类型中调用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notificationStopChargeResult(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notificationEquipChargeStatus(String orderCode) throws UnsupportedEncodingException;
|
||||
}
|
||||
166
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/impl/XDTServiceImpl.java
vendored
Normal file
166
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/impl/XDTServiceImpl.java
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
package com.jsowell.thirdparty.xindiantu.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.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
|
||||
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/12/28 11:02:42
|
||||
*/
|
||||
@Service
|
||||
public class XDTServiceImpl implements XDTService {
|
||||
@Autowired
|
||||
private ZDLService zdlService;
|
||||
|
||||
/**
|
||||
* 获取令牌
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getToken(ZDLGetTokenDTO dto) {
|
||||
return zdlService.ZDLGetToken(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成token
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> generateToken(CommonParamsDTO dto) throws UnsupportedEncodingException {
|
||||
return zdlService.generateToken(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
||||
return zdlService.queryStationsInfo(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询统计信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStationStats(QueryStationInfoDTO dto) {
|
||||
return zdlService.queryStationStats(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipAuth(QueryEquipmentDTO dto) {
|
||||
return zdlService.queryEquipAuth(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求开始充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStartCharge(QueryStartChargeDTO dto) {
|
||||
return zdlService.queryStartCharge(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务策略信息结果
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto) {
|
||||
return zdlService.queryEquipBusinessPolicy(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationStatus(String pileConnectorCode, String status) {
|
||||
return zdlService.notificationStationStatus(pileConnectorCode, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送充电订单信息
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String pushChargeOrderInfo(String orderCode) {
|
||||
return zdlService.pushChargeOrderInfo(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto) {
|
||||
return zdlService.queryEquipChargeStatus(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStopCharge(QueryStartChargeDTO dto) {
|
||||
return zdlService.queryStopCharge(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStartChargeResult(String orderCode) {
|
||||
return zdlService.notificationStartChargeResult(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送停止充电结果(仅在 0x19的帧类型中调用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStopChargeResult(String orderCode) {
|
||||
return zdlService.notificationStopChargeResult(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationEquipChargeStatus(String orderCode) throws UnsupportedEncodingException {
|
||||
return zdlService.notificationEquipChargeStatus(orderCode);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.jsowell.thirdparty.zhongdianlian.service;
|
||||
|
||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
|
||||
|
||||
@@ -77,4 +76,58 @@ public interface ZDLService {
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> generateToken(CommonParamsDTO dto) throws UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryEquipAuth(QueryEquipmentDTO dto);
|
||||
|
||||
/**
|
||||
* 请求开始充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStartCharge(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 查询业务策略信息结果
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* @param dto
|
||||
*/
|
||||
Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto);
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStopCharge(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @return
|
||||
*/
|
||||
String notificationStartChargeResult(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送停止充电结果(仅在 0x19的帧类型中调用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notificationStopChargeResult(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notificationEquipChargeStatus(String orderCode) throws UnsupportedEncodingException;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,7 @@ import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.util.PageUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
||||
@@ -333,6 +332,84 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
return lianLianService.generateToken(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 查询业务策略信息结果
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto) {
|
||||
return lianLianService.query_equip_charge_status(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStopCharge(QueryStartChargeDTO dto) {
|
||||
return lianLianService.query_stop_charge(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStartChargeResult(String orderCode) {
|
||||
return lianLianService.pushStartChargeResult(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送停止充电结果(仅在 0x19的帧类型中调用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStopChargeResult(String orderCode) {
|
||||
return lianLianService.pushStopChargeResult(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationEquipChargeStatus(String orderCode) throws UnsupportedEncodingException {
|
||||
return lianLianService.pushChargeStatus(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取桩列表信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user