Commit 87fccda10b7ef3d8a4e001745abfeda055bad7bf
1 parent
1626458a
feat: 优化大屏接口
Showing
1 changed file
with
3 additions
and
0 deletions
Bsth-admin/src/main/java/com/ruoyi/service/impl/BigViewServiceImpl.java
| @@ -408,6 +408,9 @@ public class BigViewServiceImpl implements BigViewService { | @@ -408,6 +408,9 @@ public class BigViewServiceImpl implements BigViewService { | ||
| 408 | */ | 408 | */ |
| 409 | private Map<String, LineInfo> transformMapByMacheList(Map<String, List<DriverScheduling>> map) { | 409 | private Map<String, LineInfo> transformMapByMacheList(Map<String, List<DriverScheduling>> map) { |
| 410 | Map<String, LineInfo> matchMap = new HashMap<>(); | 410 | Map<String, LineInfo> matchMap = new HashMap<>(); |
| 411 | + if (CollectionUtil.isEmpty(map)){ | ||
| 412 | + return matchMap; | ||
| 413 | + } | ||
| 411 | for (Map.Entry<String, List<DriverScheduling>> entry : map.entrySet()) { | 414 | for (Map.Entry<String, List<DriverScheduling>> entry : map.entrySet()) { |
| 412 | List<DriverScheduling> value = entry.getValue(); | 415 | List<DriverScheduling> value = entry.getValue(); |
| 413 | List<DriverScheduling> list = value.stream().filter(item -> BC_TYPE_OUT.equals(item.getBcType()) && !Objects.isNull(item.getNbbm())).sorted(Comparator.comparing(DriverScheduling::getFcsjT)).collect(Collectors.toList()); | 416 | List<DriverScheduling> list = value.stream().filter(item -> BC_TYPE_OUT.equals(item.getBcType()) && !Objects.isNull(item.getNbbm())).sorted(Comparator.comparing(DriverScheduling::getFcsjT)).collect(Collectors.toList()); |