This commit is contained in:
YAS\29473
2025-09-19 10:35:38 +08:00
parent a1a6df26d3
commit e6ea1cc82c
2 changed files with 139 additions and 9 deletions

View File

@@ -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<JCTAreaCodeInfo> selectAreaCodeInfoList(JCTAreaCodeInfo areaCodeInfo) {
AreaCodeInfo areaCodeInfo1 = new AreaCodeInfo();
BeanUtils.copyProperties(areaCodeInfo, areaCodeInfo1);
List<AreaCodeInfo> areaCodeInfos = areaCodeInfoService.selectAreaCodeInfoList(areaCodeInfo1);
if (areaCodeInfos == null || areaCodeInfos.isEmpty()) {
return Collections.emptyList();
}
List<JCTAreaCodeInfo> jctAreaCodeInfos = new ArrayList<>();
for (AreaCodeInfo areaCodeInfo2 : areaCodeInfos) {
JCTAreaCodeInfo jctAreaCodeInfo = new JCTAreaCodeInfo();
BeanUtils.copyProperties(areaCodeInfo2, jctAreaCodeInfo);
jctAreaCodeInfos.add(jctAreaCodeInfo);
}
return jctAreaCodeInfos;
}
@Override
public List<JCTOrderVO> selectThirdPartyOrderList(JCTQueryStartChargeDTO dto) {
QueryStartChargeDTO queryStationInfoDTO = new QueryStartChargeDTO();
BeanUtils.copyProperties(dto, queryStationInfoDTO);
List<OrderVO> orderVOS = orderBasicInfoService.selectThirdPartyOrderList(queryStationInfoDTO);
if (orderVOS == null || orderVOS.isEmpty()) {
return Collections.emptyList();
}
List<JCTOrderVO> 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<JCTSupStationStatsVO> queryOrderListByStationId(String stationId) {
List<SupStationStatsVO> supStationStatsVOS = orderBasicInfoService.queryOrderListByStationId(stationId);
if (supStationStatsVOS == null || supStationStatsVOS.isEmpty()) {
return Collections.emptyList();
}
List<JCTSupStationStatsVO> jctSupStationStatsVOs = new ArrayList<>();
for (SupStationStatsVO supStationStatsVO : supStationStatsVOS) {
JCTSupStationStatsVO jctSupStationStatsVO = new JCTSupStationStatsVO();
BeanUtils.copyProperties(supStationStatsVO, jctSupStationStatsVO);
jctSupStationStatsVOs.add(jctSupStationStatsVO);
}
return jctSupStationStatsVOs;
}
@Override
public List<JCTPileConnectorInfoVO> getConnectorInfoListByParams(JCTQueryConnectorListDTO dto) {
QueryConnectorListDTO queryConnectorListDTO = new QueryConnectorListDTO();
BeanUtils.copyProperties(dto, queryConnectorListDTO);
List<PileConnectorInfoVO> connectorInfoListByParams = pileConnectorInfoService.getConnectorInfoListByParams(queryConnectorListDTO);
if (connectorInfoListByParams == null || connectorInfoListByParams.isEmpty()) {
return Collections.emptyList();
}
List<JCTPileConnectorInfoVO> 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;
}
}