|
|
@@ -1813,7 +1813,7 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
|
|
1813
|
1813
|
Long deptId = dto.getDeptId();
|
|
1814
|
1814
|
if (ObjUtil.isNotNull(deptId)) {
|
|
1815
|
1815
|
SysDept sysDept = sysDeptService.selectDeptById(deptId);
|
|
1816
|
|
- if (!StrUtil.equals(DeptTypeEnum.DEPARTMENT.getCode(), sysDept.getDeptType())) {
|
|
|
1816
|
+ if (!StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType())) {
|
|
1817
|
1817
|
dto.setDeptId(null);
|
|
1818
|
1818
|
}
|
|
1819
|
1819
|
}
|
|
|
@@ -1851,7 +1851,7 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
|
|
1851
|
1851
|
Long deptId = dto.getDeptId();
|
|
1852
|
1852
|
if (ObjUtil.isNotNull(deptId)) {
|
|
1853
|
1853
|
SysDept sysDept = sysDeptService.selectDeptById(deptId);
|
|
1854
|
|
- if (!StrUtil.equals(DeptTypeEnum.DEPARTMENT.getCode(), sysDept.getDeptType())) {
|
|
|
1854
|
+ if (!StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType())) {
|
|
1855
|
1855
|
dto.setDeptId(null);
|
|
1856
|
1856
|
}
|
|
1857
|
1857
|
}
|
|
|
@@ -1899,13 +1899,32 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
|
|
1899
|
1899
|
}
|
|
1900
|
1900
|
});
|
|
1901
|
1901
|
}
|
|
|
1902
|
+ //补充被检查班科室数据
|
|
|
1903
|
+ List<Long> checkedTeamIdListTemp = all.stream().filter(item -> ObjectUtil.isNull(item.getCheckedDepartmentId())).map(CheckLargeScreenCorrectionPortraitSqlDto::getCheckedTeamId).distinct().collect(Collectors.toList());
|
|
|
1904
|
+ if (CollUtil.isNotEmpty(checkedTeamIdListTemp)) {
|
|
|
1905
|
+ List<SysDept> checkedTeamListTemp = sysDeptService.selectDeptByIdList(checkedTeamIdListTemp);
|
|
|
1906
|
+ if (CollUtil.isNotEmpty(checkedTeamListTemp)) {
|
|
|
1907
|
+ Map<Long, Long> deptIdMap = checkedTeamListTemp.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getParentId, (oldValue, newValue) -> newValue));
|
|
|
1908
|
+ List<Long> checkedDepartmentIdListTemp = checkedTeamListTemp.stream().map(SysDept::getParentId).collect(Collectors.toList());
|
|
|
1909
|
+ List<SysDept> checkedDepartmentListTemp = sysDeptService.selectDeptByIdList(checkedDepartmentIdListTemp);
|
|
|
1910
|
+ if (CollUtil.isNotEmpty(checkedDepartmentListTemp)) {
|
|
|
1911
|
+ Map<Long, String> deptMap = checkedDepartmentListTemp.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName, (oldValue, newValue) -> newValue));
|
|
|
1912
|
+ all.forEach(item -> {
|
|
|
1913
|
+ if (ObjectUtil.isNull(item.getCheckedDepartmentId())) {
|
|
|
1914
|
+ item.setCheckedDepartmentId(deptIdMap.getOrDefault(item.getCheckedTeamId(), 0L));
|
|
|
1915
|
+ item.setCheckedTeamName(deptMap.getOrDefault(item.getCheckedDepartmentId(), ""));
|
|
|
1916
|
+ }
|
|
|
1917
|
+ });
|
|
|
1918
|
+ }
|
|
|
1919
|
+ }
|
|
|
1920
|
+ }
|
|
1902
|
1921
|
|
|
1903
|
1922
|
// 筛选部门
|
|
1904
|
1923
|
Long deptId = dto.getDeptId();
|
|
1905
|
1924
|
if (ObjUtil.isNotNull(deptId)) {
|
|
1906
|
1925
|
SysDept sysDept = sysDeptService.selectDeptById(deptId);
|
|
1907
|
|
- if (StrUtil.equals(DeptTypeEnum.DEPARTMENT.getCode(), sysDept.getDeptType())) {
|
|
1908
|
|
- all = all.stream().filter(item -> item.getCheckedDepartmentId().equals(deptId)).collect(Collectors.toList());
|
|
|
1926
|
+ if (StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType())) {
|
|
|
1927
|
+ all = all.stream().filter(item -> item.getCheckedBrigadeId().equals(deptId)).collect(Collectors.toList());
|
|
1909
|
1928
|
}
|
|
1910
|
1929
|
}
|
|
1911
|
1930
|
|