| | |
| | | } |
| | | List<String> targSiteAreaList = new ArrayList<>(); |
| | | for (BasStationArea basStationArea : basStationAreas) { |
| | | if (basStationArea.getStationAlias().isEmpty()){ |
| | | if (basStationArea.getStationAliasStaNo().isEmpty()){ |
| | | continue; |
| | | } |
| | | targSiteAreaList.add(basStationArea.getId().toString()); |
| | |
| | | int count = 0; |
| | | for (BasStationArea basStationArea : basStationAreas) { |
| | | count++; |
| | | if (!basStationArea.getStationAlias().isEmpty()) { |
| | | if (!basStationArea.getStationAliasStaNo().isEmpty()) { |
| | | List<OrderOutItemDto.staListDto> maps = new ArrayList<>(); |
| | | for (String site : basStationArea.getStationAlias()) { |
| | | for (String site : basStationArea.getStationAliasStaNo()) { |
| | | OrderOutItemDto.staListDto staListDto = new OrderOutItemDto.staListDto(); |
| | | staListDto.setStaNo(site); |
| | | staListDto.setStaName(site); |
| | |
| | | } |
| | | orderOutItemDto.setStaNos(maps); |
| | | //获取满足条件站点 |
| | | Set<String> stationSet = new HashSet<>(basStationArea.getStationAlias()); |
| | | Set<String> stationSet = new HashSet<>(basStationArea.getStationAliasStaNo()); |
| | | // Set<String> stationSet = basStationArea.getStationAlias().stream().collect(Collectors.toSet()); |
| | | // Set<String> stationSet = deviceSites.stream().map(DeviceSite::getSite).collect(Collectors.toSet()); |
| | | //已使用站点 |
| | |
| | | |
| | | if (count == basStationAreas.size()) { |
| | | if (!Objects.isNull(basStation)) { |
| | | orderOutItemDto.setTargSiteAreaNow(basStationArea.getStationAreaId()); |
| | | orderOutItemDto.setSiteNo(basStation.getStationName()); |
| | | // throw new CoolException("站點不存在!!"); |
| | | } else if (!stas.isEmpty()) { |
| | | orderOutItemDto.setSiteNo(basStationArea.getStationAlias().get(0)); |
| | | orderOutItemDto.setTargSiteAreaNow(basStationArea.getStationAreaId()); |
| | | orderOutItemDto.setSiteNo(basStationArea.getStationAliasStaNo().get(0)); |
| | | } else { |
| | | throw new CoolException("未找到符合条件站点!!!请检查库区或者路径配置!!!"); |
| | | } |
| | |
| | | continue; |
| | | // throw new CoolException("站點不存在!!"); |
| | | } |
| | | orderOutItemDto.setTargSiteAreaNow(basStationArea.getStationAreaId()); |
| | | orderOutItemDto.setSiteNo(basStation.getStationName()); |
| | | } |
| | | |