|
@@ -1570,6 +1570,25 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
|
|
1570
|
}
|
1570
|
}
|
|
1571
|
});
|
1571
|
});
|
|
1572
|
}
|
1572
|
}
|
|
|
|
1573
|
+ //补充被检查班科室数据
|
|
|
|
1574
|
+ List<Long> checkedTeamIdListTemp = all.stream().filter(item -> ObjectUtil.isNull(item.getCheckedDepartmentId())).map(CheckLargeScreenCorrectionPortraitSqlDto::getCheckedTeamId).distinct().collect(Collectors.toList());
|
|
|
|
1575
|
+ if (CollUtil.isNotEmpty(checkedTeamIdListTemp)) {
|
|
|
|
1576
|
+ List<SysDept> checkedTeamListTemp = sysDeptService.selectDeptByIdList(checkedTeamIdListTemp);
|
|
|
|
1577
|
+ if (CollUtil.isNotEmpty(checkedTeamListTemp)) {
|
|
|
|
1578
|
+ Map<Long, Long> deptIdMap = checkedTeamListTemp.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getParentId, (oldValue, newValue) -> newValue));
|
|
|
|
1579
|
+ List<Long> checkedDepartmentIdListTemp = checkedTeamListTemp.stream().map(SysDept::getParentId).collect(Collectors.toList());
|
|
|
|
1580
|
+ List<SysDept> checkedDepartmentListTemp = sysDeptService.selectDeptByIdList(checkedDepartmentIdListTemp);
|
|
|
|
1581
|
+ if (CollUtil.isNotEmpty(checkedDepartmentListTemp)) {
|
|
|
|
1582
|
+ Map<Long, String> deptMap = checkedDepartmentListTemp.stream().collect(Collectors.toMap(SysDept::getDeptId, SysDept::getDeptName, (oldValue, newValue) -> newValue));
|
|
|
|
1583
|
+ all.forEach(item -> {
|
|
|
|
1584
|
+ if (ObjectUtil.isNull(item.getCheckedDepartmentId())) {
|
|
|
|
1585
|
+ item.setCheckedDepartmentId(deptIdMap.getOrDefault(item.getCheckedTeamId(), 0L));
|
|
|
|
1586
|
+ item.setCheckedTeamName(deptMap.getOrDefault(item.getCheckedDepartmentId(), ""));
|
|
|
|
1587
|
+ }
|
|
|
|
1588
|
+ });
|
|
|
|
1589
|
+ }
|
|
|
|
1590
|
+ }
|
|
|
|
1591
|
+ }
|
|
1573
|
|
1592
|
|
|
1574
|
// 对全量数据进行过滤+处理返回数据
|
1593
|
// 对全量数据进行过滤+处理返回数据
|
|
1575
|
List<CheckLargeScreenCorrectionPortraitSqlDto> target;
|
1594
|
List<CheckLargeScreenCorrectionPortraitSqlDto> target;
|
|
@@ -1581,7 +1600,9 @@ public class CheckLargeScreenServiceImpl implements ICheckLargeScreenService {
|
|
1581
|
SysDept sysDept = sysDeptService.selectDeptById(dto.getDeptId());
|
1600
|
SysDept sysDept = sysDeptService.selectDeptById(dto.getDeptId());
|
|
1582
|
if (StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType())) {
|
1601
|
if (StrUtil.equals(DeptTypeEnum.STATION.getCode(), sysDept.getDeptType())) {
|
|
1583
|
target = all;
|
1602
|
target = all;
|
|
1584
|
- } else if (StrUtil.equals(DeptTypeEnum.DEPARTMENT.getCode(), sysDept.getDeptType())) {
|
|
|
|
|
|
1603
|
+ } else if (StrUtil.equals(DeptTypeEnum.BRIGADE.getCode(), sysDept.getDeptType())) {
|
|
|
|
1604
|
+ target = all.stream().filter(item -> ObjUtil.equals(item.getCheckedBrigadeId(), dto.getDeptId())).collect(Collectors.toList());
|
|
|
|
1605
|
+ } else if (StrUtil.equals(DeptTypeEnum.MANAGER.getCode(), sysDept.getDeptType())) {
|
|
1585
|
target = all.stream().filter(item -> ObjUtil.equals(item.getCheckedDepartmentId(), dto.getDeptId())).collect(Collectors.toList());
|
1606
|
target = all.stream().filter(item -> ObjUtil.equals(item.getCheckedDepartmentId(), dto.getDeptId())).collect(Collectors.toList());
|
|
1586
|
} else if (StrUtil.equals(DeptTypeEnum.TEAMS.getCode(), sysDept.getDeptType())) {
|
1607
|
} else if (StrUtil.equals(DeptTypeEnum.TEAMS.getCode(), sysDept.getDeptType())) {
|
|
1587
|
target = all.stream().filter(item -> ObjUtil.equals(item.getCheckedTeamId(), dto.getDeptId())).collect(Collectors.toList());
|
1608
|
target = all.stream().filter(item -> ObjUtil.equals(item.getCheckedTeamId(), dto.getDeptId())).collect(Collectors.toList());
|