diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/rpc/WccServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/rpc/WccServiceImpl.java index 875565295..f85c48e6c 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/rpc/WccServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/rpc/WccServiceImpl.java @@ -2,14 +2,13 @@ package com.jsowell.pile.rpc; import com.jsowell.common.core.domain.ykc.RealTimeMonitorData; import com.jsowell.common.dto.JCTRealTimeMonitorData; -import com.jsowell.common.dto.thirdparty.JCTQueryOrderDTO; -import com.jsowell.common.dto.thirdparty.JCTQueryStartChargeDTO; -import com.jsowell.common.dto.thirdparty.JCTQueryStationInfoDTO; -import com.jsowell.common.dto.thirdparty.JCTStartChargingCommand; +import com.jsowell.common.dto.thirdparty.*; import com.jsowell.common.service.WccService; +import com.jsowell.common.vo.BillingTemplateVO; import com.jsowell.common.vo.thirdParty.*; import com.jsowell.pile.domain.*; import com.jsowell.pile.domain.ykcCommond.StartChargingCommand; +import com.jsowell.pile.dto.QueryConnectorListDTO; import com.jsowell.pile.dto.QueryOrderDTO; import com.jsowell.pile.dto.QueryStartChargeDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; @@ -17,14 +16,14 @@ import com.jsowell.pile.mapper.OrderDetailMapper; import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper; import com.jsowell.pile.service.*; import com.jsowell.pile.thirdparty.EquipmentInfo; +import com.jsowell.pile.vo.SupStationStatsVO; import com.jsowell.pile.vo.ThirdPartySecretInfoVO; import com.jsowell.pile.vo.base.*; import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO; import com.jsowell.pile.vo.lianlian.OrderTempVO; import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO; -import com.jsowell.pile.vo.web.PileConnectorInfoVO; -import com.jsowell.pile.vo.web.PileModelInfoVO; -import com.jsowell.pile.vo.web.PileStationVO; +import com.jsowell.pile.vo.uniapp.customer.OrderVO; +import com.jsowell.pile.vo.web.*; import com.jsowell.thirdparty.service.ThirdpartySecretInfoService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -39,7 +38,7 @@ import java.util.List; import java.util.Map; @Service -@DubboService(group = "thirdparty" , version = "1.0.0") +@DubboService(group = "wccService" , version = "1.0.0") @Slf4j public class WccServiceImpl implements WccService { @@ -82,6 +81,12 @@ public class WccServiceImpl implements WccService { @Autowired private ThirdPartyStationRelationService thirdPartyStationRelationService; + @Autowired + private IAreaCodeInfoService areaCodeInfoService; + + @Autowired + private PileBillingTemplateService billingTemplateService; + /** * 测试接口 * @param name @@ -624,4 +629,129 @@ public class WccServiceImpl implements WccService { return jctMerchantInfoVOS; } + + @Override + public List selectAreaCodeInfoList(JCTAreaCodeInfo areaCodeInfo) { + AreaCodeInfo areaCodeInfo1 = new AreaCodeInfo(); + BeanUtils.copyProperties(areaCodeInfo, areaCodeInfo1); + List areaCodeInfos = areaCodeInfoService.selectAreaCodeInfoList(areaCodeInfo1); + if (areaCodeInfos == null || areaCodeInfos.isEmpty()) { + return Collections.emptyList(); + } + List jctAreaCodeInfos = new ArrayList<>(); + for (AreaCodeInfo areaCodeInfo2 : areaCodeInfos) { + JCTAreaCodeInfo jctAreaCodeInfo = new JCTAreaCodeInfo(); + BeanUtils.copyProperties(areaCodeInfo2, jctAreaCodeInfo); + jctAreaCodeInfos.add(jctAreaCodeInfo); + } + return jctAreaCodeInfos; + } + + @Override + public List selectThirdPartyOrderList(JCTQueryStartChargeDTO dto) { + QueryStartChargeDTO queryStationInfoDTO = new QueryStartChargeDTO(); + BeanUtils.copyProperties(dto, queryStationInfoDTO); + List orderVOS = orderBasicInfoService.selectThirdPartyOrderList(queryStationInfoDTO); + if (orderVOS == null || orderVOS.isEmpty()) { + return Collections.emptyList(); + } + List jctOrderVOS = new ArrayList<>(); + for (OrderVO orderVO : orderVOS) { + JCTOrderVO jctOrderVO = new JCTOrderVO(); + BeanUtils.copyProperties(orderVO, jctOrderVO); + jctOrderVOS.add(jctOrderVO); + } + return jctOrderVOS; + } + + + @Override + public JCTPileMerchantInfoVO queryMerchantInfoByStationId(String stationId) { + PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(stationId); + if (pileMerchantInfoVO == null) { + return null; + } + JCTPileMerchantInfoVO jctPileMerchantInfoVO = new JCTPileMerchantInfoVO(); + BeanUtils.copyProperties(pileMerchantInfoVO, jctPileMerchantInfoVO); + return jctPileMerchantInfoVO; + } + + @Override + public JCTPileStationVO getStationInfo(String stationId) { + PileStationVO stationInfo = pileStationInfoService.getStationInfo(stationId); + if (stationInfo == null) { + return null; + } + JCTPileStationVO jctPileStationVO = new JCTPileStationVO(); + BeanUtils.copyProperties(stationInfo, jctPileStationVO); + return jctPileStationVO; + } + + @Override + public List queryOrderListByStationId(String stationId) { + List supStationStatsVOS = orderBasicInfoService.queryOrderListByStationId(stationId); + if (supStationStatsVOS == null || supStationStatsVOS.isEmpty()) { + return Collections.emptyList(); + } + List jctSupStationStatsVOs = new ArrayList<>(); + for (SupStationStatsVO supStationStatsVO : supStationStatsVOS) { + JCTSupStationStatsVO jctSupStationStatsVO = new JCTSupStationStatsVO(); + BeanUtils.copyProperties(supStationStatsVO, jctSupStationStatsVO); + jctSupStationStatsVOs.add(jctSupStationStatsVO); + } + return jctSupStationStatsVOs; + } + + @Override + public List getConnectorInfoListByParams(JCTQueryConnectorListDTO dto) { + QueryConnectorListDTO queryConnectorListDTO = new QueryConnectorListDTO(); + BeanUtils.copyProperties(dto, queryConnectorListDTO); + List connectorInfoListByParams = pileConnectorInfoService.getConnectorInfoListByParams(queryConnectorListDTO); + if (connectorInfoListByParams == null || connectorInfoListByParams.isEmpty()) { + return Collections.emptyList(); + } + List jctPileConnectorInfoVOs = new ArrayList<>(); + for (PileConnectorInfoVO connectorInfoVO : connectorInfoListByParams) { + JCTPileConnectorInfoVO jctPileConnectorInfoVO = new JCTPileConnectorInfoVO(); + BeanUtils.copyProperties(connectorInfoVO, jctPileConnectorInfoVO); + jctPileConnectorInfoVOs.add(jctPileConnectorInfoVO); + } + return jctPileConnectorInfoVOs; + } + + @Override + public JCTEchoBillingTemplateVO queryPileBillingTemplateById(Long id) { + EchoBillingTemplateVO echoBillingTemplateVO = pileBillingTemplateService.queryPileBillingTemplateById(id); + if (echoBillingTemplateVO == null) { + return null; + } + JCTEchoBillingTemplateVO jctEchoBillingTemplateVO = new JCTEchoBillingTemplateVO(); + BeanUtils.copyProperties(echoBillingTemplateVO, jctEchoBillingTemplateVO); + return jctEchoBillingTemplateVO; + } + + @Override + public BillingTemplateVO queryUsedBillingTemplateForEV(String stationId) { + com.jsowell.pile.vo.web.BillingTemplateVO billingTemplateVO = pileBillingTemplateService.queryUsedBillingTemplateForEV(stationId); + if (billingTemplateVO == null) { + return null; + } + BillingTemplateVO billingTemplateVO1 = new BillingTemplateVO(); + BeanUtils.copyProperties(billingTemplateVO, billingTemplateVO1); + return billingTemplateVO1; + } + + @Override + public JCTThirdPartyStationRelationVO selectRelationInfo(JCTThirdPartyStationRelation thirdPartyStationRelation) { + com.jsowell.pile.domain.ThirdPartyStationRelation thirdPartyStationRelation1 = new com.jsowell.pile.domain.ThirdPartyStationRelation(); + BeanUtils.copyProperties(thirdPartyStationRelation, thirdPartyStationRelation1); + ThirdPartyStationRelationVO thirdPartyStationRelationVO = thirdPartyStationRelationService.selectRelationInfo(thirdPartyStationRelation1); + if (thirdPartyStationRelationVO == null) { + return null; + } + JCTThirdPartyStationRelationVO jctThirdPartyStationRelationVO = new JCTThirdPartyStationRelationVO(); + BeanUtils.copyProperties(thirdPartyStationRelation1, jctThirdPartyStationRelationVO); + return jctThirdPartyStationRelationVO; + } + } diff --git a/pom.xml b/pom.xml index ad1565845..fac8b1220 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 3.3.0 2.0.3 - 0.0.7 + 0.0.9