Compare commits

...

2 Commits

Author SHA1 Message Date
2fb5b58c99 Merge remote-tracking branch 'origin/0.8.X' into 0.8.X 2026-05-22 14:56:21 +08:00
7b2881c45f refactor(eqp): 查询设备附带巡检部位 2026-05-22 14:56:10 +08:00

View File

@@ -59,9 +59,11 @@ public class EqpEquipmentPartServiceImpl implements IEqpEquipmentPartService {
List<EqpEquipmentChecklistVo> checklistList = checklistMapper.selectVoList(checklistLqw);
Map<Long, List<EqpEquipmentChecklistVo>> checklistMap = checklistList.stream()
.collect(Collectors.groupingBy(EqpEquipmentChecklistVo::getPartId));
result.getRecords().forEach(vo ->
vo.setChecklistList(checklistMap.getOrDefault(vo.getPartId(), Collections.emptyList()))
);
result.getRecords().forEach(vo -> {
List<EqpEquipmentChecklistVo> items = checklistMap.getOrDefault(vo.getPartId(), Collections.emptyList());
items.forEach(checklist -> checklist.setPartName(vo.getInspectPart()));
vo.setChecklistList(items);
});
}
return TableDataInfo.build(result);
}