| | |
| | | PageResult<CheckTypeDO> pageResult = checkTypeMapper.selectPageForCallingScreen(checkTypePageReqVO); |
| | | |
| | | // 显示列 包含的检查类型列表 |
| | | Map<Integer, List<CheckTypeDO>> mapDisplayColName = pageResult.getList().stream().collect(Collectors.groupingBy(CheckTypeDO::getCallingColumn)); |
| | | Map<Integer, List<CheckTypeDO>> mapDisplayColName = pageResult.getList().stream(). |
| | | collect( |
| | | Collectors.groupingBy( |
| | | CheckTypeDO::getCallingColumn, |
| | | Collectors.collectingAndThen( |
| | | Collectors.toList(), |
| | | list -> list.stream().sorted(Comparator.comparing(CheckTypeDO::getId)).toList() |
| | | ) |
| | | ) |
| | | ); |
| | | |
| | | // 检查类型 对应的显示列 |
| | | mapCheckTypeVsDisplayColumn = pageResult.getList().stream().collect(Collectors.toMap(CheckTypeDO::getValue, item -> item.getCallingColumn())); |
| | |
| | | // 显示列 对应的检查类型名列表 |
| | | Map<Integer, List<String>> _map = new HashMap<>(); |
| | | mapDisplayColName.keySet().forEach(key -> { |
| | | _map.put(key, mapDisplayColName.get(key).stream().map(item->item.getName()+item.getSeqPrefix()).toList()); |
| | | List<String> displayColNameList = mapDisplayColName.get(key).stream().map(item->item.getName()+item.getSeqPrefix()).toList(); |
| | | _map.put(key, displayColNameList); |
| | | }); |
| | | return _map; |
| | | } |