From ce3c1c0e663015bbeac4db35618eb22389234501 Mon Sep 17 00:00:00 2001 From: Guoqs Date: Mon, 8 Apr 2024 11:13:13 +0800 Subject: [PATCH 1/3] update --- .../lianlian/LianLianController.java | 2 +- .../platform/ThirdPartyPlatformService.java | 15 +-- .../service/LianLianPlatformServiceImpl.java | 2 +- .../service/NeiMengGuPlatformServiceImpl.java | 102 +++++++++++++++++- 4 files changed, 102 insertions(+), 19 deletions(-) diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/lianlian/LianLianController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/lianlian/LianLianController.java index 2aab1e31c..84206e93d 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/lianlian/LianLianController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/lianlian/LianLianController.java @@ -336,7 +336,7 @@ public class LianLianController extends BaseController { if (StringUtils.isBlank(orderCode)) { throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR); } - String result = lianLianService.notificationOrderInfo(orderCode); + String result = lianLianService.notificationChargeOrderInfo(orderCode); response = new RestApiResponse<>(result); }catch (BusinessException e) { logger.error("联联平台推送订单信息 error",e); diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/ThirdPartyPlatformService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/ThirdPartyPlatformService.java index 0c5da5f41..d603f6146 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/ThirdPartyPlatformService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/ThirdPartyPlatformService.java @@ -234,15 +234,6 @@ public interface ThirdPartyPlatformService { throw new UnsupportedOperationException("This method is not yet implemented"); } - /** - * 订单信息推送 notification_orderInfo - * - * @throws UnsupportedOperationException 未实现异常 - */ - default String notificationOrderInfo(String orderCode) { - throw new UnsupportedOperationException("This method is not yet implemented"); - } - /** * 站点费率变化推送 notification_stationFee * @@ -253,11 +244,7 @@ public interface ThirdPartyPlatformService { } /** - * 充电订单推送 notification_charge_order_info - * TODO 海南一张网文档中的接口,检查一下是否和订单信息推送notification_orderInfo一致 - * TODO 甬城泊车平台文档中的接口,检查一下是否和订单信息推送notification_orderInfo一致 - * TODO 华为平台文档中的接口,检查一下是否和订单信息推送notification_orderInfo一致 - * TODO 内蒙古平台文档中的接口,检查一下是否和订单信息推送notification_orderInfo一致 + * 充电订单推送 notification_charge_order_info/notification_orderInfo * * @param orderCode 订单编号 * @throws UnsupportedOperationException 未实现异常 diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/lianlian/service/LianLianPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/lianlian/service/LianLianPlatformServiceImpl.java index a895d77af..39f876bf6 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/lianlian/service/LianLianPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/lianlian/service/LianLianPlatformServiceImpl.java @@ -682,7 +682,7 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService { * @throws UnsupportedOperationException 未实现异常 */ @Override - public String notificationOrderInfo(String orderCode) { + public String notificationChargeOrderInfo(String orderCode) { // 根据订单号查询出信息 OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformServiceImpl.java index 7563e09e8..0a7d2e1a8 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformServiceImpl.java @@ -1,15 +1,111 @@ package com.jsowell.thirdparty.platform.neimenggu.service; -import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum; +import com.jsowell.pile.dto.QueryOperatorInfoDTO; +import com.jsowell.pile.dto.QueryStationInfoDTO; import com.jsowell.thirdparty.platform.ThirdPartyPlatformService; import org.springframework.stereotype.Service; +import java.util.Map; + /** * 内蒙古监测平台逻辑 */ @Service public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService { - // 平台类型 - private final String platformType = ThirdPlatformTypeEnum.NEI_MENG_GU_PLATFORM.getTypeCode(); + /** + * 查询运营商信息 query_operator_info + * supervise_query_operator_info + * + * @param dto 查询运营商信息DTO + * @throws UnsupportedOperationException 未实现异常 + */ + @Override + public Map queryOperatorInfo(QueryOperatorInfoDTO dto) { + return ThirdPartyPlatformService.super.queryOperatorInfo(dto); + } + /** + * 查询充电站信息 query_stations_info + * 此接口用于查询对接平台的充电站的信息 + * + * @param dto 查询站点信息dto + * @throws UnsupportedOperationException 未实现异常 + */ + @Override + public Map queryStationsInfo(QueryStationInfoDTO dto) { + return ThirdPartyPlatformService.super.queryStationsInfo(dto); + } + + /** + * 设备接口状态查询 query_station_status + * + * @param dto 查询站点信息dto + * @throws UnsupportedOperationException 未实现异常 + */ + @Override + public Map queryStationStatus(QueryStationInfoDTO dto) { + return ThirdPartyPlatformService.super.queryStationStatus(dto); + } + + /** + * 设备状态变化推送 notification_stationStatus + * 推送充电设备接口状态信息 supervise_notification_station_status + * + * @param pileConnectorCode 充电枪口编号 + * @param status 枪口状态 + * @throws UnsupportedOperationException 未实现异常 + */ + @Override + public String notificationStationStatus(String pileConnectorCode, String status) { + return ThirdPartyPlatformService.super.notificationStationStatus(pileConnectorCode, status); + } + + /** + * 充电订单推送 notification_charge_order_info + * TODO 海南一张网文档中的接口,检查一下是否和订单信息推送notification_orderInfo一致 + * TODO 甬城泊车平台文档中的接口,检查一下是否和订单信息推送notification_orderInfo一致 + * TODO 华为平台文档中的接口,检查一下是否和订单信息推送notification_orderInfo一致 + * TODO 内蒙古平台文档中的接口,检查一下是否和订单信息推送notification_orderInfo一致 + * + * @param orderCode 订单编号 + * @throws UnsupportedOperationException 未实现异常 + */ + @Override + public String notificationChargeOrderInfo(String orderCode) { + return ThirdPartyPlatformService.super.notificationChargeOrderInfo(orderCode); + } + + /** + * 推送充电状态 notification_equip_charge_status + * 推送充电状态信息 supervise_notification_equip_charge_status + * + * @param orderCode 订单编号 + * @throws UnsupportedOperationException 未实现异常 + */ + @Override + public String notificationEquipChargeStatus(String orderCode) { + return ThirdPartyPlatformService.super.notificationEquipChargeStatus(orderCode); + } + + /** + * 推送充换电站用能统计信息 supervise_notification_operation_stats_info + * + * @param stationId + * @throws UnsupportedOperationException 未实现异常 + */ + @Override + public String notificationOperationStatsInfo(String stationId) { + return ThirdPartyPlatformService.super.notificationOperationStatsInfo(stationId); + } + + /** + * 推送充电站历史充电订单信息 supervise_notification_charge_order_info_history + * + * @param stationId + * @throws UnsupportedOperationException 未实现异常 + */ + @Override + public String notificationChargeOrderInfoHistory(String stationId) { + return ThirdPartyPlatformService.super.notificationChargeOrderInfoHistory(stationId); + } } From dce696e40237d8511dd9e607e0571edfed31ab2b Mon Sep 17 00:00:00 2001 From: Guoqs Date: Mon, 8 Apr 2024 15:26:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?update=20=E5=AF=B9=E6=8E=A5=E5=86=85?= =?UTF-8?q?=E8=92=99=E5=8F=A4=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hainan/HaiNanPlatformController.java | 2 +- .../thirdparty/ThirdPlatformTypeEnum.java | 4 +- .../pile/dto/QueryOperatorInfoDTO.java | 9 + .../pile/thirdparty/CommonParamsDTO.java | 6 + .../pile/ThirdPartyStationRelationMapper.xml | 211 ++++++++++++------ .../thirdparty/common/CommonService.java | 6 +- .../thirdparty/lianlian/vo/AccessTokenVO.java | 3 + .../platform/ThirdPartyPlatformService.java | 6 +- .../service/HaiNanPlatformServiceImpl.java | 2 +- .../service/NeiMengGuPlatformServiceImpl.java | 92 +++++++- 10 files changed, 256 insertions(+), 85 deletions(-) diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/hainan/HaiNanPlatformController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/hainan/HaiNanPlatformController.java index 58d95abf4..27f4c73e5 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/hainan/HaiNanPlatformController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/hainan/HaiNanPlatformController.java @@ -102,7 +102,7 @@ public class HaiNanPlatformController extends BaseController { // 转换成相应对象 QueryStationInfoDTO queryStationInfoDTO = JSONObject.parseObject(dataStr, QueryStationInfoDTO.class); queryStationInfoDTO.setOperatorId(dto.getOperatorID()); - queryStationInfoDTO.setThirdPlatformType(ThirdPlatformTypeEnum.HAI_NAN_1.getTypeCode()); + queryStationInfoDTO.setThirdPlatformType(ThirdPlatformTypeEnum.HAI_NAN_1_PLATFORM.getTypeCode()); Map map = platformLogic.queryStationsInfo(queryStationInfoDTO); logger.info("海南平台查询充电站信息 result:{}", JSON.toJSONString(map)); return CommonResult.success(0, "查询充电站信息成功!", map.get("Data"), map.get("Sig")); 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 72faae04d..ce1eeb1c7 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 @@ -15,8 +15,8 @@ public enum ThirdPlatformTypeEnum { YONG_CHENG_BO_CHE("4", "甬城泊车平台", "330205020"), NING_XIA_JIAO_TOU("5", "宁夏交投", "MA771QENX"), XIN_DIAN_TU("6", "新电途平台", "MA25CNM38"), - HAI_NAN_1("7", "海南一张网(监管平台)", "578725200"), - HAI_NAN_2("8", "海南一张网(充电平台)", "MAA9A0PP1"), + HAI_NAN_1_PLATFORM("7", "海南一张网(监管平台)", "578725200"), + HAI_NAN_2_PLATFORM("8", "海南一张网(充电平台)", "MAA9A0PP1"), HUA_WEI("9", "华为平台", "MA5GTQ528"), NEI_MENG_GU_PLATFORM("10", "内蒙古平台", ""), ; 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 index 5a442133d..dc716ec69 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryOperatorInfoDTO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/dto/QueryOperatorInfoDTO.java @@ -6,4 +6,13 @@ import lombok.Setter; @Getter @Setter public class QueryOperatorInfoDTO { + /** + * 查询页码 默认为1 + */ + private int PageNo = 1; + + /** + * 每页数量 默认为50 + */ + private int PageSize = 50; } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/CommonParamsDTO.java b/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/CommonParamsDTO.java index 6d169f94f..1665112b5 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/CommonParamsDTO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/CommonParamsDTO.java @@ -10,6 +10,12 @@ public class CommonParamsDTO { @JsonProperty(value = "OperatorID") private String operatorID; + /** + * 数据请求方的标识 请求方组织机构代码九位 + */ + @JsonProperty(value = "PlatformID") + private String platformID; + @JsonProperty(value = "Data") private String data; diff --git a/jsowell-pile/src/main/resources/mapper/pile/ThirdPartyStationRelationMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/ThirdPartyStationRelationMapper.xml index 7f8f67c79..0cc6f9112 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/ThirdPartyStationRelationMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/ThirdPartyStationRelationMapper.xml @@ -3,32 +3,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - + + + + + + + + + - select id, station_id, third_party_type, start_mode, create_time, create_by, update_time, update_by, del_flag from thirdparty_station_relation + select id, + station_id, + third_party_type, + start_mode, + create_time, + create_by, + update_time, + update_by, + del_flag + from thirdparty_station_relation - - id, station_id, third_party_type, start_mode, create_time, create_by, update_time, update_by, del_flag + + id, + station_id, + third_party_type, + start_mode, + create_time, + create_by, + update_time, + update_by, + del_flag - where del_flag = '0' - and station_id = #{stationId} - and third_party_type = #{thirdPartyType} + + and station_id = #{stationId} + + + and third_party_type = #{thirdPartyType} + - + insert into thirdparty_station_relation - station_id, - third_party_type, - start_mode, - create_time, - create_by, - update_time, - update_by, - del_flag, + + station_id, + + + third_party_type, + + + start_mode, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + del_flag, + - #{stationId}, - #{thirdPartyType}, - #{startMode}, - #{createTime}, - #{createBy}, - #{updateTime}, - #{updateBy}, - #{delFlag}, + + #{stationId}, + + + #{thirdPartyType}, + + + #{startMode}, + + + #{createTime}, + + + #{createBy}, + + + #{updateTime}, + + + #{updateBy}, + + + #{delFlag}, + update thirdparty_station_relation - station_id = #{stationId}, - third_party_type = #{thirdPartyType}, - start_mode = #{startMode}, - create_time = #{createTime}, - create_by = #{createBy}, - update_time = #{updateTime}, - update_by = #{updateBy}, - del_flag = #{delFlag}, + + station_id = #{stationId}, + + + third_party_type = #{thirdPartyType}, + + + start_mode = #{startMode}, + + + create_time = #{createTime}, + + + create_by = #{createBy}, + + + update_time = #{updateTime}, + + + update_by = #{updateBy}, + + + del_flag = #{delFlag}, + where station_id = #{stationId,jdbcType=BIGINT} - delete from thirdparty_station_relation where id = #{id} + delete + from thirdparty_station_relation + where id = #{id} - delete from thirdparty_station_relation where id in + delete + from thirdparty_station_relation where id in #{id}