This commit is contained in:
YAS\29473
2025-09-22 15:11:21 +08:00
parent 6517c75df2
commit 297405471e
2 changed files with 186 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
package com.jsowell.pile.rpc;
import com.jsowell.common.core.domain.ykc.BMSChargeInfoData;
import com.jsowell.common.core.domain.ykc.BMSDemandAndChargerOutputData;
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
import com.jsowell.common.dto.JCTRealTimeMonitorData;
import com.jsowell.common.dto.thirdparty.*;
@@ -13,18 +15,22 @@ 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.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryStationInfoDTO;
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.thirdparty.ZDLEquipmentInfo;
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.ningxiajiaotou.NXJTStationInfoVO;
import com.jsowell.pile.vo.uniapp.customer.BillingPriceVO;
import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
@@ -186,6 +192,53 @@ public class WccServiceImpl implements WccService {
return jctPileInfoVOS;
}
@Override
public List<JCTZDLEquipmentInfo> getPileListForZDL(String stationId) {
List<ZDLEquipmentInfo> pileListForZDL = pileBasicInfoService.getPileListForZDL(stationId);
if (pileListForZDL == null || pileListForZDL.isEmpty()) {
return Collections.emptyList();
}
List<JCTZDLEquipmentInfo> jctZDLEquipmentInfos = new ArrayList<>();
for (ZDLEquipmentInfo zdLEquipmentInfo : pileListForZDL) {
JCTZDLEquipmentInfo jctZDLEquipmentInfo = new JCTZDLEquipmentInfo();
BeanUtils.copyProperties(zdLEquipmentInfo, jctZDLEquipmentInfo);
jctZDLEquipmentInfos.add(jctZDLEquipmentInfo);
}
return jctZDLEquipmentInfos;
}
@Override
public List<JCTBMSDemandAndChargerOutputData> getBMSDemandAndChargerOutputInfoList(String transactionCode) {
List<BMSDemandAndChargerOutputData> bmsDemandAndChargerOutputInfoList = pileBasicInfoService.getBMSDemandAndChargerOutputInfoList(transactionCode);
if (bmsDemandAndChargerOutputInfoList == null || bmsDemandAndChargerOutputInfoList.isEmpty()) {
return Collections.emptyList();
}
List<JCTBMSDemandAndChargerOutputData> jctBMSDemandAndChargerOutputDataList = new ArrayList<>();
for (BMSDemandAndChargerOutputData bmsDemandAndChargerOutputData : bmsDemandAndChargerOutputInfoList) {
JCTBMSDemandAndChargerOutputData jctBMSDemandAndChargerOutputData = new JCTBMSDemandAndChargerOutputData();
BeanUtils.copyProperties(bmsDemandAndChargerOutputData, jctBMSDemandAndChargerOutputData);
jctBMSDemandAndChargerOutputDataList.add(jctBMSDemandAndChargerOutputData);
}
return jctBMSDemandAndChargerOutputDataList;
}
@Override
public List<JCTBMSChargeInfoData> getBMSChargeInfoList(String transactionCode) {
List<BMSChargeInfoData> bmsChargeInfoList = pileBasicInfoService.getBMSChargeInfoList(transactionCode);
if (bmsChargeInfoList == null || bmsChargeInfoList.isEmpty()) {
return Collections.emptyList();
}
List<JCTBMSChargeInfoData> jctBMSChargeInfoDataList = new ArrayList<>();
for (BMSChargeInfoData bmsChargeInfoData : bmsChargeInfoList) {
JCTBMSChargeInfoData jctBMSChargeInfoData = new JCTBMSChargeInfoData();
BeanUtils.copyProperties(bmsChargeInfoData, jctBMSChargeInfoData);
jctBMSChargeInfoDataList.add(jctBMSChargeInfoData);
}
return jctBMSChargeInfoDataList;
}
// ==================== 使用 ThirdpartySecretInfoService 的方法 ====================
/**
* 查询第三方平台配置信息列表
@@ -435,6 +488,52 @@ public class WccServiceImpl implements WccService {
return jctSupStationStatsVOs;
}
@Override
public List<JCTOrderVO> getOrderInfoByNXJT(JCTNXJTQueryOrdersInfoDTO dto) {
if (dto == null) {
return Collections.emptyList();
}
NXJTQueryOrdersInfoDTO nxjtQueryOrdersInfoDTO = new NXJTQueryOrdersInfoDTO();
BeanUtils.copyProperties(dto, nxjtQueryOrdersInfoDTO);
List<OrderVO> orderVOS = orderBasicInfoService.getOrderInfoByNXJT(nxjtQueryOrdersInfoDTO);
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 JCTOrderVO getChargeOrderInfoByOrderCode(String orderCode) {
OrderVO orderVO = orderBasicInfoService.getChargeOrderInfoByOrderCode(orderCode);
if (orderVO == null) {
return null;
}
JCTOrderVO jctOrderVO = new JCTOrderVO();
BeanUtils.copyProperties(orderVO, jctOrderVO);
return jctOrderVO;
}
@Override
public List<JCTOrderListVO> selectChargingOrder(String pileSn) {
List<OrderListVO> orderListVOS = orderBasicInfoService.selectChargingOrder(pileSn);
if (orderListVOS == null || orderListVOS.isEmpty()) {
return Collections.emptyList();
}
List<JCTOrderListVO> jctOrderListVOS = new ArrayList<>();
for (OrderListVO orderListVO : orderListVOS) {
JCTOrderListVO jctOrderListVO = new JCTOrderListVO();
BeanUtils.copyProperties(orderListVO, jctOrderListVO);
jctOrderListVOS.add(jctOrderListVO);
}
return jctOrderListVOS;
}
// ==================== 使用 PileStationInfoService 的方法 ====================
/**
* 根据充电桩枪口号查询充电站信息
@@ -495,6 +594,57 @@ public class WccServiceImpl implements WccService {
return jctPileStationVO;
}
@Override
public JCTPileStationVO getStationInfoByPileSn(String pileSn) {
PileStationVO stationInfoByPileSn = pileStationInfoService.getStationInfoByPileSn(pileSn);
if (stationInfoByPileSn == null) {
return null;
}
JCTPileStationVO jctPileStationVO = new JCTPileStationVO();
BeanUtils.copyProperties(stationInfoByPileSn, jctPileStationVO);
return jctPileStationVO;
}
@Override
public List<JCTThirdPartyStationInfoVO> getStationInfosByThirdParty(JCTQueryStationInfoDTO dto) {
if (dto == null) {
return Collections.emptyList();
}
QueryStationInfoDTO queryStationInfoDTO = new QueryStationInfoDTO();
BeanUtils.copyProperties(dto, queryStationInfoDTO);
List<ThirdPartyStationInfoVO> stationInfosByThirdParty = pileStationInfoService.getStationInfosByThirdParty(queryStationInfoDTO);
if (stationInfosByThirdParty == null || stationInfosByThirdParty.isEmpty()) {
return Collections.emptyList();
}
List<JCTThirdPartyStationInfoVO> jctThirdPartyStationInfoVOS = new ArrayList<>();
for (ThirdPartyStationInfoVO thirdPartyStationInfoVO : stationInfosByThirdParty) {
JCTThirdPartyStationInfoVO jctThirdPartyStationInfoVO = new JCTThirdPartyStationInfoVO();
BeanUtils.copyProperties(thirdPartyStationInfoVO, jctThirdPartyStationInfoVO);
jctThirdPartyStationInfoVOS.add(jctThirdPartyStationInfoVO);
}
return jctThirdPartyStationInfoVOS;
}
@Override
public List<JCTNXJTStationInfoVO> NXJTQueryStationsInfo(JCTNXJTQueryStationInfoDTO dto) {
if (dto == null) {
return Collections.emptyList();
}
NXJTQueryStationInfoDTO nxjtQueryStationInfoDTO = new NXJTQueryStationInfoDTO();
BeanUtils.copyProperties(dto, nxjtQueryStationInfoDTO);
List<NXJTStationInfoVO> nxjtStationsInfo = pileStationInfoService.NXJTQueryStationsInfo(nxjtQueryStationInfoDTO);
if (nxjtStationsInfo == null || nxjtStationsInfo.isEmpty()) {
return Collections.emptyList();
}
List<JCTNXJTStationInfoVO> jctNXJTStationInfoVOS = new ArrayList<>();
for (NXJTStationInfoVO nxjtStationInfoVO : nxjtStationsInfo) {
JCTNXJTStationInfoVO jctNXJTStationInfoVO = new JCTNXJTStationInfoVO();
BeanUtils.copyProperties(nxjtStationInfoVO, jctNXJTStationInfoVO);
jctNXJTStationInfoVOS.add(jctNXJTStationInfoVO);
}
return jctNXJTStationInfoVOS;
}
// ==================== 使用 PileMerchantInfoService 的方法 ====================
@Override
public JCTMerchantInfoVO getMerchantInfoVO(String merchantId) {
@@ -602,6 +752,26 @@ public class WccServiceImpl implements WccService {
return pileConnectorInfoService.getPileConnectorQrCodeUrl(pileConnectorCode);
}
@Override
public List<JCTConnectorInfoVO> getUniAppConnectorList(Long stationId) {
List<ConnectorInfoVO> connectorListForLianLian = pileConnectorInfoService.getUniAppConnectorList(stationId);
if (connectorListForLianLian == null || connectorListForLianLian.isEmpty()) {
return Collections.emptyList();
}
List<JCTConnectorInfoVO> jctConnectorInfoVOS = new ArrayList<>();
for (ConnectorInfoVO connectorInfoVO : connectorListForLianLian) {
JCTConnectorInfoVO jctConnectorInfoVO = new JCTConnectorInfoVO();
BeanUtils.copyProperties(connectorInfoVO , jctConnectorInfoVO);
jctConnectorInfoVOS.add(jctConnectorInfoVO);
}
return jctConnectorInfoVOS;
}
@Override
public Map<String, Integer> getPileTypeNum(Long stationId) {
return pileConnectorInfoService.getPileTypeNum(stationId);
}
// ==================== 使用 YKCPushCommandService 的方法 ====================
@Override
public void pushStartChargingCommand(JCTStartChargingCommand command) {
@@ -717,6 +887,21 @@ public class WccServiceImpl implements WccService {
return jctThirdPartyStationRelationVO;
}
@Override
public List<JCTThirdPartyStationRelation> selectThirdPartyStationRelationList(String thirdPlatformType) {
List<ThirdPartyStationRelation> thirdPartyStationRelationList = thirdPartyStationRelationService.selectThirdPartyStationRelationList(thirdPlatformType);
if (thirdPartyStationRelationList == null) {
return Collections.emptyList();
}
List<JCTThirdPartyStationRelation> jctThirdPartyStationRelations = new ArrayList<>();
for (ThirdPartyStationRelation thirdPartyStationRelation : thirdPartyStationRelationList) {
JCTThirdPartyStationRelation jctThirdPartyStationRelation = new JCTThirdPartyStationRelation();
BeanUtils.copyProperties(thirdPartyStationRelation, jctThirdPartyStationRelation);
jctThirdPartyStationRelations.add(jctThirdPartyStationRelation);
}
return jctThirdPartyStationRelations;
}
// ==================== 使用 IAreaCodeInfoService 的方法 ====================
@Override
public List<JCTAreaCodeInfo> selectAreaCodeInfoList(JCTAreaCodeInfo areaCodeInfo) {

View File

@@ -46,7 +46,7 @@
<!--<dubbo.version>2.7.15</dubbo.version>-->
<dubbo.version>3.3.0</dubbo.version>
<nacos-client.version>2.0.3</nacos-client.version>
<charge-common-api.version>0.1.0</charge-common-api.version>
<charge-common-api.version>0.1.2</charge-common-api.version>
</properties>
<!-- 依赖声明 -->