|
@@ -7,11 +7,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.zsElectric.boot.charging.entity.*;
|
|
import com.zsElectric.boot.charging.entity.*;
|
|
|
|
|
+import com.zsElectric.boot.business.mapper.FirmInfoMapper;
|
|
|
import com.zsElectric.boot.business.mapper.ThirdPartyEquipmentInfoMapper;
|
|
import com.zsElectric.boot.business.mapper.ThirdPartyEquipmentInfoMapper;
|
|
|
|
|
+import com.zsElectric.boot.business.mapper.ThirdPartyInfoMapper;
|
|
|
import com.zsElectric.boot.business.mapper.ThirdPartyStationInfoMapper;
|
|
import com.zsElectric.boot.business.mapper.ThirdPartyStationInfoMapper;
|
|
|
import com.zsElectric.boot.charging.mapper.ThirdPartyConnectorInfoMapper;
|
|
import com.zsElectric.boot.charging.mapper.ThirdPartyConnectorInfoMapper;
|
|
|
import com.zsElectric.boot.charging.mapper.ThirdPartyEquipmentPricePolicyMapper;
|
|
import com.zsElectric.boot.charging.mapper.ThirdPartyEquipmentPricePolicyMapper;
|
|
|
import com.zsElectric.boot.charging.mapper.ThirdPartyPolicyInfoMapper;
|
|
import com.zsElectric.boot.charging.mapper.ThirdPartyPolicyInfoMapper;
|
|
|
|
|
+import com.zsElectric.boot.business.model.entity.FirmInfo;
|
|
|
|
|
+import com.zsElectric.boot.business.model.entity.ThirdPartyInfo;
|
|
|
import com.zsElectric.boot.business.model.query.ThirdPartyEquipmentInfoQuery;
|
|
import com.zsElectric.boot.business.model.query.ThirdPartyEquipmentInfoQuery;
|
|
|
import com.zsElectric.boot.business.model.query.ThirdPartyStationInfoQuery;
|
|
import com.zsElectric.boot.business.model.query.ThirdPartyStationInfoQuery;
|
|
|
import com.zsElectric.boot.business.model.vo.PartyStationInfoVO;
|
|
import com.zsElectric.boot.business.model.vo.PartyStationInfoVO;
|
|
@@ -50,6 +54,8 @@ public class ThirdPartyChargingServiceImpl implements ThirdPartyChargingService
|
|
|
private final ThirdPartyConnectorInfoMapper connectorInfoMapper;
|
|
private final ThirdPartyConnectorInfoMapper connectorInfoMapper;
|
|
|
private final ThirdPartyEquipmentPricePolicyMapper pricePolicyMapper;
|
|
private final ThirdPartyEquipmentPricePolicyMapper pricePolicyMapper;
|
|
|
private final ThirdPartyPolicyInfoMapper policyInfoMapper;
|
|
private final ThirdPartyPolicyInfoMapper policyInfoMapper;
|
|
|
|
|
+ private final FirmInfoMapper firmInfoMapper;
|
|
|
|
|
+ private final ThirdPartyInfoMapper thirdPartyInfoMapper;
|
|
|
private final ObjectMapper objectMapper;
|
|
private final ObjectMapper objectMapper;
|
|
|
|
|
|
|
|
// ==================== 充电站信息查询 ====================
|
|
// ==================== 充电站信息查询 ====================
|
|
@@ -474,7 +480,28 @@ public class ThirdPartyChargingServiceImpl implements ThirdPartyChargingService
|
|
|
// 构建分页
|
|
// 构建分页
|
|
|
Page<ThirdPartyStationInfoVO> page = new Page<>(queryParams.getPageNum(), queryParams.getPageSize());
|
|
Page<ThirdPartyStationInfoVO> page = new Page<>(queryParams.getPageNum(), queryParams.getPageSize());
|
|
|
// 调用Mapper联表查询(固定设备所属方MA6DP6BE7)
|
|
// 调用Mapper联表查询(固定设备所属方MA6DP6BE7)
|
|
|
- return stationInfoMapper.selectStationInfoPageByEquipment(page, queryParams);
|
|
|
|
|
|
|
+ IPage<ThirdPartyStationInfoVO> resultPage = stationInfoMapper.selectStationInfoPageByEquipment(page, queryParams);
|
|
|
|
|
+
|
|
|
|
|
+ // 填充单位名称
|
|
|
|
|
+ for (ThirdPartyStationInfoVO vo : resultPage.getRecords()) {
|
|
|
|
|
+ if (vo.getSalesType() != null) {
|
|
|
|
|
+ if (vo.getSalesType() == 1 && vo.getFirmId() != null) {
|
|
|
|
|
+ // 企业类型,查询企业名称
|
|
|
|
|
+ FirmInfo firmInfo = firmInfoMapper.selectById(vo.getFirmId());
|
|
|
|
|
+ if (firmInfo != null) {
|
|
|
|
|
+ vo.setUnitName(firmInfo.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (vo.getSalesType() == 2 && vo.getThirdPartyId() != null) {
|
|
|
|
|
+ // 渠道方类型,查询渠道方名称
|
|
|
|
|
+ ThirdPartyInfo thirdPartyInfo = thirdPartyInfoMapper.selectById(vo.getThirdPartyId());
|
|
|
|
|
+ if (thirdPartyInfo != null) {
|
|
|
|
|
+ vo.setUnitName(thirdPartyInfo.getEcName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return resultPage;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|