| | |
| | | } |
| | | |
| | | @Override |
| | | public Map<Integer, List<BigStorageVO>> queryHollowbigStorageCageDetail() { |
| | | public Map<Object, Map<Integer, List<BigStorageVO>>> queryHollowbigStorageCageDetail() { |
| | | List<BigStorageVO> bigStorageCages = baseMapper.queryHollowbigStorageCageDetail(); |
| | | return bigStorageCages.stream().collect(Collectors.groupingBy(item -> item.getDeviceId())); |
| | | return bigStorageCages.stream() |
| | | // 第一层分组:key=slot值,value=该slot下的所有BigStorageVO |
| | | .collect(Collectors.groupingBy( |
| | | BigStorageVO::getDeviceId, // 第一层分组依据:slot |
| | | // 第二层分组:对第一层的value继续按deviceId分组 |
| | | Collectors.groupingBy(BigStorageVO::getSlot) |
| | | )); |
| | | // return bigStorageCages.stream().collect(Collectors.groupingBy(item -> item.getDeviceId())); |
| | | } |
| | | |
| | | @Override |