|
@@ -114,8 +114,7 @@ public class RecordCheckFacade {
|
|
|
deptIds.remove(deptInfo.getDeptId());
|
|
|
}
|
|
|
JobTypes.add(CheckJobTypeEnum.DEPT_SUPERVISOR.getKey() + "");
|
|
|
-// userIds.addAll(getUserIdsOfRoleId(hospitalId, deptIds, CheckerRoleEnum.DEPT_GENERAL.getKey()));
|
|
|
- userIds.addAll(getUserIdsOfRoleId(checkedRecordListVO,deptIds, CheckerRoleEnum.DEPT_GENERAL.getKey()));
|
|
|
+ userIds.addAll(getUserIdsOfRoleId(hospitalId, deptIds, CheckerRoleEnum.DEPT_GENERAL.getKey()));
|
|
|
} else if ((roleId.intValue() == CheckerRoleEnum.DEPT_GENERAL.getKey() && ListUtil.isNotEmpty(deptIds))
|
|
|
|| roleId.intValue() == CheckerRoleEnum.QUAT_GENERAL.getKey() || roleId.intValue() == CheckerRoleEnum.HOSP_GENERAL.getKey()) {
|
|
|
userIds.add(userId);
|
|
@@ -162,43 +161,6 @@ public class RecordCheckFacade {
|
|
|
return iPage;
|
|
|
}
|
|
|
|
|
|
- private List<Long> getUserIdsOfRoleId(CheckedRecordListVO checkedRecordListVO,List<String> depts, long roleId) {
|
|
|
- //如果没有添加医疗组筛选条件默认筛选全部医疗组
|
|
|
- List<String> codes = null;
|
|
|
- if (ListUtil.isEmpty(checkedRecordListVO.getMedoups())) {
|
|
|
- //通过科室获取医疗组
|
|
|
- List<DeptMedoup> deptMedoups = deptMedoupService.list(new QueryWrapper<DeptMedoup>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("dept_id", depts));
|
|
|
- if (ListUtil.isNotEmpty(deptMedoups)) {
|
|
|
- codes = deptMedoups.stream().map(DeptMedoup::getMedoupCode).collect(Collectors.toList());
|
|
|
- }
|
|
|
- } else {
|
|
|
- codes = checkedRecordListVO.getMedoups();
|
|
|
- }
|
|
|
- if (ListUtil.isNotEmpty(codes)) {
|
|
|
- List<BasDoctorInfo> basDoctorInfos = basDoctorInfoFacade.list(new QueryWrapper<BasDoctorInfo>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("group_id", codes));
|
|
|
- List<String> usernames = basDoctorInfos.stream().map(BasDoctorInfo::getDoctorId).collect(Collectors.toList());
|
|
|
- if (ListUtil.isEmpty(usernames)) {
|
|
|
- return null;
|
|
|
- }
|
|
|
- //获取用户id
|
|
|
- List<Long> userIds = sysUserFacade.list(new QueryWrapper<SysUser>()
|
|
|
- .in("username",usernames)
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- ).stream().map(SysUser::getId).collect(Collectors.toList());
|
|
|
- if (ListUtil.isEmpty(userIds)) {
|
|
|
- return null;
|
|
|
- }
|
|
|
- QueryWrapper<SysUserRole> sysUserRoleQueryWrapper = new QueryWrapper<>();
|
|
|
- sysUserRoleQueryWrapper.in("user_id", userIds);
|
|
|
- sysUserRoleQueryWrapper.eq("role_id", roleId);
|
|
|
- return sysUserRoleFacade.list(sysUserRoleQueryWrapper).stream().map(i -> i.getUserId()).collect(Collectors.toList());
|
|
|
- }
|
|
|
- return null;
|
|
|
- }
|
|
|
|
|
|
private List<Long> getUserIdsOfRoleId(Long hospitalId, List<String> deptIds, long roleId) {
|
|
|
QueryWrapper<SysUserDept> sysUserDeptQueryWrapper = new QueryWrapper<>();
|