This commit is contained in:
YAS\29473
2025-09-22 09:31:13 +08:00
parent b2ced0f23e
commit 6517c75df2
2 changed files with 88 additions and 1 deletions

View File

@@ -12,16 +12,21 @@ import com.jsowell.pile.dto.QueryConnectorListDTO;
import com.jsowell.pile.dto.QueryOrderDTO;
import com.jsowell.pile.dto.QueryStartChargeDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
import com.jsowell.pile.mapper.OrderDetailMapper;
import com.jsowell.pile.mapper.PileBasicInfoMapper;
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
import com.jsowell.pile.service.*;
import com.jsowell.pile.thirdparty.EquipmentInfo;
import com.jsowell.pile.thirdparty.PileDetailInfoVO;
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.nanrui.JiangSuOrderInfoVO;
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
import com.jsowell.pile.vo.web.*;
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
@@ -90,6 +95,9 @@ public class WccServiceImpl implements WccService {
@Autowired
private OrderDetailMapper orderDetailMapper;
@Autowired
private PileBasicInfoMapper pileBasicInfoMapper;
// ==================== 基础测试方法 ====================
/**
* 测试接口
@@ -384,6 +392,49 @@ public class WccServiceImpl implements WccService {
return jctSupStationStatsVOs;
}
@Override
public List<JCTJiangSuOrderInfoVO> getNROrderInfos(JCTNRQueryOrderDTO dto) {
if (dto == null) {
return Collections.emptyList();
}
NRQueryOrderDTO nrQueryOrderDTO = new NRQueryOrderDTO();
BeanUtils.copyProperties(dto, nrQueryOrderDTO);
List<JCTJiangSuOrderInfoVO> jctJiangSuOrderInfoVOS = new ArrayList<>();
List<JiangSuOrderInfoVO> jiangSuOrderInfoVOS = orderBasicInfoService.getNROrderInfos(nrQueryOrderDTO);
for (JiangSuOrderInfoVO jiangSuOrderInfoVO : jiangSuOrderInfoVOS) {
JCTJiangSuOrderInfoVO jctJiangSuOrderInfoVO = new JCTJiangSuOrderInfoVO();
BeanUtils.copyProperties(jiangSuOrderInfoVO, jctJiangSuOrderInfoVO);
jctJiangSuOrderInfoVOS.add(jctJiangSuOrderInfoVO);
}
return jctJiangSuOrderInfoVOS;
}
@Override
public JCTJiangSuOrderInfoVO getNROrderInfoByOrderCode(String orderCode) {
JiangSuOrderInfoVO jiangSuOrderInfoVO = orderBasicInfoService.getNROrderInfoByOrderCode(orderCode);
if (jiangSuOrderInfoVO == null) {
return null;
}
JCTJiangSuOrderInfoVO jctJiangSuOrderInfoVO = new JCTJiangSuOrderInfoVO();
BeanUtils.copyProperties(jiangSuOrderInfoVO, jctJiangSuOrderInfoVO);
return jctJiangSuOrderInfoVO;
}
@Override
public List<JCTSupStationStatsVO> queryOrderListByStationIdAndTime(String stationId , String startTime , String endTime) {
List<SupStationStatsVO> supStationStatsVOS = orderBasicInfoService.queryOrderListByStationIdAndTime(stationId, startTime, endTime);
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;
}
// ==================== 使用 PileStationInfoService 的方法 ====================
/**
* 根据充电桩枪口号查询充电站信息
@@ -541,6 +592,16 @@ public class WccServiceImpl implements WccService {
return jctPileConnectorInfos;
}
@Override
public Map<String, String> getPileStatus(List<String> pileSnList) {
return pileConnectorInfoService.getPileStatus(pileSnList);
}
@Override
public String getPileConnectorQrCodeUrl(String pileConnectorCode) {
return pileConnectorInfoService.getPileConnectorQrCodeUrl(pileConnectorCode);
}
// ==================== 使用 YKCPushCommandService 的方法 ====================
@Override
public void pushStartChargingCommand(JCTStartChargingCommand command) {
@@ -594,6 +655,17 @@ public class WccServiceImpl implements WccService {
return billingTemplateVO1;
}
@Override
public JCTCurrentTimePriceDetails getCurrentTimePriceDetails(String stationId) {
CurrentTimePriceDetails currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetails(stationId);
if (currentTimePriceDetails == null) {
return null;
}
JCTCurrentTimePriceDetails jctCurrentTimePriceDetails = new JCTCurrentTimePriceDetails();
BeanUtils.copyProperties(currentTimePriceDetails, jctCurrentTimePriceDetails);
return jctCurrentTimePriceDetails;
}
// ==================== 使用 PileRemoteService 的方法 ====================
@Override
public void remoteStopCharging(String pileSn , String connectorCode , String transactionCode) {
@@ -694,4 +766,19 @@ public class WccServiceImpl implements WccService {
return jctOrderTempVOS;
}
@Override
public List<JCTPileDetailInfoVO> getPileDetailInfoList(String stationId) {
List<PileDetailInfoVO> pileDetailInfoList = pileBasicInfoMapper.getPileDetailInfoList(stationId);
if (CollectionUtils.isEmpty(pileDetailInfoList)) {
return Collections.emptyList();
}
List<JCTPileDetailInfoVO> jctPileDetailInfoVOS = new ArrayList<>();
for (PileDetailInfoVO pileDetailInfoVO : pileDetailInfoList) {
JCTPileDetailInfoVO jctPileDetailInfoVO = new JCTPileDetailInfoVO();
BeanUtils.copyProperties(pileDetailInfoVO, jctPileDetailInfoVO);
jctPileDetailInfoVOS.add(jctPileDetailInfoVO);
}
return jctPileDetailInfoVOS;
}
}