|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.tuoheng.admin.service.accident.query; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.tuoheng.admin.conver.AccidentConverMapper; |
|
|
@@ -124,6 +125,9 @@ public class QueryAccidentCardListService { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private Map<String, String> getDeptMap(List<Accident> accidentList) { |
|
|
|
if (CollectionUtil.isEmpty(accidentList)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
List<String> deptIdList = accidentList.stream().map(o -> o.getDeptId()).collect(Collectors.toList()); |
|
|
|
List<Dept> deptList = deptMapper.selectListByIdList(deptIdList); |
|
|
|
Map<String, String> deptNameMap = deptList.stream().collect(HashMap::new, (m, v) -> m.put(v.getId(), v.getName()), HashMap::putAll); |
|
|
@@ -143,6 +147,9 @@ public class QueryAccidentCardListService { |
|
|
|
} |
|
|
|
|
|
|
|
private Map<String, InspectionFile> getInspectionFileMap(List<Accident> accidentList) { |
|
|
|
if (CollectionUtil.isEmpty(accidentList)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
List<String> inspectionFileIdList = accidentList.stream().map(o -> o.getInspectionFileId()).collect(Collectors.toList()); |
|
|
|
List<InspectionFile> inspectionFileList = inspectionFileMapper.selectList(new LambdaQueryWrapper<InspectionFile>() |
|
|
|
.in(InspectionFile::getId, inspectionFileIdList) |