|
@@ -3,6 +3,7 @@ package com.diagbot.facade;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.diagbot.dto.CheckDeptDTO;
|
|
import com.diagbot.dto.CheckDeptDTO;
|
|
|
|
+import com.diagbot.dto.CheckJobDTO;
|
|
import com.diagbot.dto.DeptCheckUserDTO;
|
|
import com.diagbot.dto.DeptCheckUserDTO;
|
|
import com.diagbot.entity.BasDeptInfo;
|
|
import com.diagbot.entity.BasDeptInfo;
|
|
import com.diagbot.entity.BasDoctorInfo;
|
|
import com.diagbot.entity.BasDoctorInfo;
|
|
@@ -18,6 +19,7 @@ import com.diagbot.service.impl.MedCheckInfoServiceImpl;
|
|
import com.diagbot.util.DateUtil;
|
|
import com.diagbot.util.DateUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.util.StringUtil;
|
|
import com.diagbot.util.SysUserUtils;
|
|
import com.diagbot.util.SysUserUtils;
|
|
|
|
+import com.diagbot.vo.CheckJobVO;
|
|
import com.diagbot.vo.CheckUserVO;
|
|
import com.diagbot.vo.CheckUserVO;
|
|
import com.diagbot.vo.MedCheckInfoAddVO;
|
|
import com.diagbot.vo.MedCheckInfoAddVO;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -131,6 +133,18 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
}
|
|
}
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * @Author songxl
|
|
|
|
+ * @Description 获取操作用户的核查科室以及人员
|
|
|
|
+ * @Date 2021/5/14
|
|
|
|
+ * @Param []
|
|
|
|
+ * @Return java.util.Map<java.lang.String,java.util.List<com.diagbot.dto.CheckDeptDTO>>
|
|
|
|
+ * @MethodName getCheckUserMap
|
|
|
|
+ */
|
|
|
|
+ public List<CheckJobDTO> getUserCheckList(CheckJobVO checkJobVO) {
|
|
|
|
+ //质控管理员要判断该角色是否是质控科
|
|
|
|
+ return this.getCheckList(checkJobVO);
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 获取操作用户的核查科室以及人员
|
|
* @Description 获取操作用户的核查科室以及人员
|
|
@@ -186,25 +200,30 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
Map<String, List<CheckDeptDTO>> checkRoleMap = new HashMap<>();
|
|
Map<String, List<CheckDeptDTO>> checkRoleMap = new HashMap<>();
|
|
for(Long id:searchRoleIds)
|
|
for(Long id:searchRoleIds)
|
|
{
|
|
{
|
|
- //不同角色不同查询方式
|
|
|
|
- switch (id.intValue())
|
|
|
|
|
|
+ try
|
|
{
|
|
{
|
|
- //临床科室监管人员
|
|
|
|
- case 4:
|
|
|
|
- getDeptCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
- break;
|
|
|
|
- //质控科监管人员
|
|
|
|
- case 5:
|
|
|
|
- getZKKCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
- break;
|
|
|
|
- //院级监管人员
|
|
|
|
- case 6:
|
|
|
|
- getYQCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ //不同角色不同查询方式
|
|
|
|
+ switch (id.intValue())
|
|
|
|
+ {
|
|
|
|
+ //临床科室监管人员
|
|
|
|
+ case 4:
|
|
|
|
+ getDeptCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
+ break;
|
|
|
|
+ //质控科监管人员
|
|
|
|
+ case 5:
|
|
|
|
+ getZKKCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
+ break;
|
|
|
|
+ //院级监管人员
|
|
|
|
+ case 6:
|
|
|
|
+ getYQCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e)
|
|
|
|
+ {
|
|
|
|
+ e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return checkRoleMap;
|
|
return checkRoleMap;
|
|
@@ -221,12 +240,14 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("role_id",roleId)
|
|
.eq("role_id",roleId)
|
|
).stream().map(SysUserRole::getUserId).collect(Collectors.toList());
|
|
).stream().map(SysUserRole::getUserId).collect(Collectors.toList());
|
|
|
|
+ if(userIds.isEmpty()){return;}
|
|
//1.3获取该用户id集合的科室id集合
|
|
//1.3获取该用户id集合的科室id集合
|
|
List<String> deptIds = sysUserDeptFacade.list(new QueryWrapper<SysUserDept>()
|
|
List<String> deptIds = sysUserDeptFacade.list(new QueryWrapper<SysUserDept>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("hospital_id",hospitalId)
|
|
.eq("hospital_id",hospitalId)
|
|
.in("user_id",userIds)
|
|
.in("user_id",userIds)
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
|
|
+ if(deptIds.isEmpty()){return;}
|
|
//2.1获取质控人员的科室信息
|
|
//2.1获取质控人员的科室信息
|
|
List<BasDeptInfo> deptInfos = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
List<BasDeptInfo> deptInfos = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -293,6 +314,7 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
.eq("hospital_id",hospitalId)
|
|
.eq("hospital_id",hospitalId)
|
|
.eq("user_id",principleId)
|
|
.eq("user_id",principleId)
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
|
|
+ if(deptIds.isEmpty()){return;}
|
|
//2.1获取科室详情
|
|
//2.1获取科室详情
|
|
List<BasDeptInfo> deptInfos = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
List<BasDeptInfo> deptInfos = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|