diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/hainan/service/HaiNanChargeService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/hainan/service/HaiNanChargeService.java index 79373e95b..31769e45b 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/hainan/service/HaiNanChargeService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/hainan/service/HaiNanChargeService.java @@ -7,17 +7,11 @@ import com.jsowell.common.util.PageUtils; import com.jsowell.common.util.StringUtils; import com.jsowell.pile.domain.ThirdPartyPlatformConfig; import com.jsowell.pile.dto.QueryStationInfoDTO; -import com.jsowell.pile.service.PileBillingTemplateService; -import com.jsowell.pile.service.PileStationInfoService; -import com.jsowell.pile.service.ThirdPartyPlatformConfigService; import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO; import com.jsowell.pile.vo.uniapp.BillingPriceVO; import com.jsowell.thirdparty.hainan.domain.HNStationInfo; -import com.jsowell.thirdparty.zhongdianlian.domain.ZDLEquipmentInfo; -import com.jsowell.thirdparty.zhongdianlian.domain.ZDLStationInfo; -import com.jsowell.thirdparty.zhongdianlian.service.ZDLService; +import com.jsowell.thirdparty.platform.AbsInterfaceWithPlatformService; import org.apache.commons.collections4.CollectionUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; @@ -32,21 +26,11 @@ import java.util.Map; * @Date 2024/1/18 10:05:23 */ @Service -public class HaiNanChargeService { - - @Autowired - private ZDLService zdlService; - - @Autowired - private PileStationInfoService pileStationInfoService; - - @Autowired - private ThirdPartyPlatformConfigService thirdPartyPlatformConfigService; - - @Autowired - private PileBillingTemplateService pileBillingTemplateService; - +public class HaiNanChargeService extends AbsInterfaceWithPlatformService { + /** + * 6.2 查询充电站信息 + */ public Map queryStationsInfo(QueryStationInfoDTO dto) { List resultList = new ArrayList<>(); int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo(); @@ -123,4 +107,35 @@ public class HaiNanChargeService { 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; + } + } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/AbsInterfaceWithPlatformService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/AbsInterfaceWithPlatformService.java new file mode 100644 index 000000000..b43808573 --- /dev/null +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/AbsInterfaceWithPlatformService.java @@ -0,0 +1,47 @@ +package com.jsowell.thirdparty.platform; + +import com.jsowell.pile.dto.QueryStationInfoDTO; +import com.jsowell.pile.service.PileBillingTemplateService; +import com.jsowell.pile.service.PileStationInfoService; +import com.jsowell.pile.service.ThirdPartyPlatformConfigService; +import com.jsowell.thirdparty.zhongdianlian.service.ZDLService; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Map; + +/** + * 对接第三方平台抽象类 + */ +public abstract class AbsInterfaceWithPlatformService { + @Autowired + protected PileStationInfoService pileStationInfoService; + + @Autowired + protected ThirdPartyPlatformConfigService thirdPartyPlatformConfigService; + + @Autowired + protected PileBillingTemplateService pileBillingTemplateService; + + @Autowired + protected ZDLService zdlService; + + /** + * 6.2 查询充电站信息 + */ + public abstract Map queryStationsInfo(QueryStationInfoDTO dto); + + /** + * 6.3 设备状态变化推送 + */ + public abstract String notificationStationStatus(String pileConnectorCode, String status); + + /** + * 6.4 充电订单推送 + */ + public abstract String pushChargeOrderInfo(String orderCode); + + /** + * 6.5 设备接口状态查询 + */ + public abstract Map queryStationStatus(QueryStationInfoDTO dto); +}