| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.chargingPile.api.feignClient.*; |
| | | import com.ruoyi.chargingPile.api.model.*; |
| | | import com.ruoyi.chargingPile.api.vo.GetChargingGunByChargingPileIdsVo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.dto.ChargingPercentProvinceDto; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | |
| | | List<Integer> siteIds = sites.stream().map(Site::getId).collect(Collectors.toList()); |
| | | List<TChargingPile> tChargingPiles = chargingPileClient.getChargingPileBySiteIds(siteIds).getData(); |
| | | List<Integer> collect1 = tChargingPiles.stream().map(TChargingPile::getId).collect(Collectors.toList()); |
| | | List<TChargingGun> chargingGunList = chargingGunClient.getChargingGunByChargingPileIds(collect1).getData(); |
| | | GetChargingGunByChargingPileIdsVo vo = new GetChargingGunByChargingPileIdsVo(); |
| | | vo.setChargingPileIds(collect1); |
| | | List<TChargingGun> chargingGunList = chargingGunClient.getChargingGunByChargingPileIds(vo).getData(); |
| | | String serviceTel = systemConfigurationClient.getServerPhone().getData(); |
| | | List<StationInfo> StationInfos = new ArrayList<>(); |
| | | for (Site datum : sites) { |
| | |
| | | List<Integer> siteIds = data.stream().map(Site::getId).collect(Collectors.toList()); |
| | | List<TChargingPile> tChargingPiles = chargingPileClient.getChargingPileBySiteIds(siteIds).getData(); |
| | | List<Integer> collect1 = tChargingPiles.stream().map(TChargingPile::getId).collect(Collectors.toList()); |
| | | List<TChargingGun> chargingGunList = chargingGunClient.getChargingGunByChargingPileIds(collect1).getData(); |
| | | GetChargingGunByChargingPileIdsVo vo = new GetChargingGunByChargingPileIdsVo(); |
| | | vo.setChargingPileIds(collect1); |
| | | List<TChargingGun> chargingGunList = chargingGunClient.getChargingGunByChargingPileIds(vo).getData(); |
| | | |
| | | QueryStationStatusResult result = new QueryStationStatusResult(); |
| | | result.setTotal(data.size()); |
| | |
| | | List<TChargingPile> chargingPiles = chargingPileClient.getChargingPileBySiteIds(stationIDList).getData(); |
| | | if(!CollectionUtils.isEmpty(chargingPiles)){ |
| | | List<Integer> pileIds = chargingPiles.stream().map(TChargingPile::getId).collect(Collectors.toList()); |
| | | List<TChargingGun> chargingGuns = chargingGunClient.getChargingGunByChargingPileIds(pileIds).getData(); |
| | | GetChargingGunByChargingPileIdsVo vo = new GetChargingGunByChargingPileIdsVo(); |
| | | vo.setChargingPileIds(pileIds); |
| | | List<TChargingGun> chargingGuns = chargingGunClient.getChargingGunByChargingPileIds(vo).getData(); |
| | | if(!CollectionUtils.isEmpty(chargingGuns)){ |
| | | for (Integer stationID : stationIDList) { |
| | | StationStatusInfo stationStatusInfo = new StationStatusInfo(); |