diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/neimenggu/NMGController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/neimenggu/NMGController.java new file mode 100644 index 000000000..80d1fac58 --- /dev/null +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/neimenggu/NMGController.java @@ -0,0 +1,47 @@ +package com.jsowell.web.controller.thirdparty.neimenggu; + +import com.jsowell.common.annotation.Anonymous; +import com.jsowell.thirdparty.lianlian.common.CommonResult; +import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 内蒙古接口 + */ +@Anonymous +@RestController +@RequestMapping("/evcs") +public class NMGController { + + /** + * 获取token接口 + * http://localhost:8080/evcs/v1/query_token + */ + @PostMapping("/v1/query_token") + public CommonResult queryToken(@RequestBody CommonParamsDTO dto) { + return null; + } + + /** + * 查询运营商信息 + * 接口名称:supervise_query_operator_info + * 使用方法:由数据提供方实现此接口,数据需求方调用 + * 接口频率:每天一次或多次 + * 超时时间:120秒 + */ + @PostMapping("/v1/supervise_query_operator_info") + public CommonResult queryOperatorInfo(@RequestBody CommonParamsDTO dto) { + return null; + } + + /** + * 查询充换电站信息 + * 接口名称: supervise_query_stations_info + * 使用方法:由数据提供方实现此接口,数据需求方调用 + * 接口频率:每天一次或多次 + * 超时时间:120秒 + */ +} diff --git a/jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/ThirdPlatformTypeEnum.java b/jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/ThirdPlatformTypeEnum.java index d0ed83380..a5bb11a6f 100644 --- a/jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/ThirdPlatformTypeEnum.java +++ b/jsowell-common/src/main/java/com/jsowell/common/enums/thirdparty/ThirdPlatformTypeEnum.java @@ -18,6 +18,7 @@ public enum ThirdPlatformTypeEnum { HAI_NAN_1("7", "海南一张网(监管平台)"), HAI_NAN_2("8", "海南一张网(充电平台)"), HUA_WEI("9", "华为平台"), + NEI_MENG_GU_PLATFORM("10", "内蒙古平台"), ; private String code; diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryOperatorInfoDTO.java b/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryOperatorInfoDTO.java new file mode 100644 index 000000000..5a442133d --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryOperatorInfoDTO.java @@ -0,0 +1,9 @@ +package com.jsowell.pile.dto; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class QueryOperatorInfoDTO { +} diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/AbsInterfaceWithPlatformLogic.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/AbsInterfaceWithPlatformLogic.java index 79ebf6a51..135c8a446 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/AbsInterfaceWithPlatformLogic.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/AbsInterfaceWithPlatformLogic.java @@ -3,7 +3,6 @@ package com.jsowell.thirdparty.platform; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson2.JSON; -import com.alibaba.fastjson2.JSONObject; import com.google.common.collect.Maps; import com.jsowell.common.util.DateUtils; import com.jsowell.common.util.JWTUtils; @@ -12,10 +11,7 @@ import com.jsowell.pile.domain.PileBasicInfo; import com.jsowell.pile.domain.PileConnectorInfo; import com.jsowell.pile.domain.PileStationInfo; import com.jsowell.pile.domain.ThirdPartyPlatformConfig; -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.pile.dto.*; import com.jsowell.pile.service.*; import com.jsowell.pile.vo.web.PileModelInfoVO; import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO; @@ -78,28 +74,45 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean @Autowired protected ZDLService zdlService; + /** + * 查询运营商信息 + * @param dto 查询运营商信息DTO + */ + public abstract Map queryOperatorInfo(QueryOperatorInfoDTO dto); + /** * 6.2 查询充电站信息 + * + * @param dto 查询站点信息dto */ public abstract Map queryStationsInfo(QueryStationInfoDTO dto); /** * 6.3 设备状态变化推送 + * + * @param pileConnectorCode 充电枪口编号 + * @param status 枪口状态 */ public abstract String notificationStationStatus(String pileConnectorCode, String status); /** * 6.4 充电订单推送 + * + * @param orderCode 订单编号 */ public abstract String pushChargeOrderInfo(String orderCode); /** * 6.5 设备接口状态查询 + * + * @param dto 查询站点信息dto */ public abstract Map queryStationStatus(QueryStationInfoDTO dto); /** * 查询统计信息 + * + * @param dto 查询站点信息dto */ public abstract Map queryStationStats(QueryStationInfoDTO dto); @@ -109,46 +122,64 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean /** * 请求设备认证 * 业务信息交换 + * + * @param dto 联联平台请求设备认证 */ public abstract Map queryEquipAuth(QueryEquipmentDTO dto); /** * 查询业务策略信息结果 + * + * @param dto 请求启动充电DTO */ public abstract Map queryEquipBusinessPolicy(QueryStartChargeDTO dto); /** * 请求启动充电 + * + * @param dto 请求启动充电DTO */ public abstract Map queryStartCharge(QueryStartChargeDTO dto); /** * 推送启动充电结果 + * + * @param orderCode 订单编号 */ public abstract String notificationStartChargeResult(String orderCode); /** * 查询充电状态 + * + * @param dto 查询充电状态DTO */ public abstract Map queryEquipChargeStatus(QueryEquipChargeStatusDTO dto); /** * 推送充电状态 + * + * @param orderCode 订单编号 */ public abstract String notificationEquipChargeStatus(String orderCode); /** * 请求停止充电 + * + * @param dto 请求启动充电DTO */ public abstract Map queryStopCharge(QueryStartChargeDTO dto); /** * 推送停止充电结果 + * + * @param orderCode 订单编号 */ public abstract String notificationStopChargeResult(String orderCode); /** * 推送充电订单信息 + * + * @param orderCode 订单编号 */ public abstract String notificationChargeOrderInfo(String orderCode); @@ -165,7 +196,7 @@ public abstract class AbsInterfaceWithPlatformLogic implements InitializingBean /** * 从联联平台获取令牌 * - * @param operatorId + * @param operatorId 运营商id * @param operatorSecret * @return */ diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/domain/SupOperatorInfo.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/domain/SupOperatorInfo.java new file mode 100644 index 000000000..a09bb2936 --- /dev/null +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/domain/SupOperatorInfo.java @@ -0,0 +1,74 @@ +package com.jsowell.thirdparty.platform.neimenggu.domain; + +import lombok.Getter; +import lombok.Setter; + +/** + * 内蒙古平台运营商信息 + */ +@Getter +@Setter +public class SupOperatorInfo { + /** + * 名称: 运营商ID + * 描述: 统一社会信用代码后十位的前九位 + * 必填: 是 + * 类型: 字符串 + * 长度: 9字符 + */ + private String operatorID; + + /** + * 名称: 运营商统一社会信用代码 + * 描述: 运营商统一社会信用代码 + * 必填: 是 + * 类型: 字符串 + * 长度: 18字符 + */ + private String OperatorUSCID; + + /** + * 名称: 运营商名称 + * 描述: 运营商全称 + * 必填: 是 + * 类型: 字符串 + * 长度: ≤64字符 + */ + private String OperatorName; + + /** + * 名称: 运营商电话1 + * 描述: 运营商客服电话1 + * 必填: 是 + * 类型: 字符串 + * 长度: ≤32字符 + */ + private String OperatorTel1; + + /** + * 名称: 运营商电话2 + * 描述: 运营商客服电话2 + * 必填: 否 + * 类型: 字符串 + * 长度: ≤32字符 + */ + private String OperatorTel2; + + /** + * 名称: 运营商注册地址 + * 描述: 运营商注册地址 + * 必填: 否 + * 类型: 字符串 + * 长度: ≤64字符 + */ + private String OperatorRegAddress; + + /** + * 名称: 运营商备注 + * 描述: 备注信息 + * 必填: 否 + * 类型: 字符串 + * 长度: ≤255字符 + */ + private String OperatorNote; +} diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformLogic.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformLogic.java new file mode 100644 index 000000000..13e5e5e31 --- /dev/null +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformLogic.java @@ -0,0 +1,174 @@ +package com.jsowell.thirdparty.platform.neimenggu.service; + +import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum; +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.platform.AbsInterfaceWithPlatformLogic; +import com.jsowell.thirdparty.platform.InterfaceWithPlatformLogicFactory; + +import java.util.Map; + +/** + * 内蒙古监测平台逻辑 + */ +public class NeiMengGuPlatformLogic extends AbsInterfaceWithPlatformLogic { + + @Override + public void afterPropertiesSet() throws Exception { + InterfaceWithPlatformLogicFactory.register(ThirdPlatformTypeEnum.NEI_MENG_GU_PLATFORM.getCode(), this); + } + + /** + * 6.2 查询充电站信息 + * + * @param dto + */ + @Override + public Map queryStationsInfo(QueryStationInfoDTO dto) { + return null; + } + + /** + * 6.3 设备状态变化推送 + * + * @param pileConnectorCode + * @param status + */ + @Override + public String notificationStationStatus(String pileConnectorCode, String status) { + return null; + } + + /** + * 6.4 充电订单推送 + * + * @param orderCode + */ + @Override + public String pushChargeOrderInfo(String orderCode) { + return null; + } + + /** + * 6.5 设备接口状态查询 + * + * @param dto + */ + @Override + public Map queryStationStatus(QueryStationInfoDTO dto) { + return null; + } + + /** + * 查询统计信息 + * + * @param dto + */ + @Override + public Map queryStationStats(QueryStationInfoDTO dto) { + return null; + } + + /** + * 请求设备认证 + * 业务信息交换 + * + * @param dto + */ + @Override + public Map queryEquipAuth(QueryEquipmentDTO dto) { + return null; + } + + /** + * 查询业务策略信息结果 + * + * @param dto + */ + @Override + public Map queryEquipBusinessPolicy(QueryStartChargeDTO dto) { + return null; + } + + /** + * 请求启动充电 + * + * @param dto + */ + @Override + public Map queryStartCharge(QueryStartChargeDTO dto) { + return null; + } + + /** + * 推送启动充电结果 + * + * @param orderCode + */ + @Override + public String notificationStartChargeResult(String orderCode) { + return null; + } + + /** + * 查询充电状态 + * + * @param dto + */ + @Override + public Map queryEquipChargeStatus(QueryEquipChargeStatusDTO dto) { + return null; + } + + /** + * 推送充电状态 + * + * @param orderCode + */ + @Override + public String notificationEquipChargeStatus(String orderCode) { + return null; + } + + /** + * 请求停止充电 + * + * @param dto + */ + @Override + public Map queryStopCharge(QueryStartChargeDTO dto) { + return null; + } + + /** + * 推送停止充电结果 + * + * @param orderCode + */ + @Override + public String notificationStopChargeResult(String orderCode) { + return null; + } + + /** + * 推送充电订单信息 + * + * @param orderCode + */ + @Override + public String notificationChargeOrderInfo(String orderCode) { + return null; + } + + /** + * 推送充电订单对账信息 + */ + @Override + public Map checkChargeOrders() { + return null; + } + + +}