| | |
| | | List<String> gbList = dataList.stream().map(BaseResult::getNo).collect(Collectors.toList()); |
| | | Map<String, BaseResult> pointMap = dataList.stream().collect(Collectors.toMap(BaseResult::getNo, item -> item)); |
| | | List<String> dbGBList = monitorMapper.getGBbyGB(gbList); |
| | | for (String gb : dbGBList) { |
| | | BaseResult data = pointMap.get(gb); |
| | | if (Objects.nonNull(data)) { |
| | | data.setNewDevice(Boolean.TRUE); |
| | | } |
| | | for (String s : gbList) { |
| | | BaseResult baseResult = pointMap.get(s); |
| | | baseResult.setNewDevice(!dbGBList.contains(s)); |
| | | } |
| | | } |
| | | } |