|
@@ -141,15 +141,16 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
}
|
|
}
|
|
return res;
|
|
return res;
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 获取操作用户的核查科室以及人员
|
|
* @Description 获取操作用户的核查科室以及人员
|
|
- * @Date 2021/5/14
|
|
|
|
|
|
+ * @Date 2021/5/14
|
|
* @Param []
|
|
* @Param []
|
|
- * @Return java.util.Map<java.lang.String,java.util.List<com.diagbot.dto.CheckDeptDTO>>
|
|
|
|
|
|
+ * @Return java.util.Map<java.lang.String, java.util.List < com.diagbot.dto.CheckDeptDTO>>
|
|
* @MethodName getCheckUserMap
|
|
* @MethodName getCheckUserMap
|
|
*/
|
|
*/
|
|
- public IPage<CheckJobDTO> getUserCheckList(CheckJobPageVO checkJobVO) {
|
|
|
|
|
|
+ public IPage<CheckJobDTO> getUserCheckList(CheckJobPageVO checkJobVO) {
|
|
//校验
|
|
//校验
|
|
userCheckPageSet(checkJobVO);
|
|
userCheckPageSet(checkJobVO);
|
|
//质控管理员要判断该角色是否是质控科
|
|
//质控管理员要判断该角色是否是质控科
|
|
@@ -160,7 +161,7 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
//获取核查监管相关角色id
|
|
//获取核查监管相关角色id
|
|
List<Long> checkRoleIds = sysRoleFacade.list(new QueryWrapper<SysRole>()
|
|
List<Long> checkRoleIds = sysRoleFacade.list(new QueryWrapper<SysRole>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .like("name","监管人员")
|
|
|
|
|
|
+ .like("name", "监管人员")
|
|
).stream().map(SysRole::getId).collect(Collectors.toList());
|
|
).stream().map(SysRole::getId).collect(Collectors.toList());
|
|
//查询该角色的所有角色id
|
|
//查询该角色的所有角色id
|
|
List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
|
|
List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
|
|
@@ -169,35 +170,30 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
|
).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
|
List<Long> searchRoleIds = new ArrayList<>();
|
|
List<Long> searchRoleIds = new ArrayList<>();
|
|
//当前用户是监管人员或者是超级管理员
|
|
//当前用户是监管人员或者是超级管理员
|
|
- if(roleIds.contains(-1L))
|
|
|
|
- {
|
|
|
|
|
|
+ if (roleIds.contains(-1L)) {
|
|
searchRoleIds.addAll(checkRoleIds);
|
|
searchRoleIds.addAll(checkRoleIds);
|
|
|
|
+ } else {
|
|
|
|
+ searchRoleIds.addAll(containsRole(checkRoleIds, roleIds));
|
|
}
|
|
}
|
|
- else{
|
|
|
|
- searchRoleIds.addAll(containsRole(checkRoleIds,roleIds));
|
|
|
|
- }
|
|
|
|
- if(searchRoleIds.isEmpty())
|
|
|
|
- {
|
|
|
|
|
|
+ if (searchRoleIds.isEmpty()) {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该用户不是核查监管人员!");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该用户不是核查监管人员!");
|
|
}
|
|
}
|
|
//质控科监管人员
|
|
//质控科监管人员
|
|
- if(searchRoleIds.contains(CheckerRoleEnum.QUAT_SUPERVISOR.getKey()*1l)
|
|
|
|
- &&(CheckJobTypeEnum.QUAT_SUPERVISOR.getKey()+"").equals(checkJobVO.getJobType()))
|
|
|
|
- {
|
|
|
|
|
|
+ if (searchRoleIds.contains(CheckerRoleEnum.QUAT_SUPERVISOR.getKey() * 1l)
|
|
|
|
+ && (CheckJobTypeEnum.QUAT_SUPERVISOR.getKey() + "").equals(checkJobVO.getJobType())) {
|
|
//用户是不是质管科人员校验
|
|
//用户是不是质管科人员校验
|
|
- String zkkDeptId = basDeptInfoFacade.getOne(new QueryWrapper<BasDeptInfo>()
|
|
|
|
|
|
+ BasDeptInfo deptInfo = basDeptInfoFacade.getOne(new QueryWrapper<BasDeptInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .eq("hospital_id",hospitalId)
|
|
|
|
- .like("dept_name","质管科")).getDeptId();
|
|
|
|
- if(StringUtil.isBlank(zkkDeptId))
|
|
|
|
- {
|
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "科室质管科不存在!");
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .eq("station", "质管"));
|
|
|
|
+ if (deptInfo == null || deptInfo.getDeptId() == null) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "科室质管科不存在,请联系管理员!");
|
|
}
|
|
}
|
|
//2.获取监管人员所在科室集合
|
|
//2.获取监管人员所在科室集合
|
|
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("user_id",principleId)
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .eq("user_id", principleId)
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
//3.判断这个人是否在质控科
|
|
//3.判断这个人是否在质控科
|
|
// if(deptIds.contains(zkkDeptId))
|
|
// if(deptIds.contains(zkkDeptId))
|
|
@@ -208,31 +204,27 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
return getCheckList(checkJobVO);
|
|
return getCheckList(checkJobVO);
|
|
}
|
|
}
|
|
//临床科室监管人员 或 院级监管人员
|
|
//临床科室监管人员 或 院级监管人员
|
|
- else if(searchRoleIds.contains(CheckerRoleEnum.DEPT_SUPERVISOR.getKey()*1l)
|
|
|
|
- ||searchRoleIds.contains(CheckerRoleEnum.HOSP_SUPERVISOR.getKey()*1l))
|
|
|
|
- {
|
|
|
|
|
|
+ else if (searchRoleIds.contains(CheckerRoleEnum.DEPT_SUPERVISOR.getKey() * 1l)
|
|
|
|
+ || searchRoleIds.contains(CheckerRoleEnum.HOSP_SUPERVISOR.getKey() * 1l)) {
|
|
//查询没有指定科室
|
|
//查询没有指定科室
|
|
- if(checkJobVO.getDeptList()==null||checkJobVO.getDeptList().isEmpty())
|
|
|
|
- {
|
|
|
|
|
|
+ if (checkJobVO.getDeptList() == null || checkJobVO.getDeptList().isEmpty()) {
|
|
//科室获取待分配任务所在科室集合
|
|
//科室获取待分配任务所在科室集合
|
|
- if(CheckJobTypeEnum.DEPT_SUPERVISOR.getKey()==Integer.parseInt(checkJobVO.getJobType())){
|
|
|
|
|
|
+ if (CheckJobTypeEnum.DEPT_SUPERVISOR.getKey() == Integer.parseInt(checkJobVO.getJobType())) {
|
|
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("user_id",principleId)
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .eq("user_id", principleId)
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
|
|
|
|
- if(deptIds!=null&&!deptIds.isEmpty()){
|
|
|
|
|
|
+ if (deptIds != null && !deptIds.isEmpty()) {
|
|
checkJobVO.setDeptList(deptIds);
|
|
checkJobVO.setDeptList(deptIds);
|
|
return getCheckList(checkJobVO);
|
|
return getCheckList(checkJobVO);
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- return new CheckJobPageVO();
|
|
|
|
|
|
+ } else {
|
|
|
|
+ return new CheckJobPageVO();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//院区获取
|
|
//院区获取
|
|
- if(CheckJobTypeEnum.HOSP_SUPERVISOR.getKey()==Integer.parseInt(checkJobVO.getJobType())){
|
|
|
|
|
|
+ if (CheckJobTypeEnum.HOSP_SUPERVISOR.getKey() == Integer.parseInt(checkJobVO.getJobType())) {
|
|
// //获取管理员所在科室
|
|
// //获取管理员所在科室
|
|
// 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())
|
|
@@ -256,39 +248,34 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return getCheckList(checkJobVO);
|
|
return getCheckList(checkJobVO);
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
|
|
+ } else {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该用户的角色和任务类型不对应!");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该用户的角色和任务类型不对应!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 待分配列表页面校验
|
|
* @Description 待分配列表页面校验
|
|
- * @Date 2021/5/18
|
|
|
|
|
|
+ * @Date 2021/5/18
|
|
* @Param [checkJobVO]
|
|
* @Param [checkJobVO]
|
|
* @Return void
|
|
* @Return void
|
|
* @MethodName userCheckPageSet
|
|
* @MethodName userCheckPageSet
|
|
*/
|
|
*/
|
|
- private void userCheckPageSet(CheckJobPageVO checkJobVO) {
|
|
|
|
- if(StringUtil.isBlank(checkJobVO.getStartTime())&&StringUtil.isBlank(checkJobVO.getEndTime())
|
|
|
|
- &&StringUtil.isBlank(checkJobVO.getBehosDateStart())&&StringUtil.isBlank(checkJobVO.getBehosDateEnd()))
|
|
|
|
- {
|
|
|
|
|
|
+ private void userCheckPageSet(CheckJobPageVO checkJobVO) {
|
|
|
|
+ if (StringUtil.isBlank(checkJobVO.getStartTime()) && StringUtil.isBlank(checkJobVO.getEndTime())
|
|
|
|
+ && StringUtil.isBlank(checkJobVO.getBehosDateStart()) && StringUtil.isBlank(checkJobVO.getBehosDateEnd())) {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "没有时间区间!");
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "没有时间区间!");
|
|
}
|
|
}
|
|
- if(StringUtil.isBlank(checkJobVO.getJobType()))
|
|
|
|
- {
|
|
|
|
|
|
+ if (StringUtil.isBlank(checkJobVO.getJobType())) {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "没有任务类型!");
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "没有任务类型!");
|
|
}
|
|
}
|
|
- if(StringUtil.isNotBlank(checkJobVO.getBehosDateStart())&&StringUtil.isNotBlank(checkJobVO.getBehosDateEnd()))
|
|
|
|
- {
|
|
|
|
|
|
+ if (StringUtil.isNotBlank(checkJobVO.getBehosDateStart()) && StringUtil.isNotBlank(checkJobVO.getBehosDateEnd())) {
|
|
if (DateUtil.after(DateUtil.parseDate(checkJobVO.getBehosDateStart()),
|
|
if (DateUtil.after(DateUtil.parseDate(checkJobVO.getBehosDateStart()),
|
|
DateUtil.parseDate(checkJobVO.getBehosDateEnd()))) {
|
|
DateUtil.parseDate(checkJobVO.getBehosDateEnd()))) {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "出院时间的开始时间必须小于结束时间!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(StringUtil.isNotBlank(checkJobVO.getStartTime())&&StringUtil.isNotBlank(checkJobVO.getEndTime()))
|
|
|
|
- {
|
|
|
|
|
|
+ if (StringUtil.isNotBlank(checkJobVO.getStartTime()) && StringUtil.isNotBlank(checkJobVO.getEndTime())) {
|
|
if (DateUtil.after(DateUtil.parseDate(checkJobVO.getStartTime()),
|
|
if (DateUtil.after(DateUtil.parseDate(checkJobVO.getStartTime()),
|
|
DateUtil.parseDate(checkJobVO.getEndTime()))) {
|
|
DateUtil.parseDate(checkJobVO.getEndTime()))) {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "任务生成的开始时间必须小于结束时间!");
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "任务生成的开始时间必须小于结束时间!");
|
|
@@ -300,9 +287,9 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 获取操作用户的核查科室以及科室核查人员
|
|
* @Description 获取操作用户的核查科室以及科室核查人员
|
|
- * @Date 2021/5/14
|
|
|
|
|
|
+ * @Date 2021/5/14
|
|
* @Param []
|
|
* @Param []
|
|
- * @Return java.util.Map<java.lang.String,java.util.List<com.diagbot.dto.CheckDeptDTO>>
|
|
|
|
|
|
+ * @Return java.util.Map<java.lang.String, java.util.List < com.diagbot.dto.CheckDeptDTO>>
|
|
* @MethodName getCheckUserMap
|
|
* @MethodName getCheckUserMap
|
|
*/
|
|
*/
|
|
public Map<String, List<CheckDeptDTO>> getCheckUserMap() {
|
|
public Map<String, List<CheckDeptDTO>> getCheckUserMap() {
|
|
@@ -314,7 +301,7 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
//获取核查监管相关角色id
|
|
//获取核查监管相关角色id
|
|
List<Long> checkRoleIds = sysRoleFacade.list(new QueryWrapper<SysRole>()
|
|
List<Long> checkRoleIds = sysRoleFacade.list(new QueryWrapper<SysRole>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .like("name","监管人员")
|
|
|
|
|
|
+ .like("name", "监管人员")
|
|
).stream().map(SysRole::getId).collect(Collectors.toList());
|
|
).stream().map(SysRole::getId).collect(Collectors.toList());
|
|
//查询该角色的所有角色id
|
|
//查询该角色的所有角色id
|
|
List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
|
|
List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
|
|
@@ -323,66 +310,60 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
|
).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
|
List<Long> searchRoleIds = new ArrayList<>();
|
|
List<Long> searchRoleIds = new ArrayList<>();
|
|
//当前用户是监管人员或者是超级管理员
|
|
//当前用户是监管人员或者是超级管理员
|
|
- if(roleIds.contains(-1L))
|
|
|
|
- {
|
|
|
|
- searchRoleIds.addAll(checkRoleIds);
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
- searchRoleIds.addAll(containsRole(checkRoleIds,roleIds));
|
|
|
|
|
|
+ if (roleIds.contains(-1L)) {
|
|
|
|
+ searchRoleIds.addAll(checkRoleIds);
|
|
|
|
+ } else {
|
|
|
|
+ searchRoleIds.addAll(containsRole(checkRoleIds, roleIds));
|
|
}
|
|
}
|
|
- if(searchRoleIds.isEmpty())
|
|
|
|
- {
|
|
|
|
|
|
+ if (searchRoleIds.isEmpty()) {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该用户不是核查监管人员!");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该用户不是核查监管人员!");
|
|
}
|
|
}
|
|
//2.获取相应角色对应的科室以及核查人员
|
|
//2.获取相应角色对应的科室以及核查人员
|
|
- Map<String, List<CheckDeptDTO>> checkUserMap = getCheckRoleMap(searchRoleIds,hospitalId,principleId);
|
|
|
|
|
|
+ Map<String, List<CheckDeptDTO>> checkUserMap = getCheckRoleMap(searchRoleIds, hospitalId, principleId);
|
|
return checkUserMap;
|
|
return checkUserMap;
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 获取相应角色对应的科室以及核查人员
|
|
* @Description 获取相应角色对应的科室以及核查人员
|
|
- * @Date 2021/5/14
|
|
|
|
|
|
+ * @Date 2021/5/14
|
|
* @Param [searchRoleIds]
|
|
* @Param [searchRoleIds]
|
|
- * @Return java.util.Map<java.lang.String,java.util.List<java.util.Map<java.lang.String,java.lang.Object>>>
|
|
|
|
|
|
+ * @Return java.util.Map<java.lang.String, java.util.List < java.util.Map < java.lang.String, java.lang.Object>>>
|
|
* @MethodName getCheckRoleMap
|
|
* @MethodName getCheckRoleMap
|
|
*/
|
|
*/
|
|
|
|
|
|
- private Map<String, List<CheckDeptDTO>> getCheckRoleMap(List<Long> searchRoleIds,Long hospitalId,Long principleId) {
|
|
|
|
|
|
+ private Map<String, List<CheckDeptDTO>> getCheckRoleMap(List<Long> searchRoleIds, Long hospitalId, Long principleId) {
|
|
Map<String, List<CheckDeptDTO>> checkRoleMap = new HashMap<>();
|
|
Map<String, List<CheckDeptDTO>> checkRoleMap = new HashMap<>();
|
|
- for(Long id:searchRoleIds)
|
|
|
|
- {
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
|
|
+ for (Long id : searchRoleIds) {
|
|
|
|
+ try {
|
|
//不同角色不同查询方式
|
|
//不同角色不同查询方式
|
|
- switch (id.intValue())
|
|
|
|
- {
|
|
|
|
|
|
+ switch (id.intValue()) {
|
|
//临床科室监管人员
|
|
//临床科室监管人员
|
|
case 4:
|
|
case 4:
|
|
- getDeptCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
|
|
+ getDeptCheckInfo(checkRoleMap, hospitalId, principleId);
|
|
break;
|
|
break;
|
|
//质控科监管人员
|
|
//质控科监管人员
|
|
case 5:
|
|
case 5:
|
|
- getZKKCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
|
|
+ getZKKCheckInfo(checkRoleMap, hospitalId, principleId);
|
|
break;
|
|
break;
|
|
//院级监管人员
|
|
//院级监管人员
|
|
case 6:
|
|
case 6:
|
|
- getYQCheckInfo(checkRoleMap,hospitalId,principleId);
|
|
|
|
|
|
+ getYQCheckInfo(checkRoleMap, hospitalId, principleId);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- }
|
|
|
|
- catch (Exception e)
|
|
|
|
- {
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return checkRoleMap;
|
|
return checkRoleMap;
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 院区管理员获取管理的科室以及科室包涵质控人员
|
|
* @Description 院区管理员获取管理的科室以及科室包涵质控人员
|
|
- * @Date 2021/5/17
|
|
|
|
|
|
+ * @Date 2021/5/17
|
|
* @Param [checkRoleMap, hospitalId, principleId]
|
|
* @Param [checkRoleMap, hospitalId, principleId]
|
|
* @Return void
|
|
* @Return void
|
|
* @MethodName getYQCheckInfo
|
|
* @MethodName getYQCheckInfo
|
|
@@ -391,35 +372,37 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
//1.获取院级质控人员有哪些
|
|
//1.获取院级质控人员有哪些
|
|
//1.1获取院级质控人员角色id
|
|
//1.1获取院级质控人员角色id
|
|
CheckUserVO checkUserVOS = new CheckUserVO();
|
|
CheckUserVO checkUserVOS = new CheckUserVO();
|
|
- checkUserVOS.setRoleIds(Lists.newArrayList(CheckerRoleEnum.HOSP_GENERAL.getKey()*1l));
|
|
|
|
|
|
+ checkUserVOS.setRoleIds(Lists.newArrayList(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l));
|
|
checkUserVOS.setDeptStations(Lists.newArrayList("住院"));
|
|
checkUserVOS.setDeptStations(Lists.newArrayList("住院"));
|
|
checkUserVOS.setHospitalId(hospitalId);
|
|
checkUserVOS.setHospitalId(hospitalId);
|
|
List<CheckUserDTO> checkUserDTOS = baseMapper.getCheckUser(checkUserVOS);
|
|
List<CheckUserDTO> checkUserDTOS = baseMapper.getCheckUser(checkUserVOS);
|
|
//2.用户科室整合
|
|
//2.用户科室整合
|
|
- margeDept(checkRoleMap,checkUserDTOS,CheckerRoleEnum.HOSP_SUPERVISOR.getKey()+"");
|
|
|
|
- if(!ListUtil.isEmpty(checkRoleMap.get(CheckerRoleEnum.HOSP_SUPERVISOR.getKey()+""))){
|
|
|
|
|
|
+ margeDept(checkRoleMap, checkUserDTOS, CheckerRoleEnum.HOSP_SUPERVISOR.getKey() + "");
|
|
|
|
+ if (!ListUtil.isEmpty(checkRoleMap.get(CheckerRoleEnum.HOSP_SUPERVISOR.getKey() + ""))) {
|
|
//2.3获取所有医生信息的核查数
|
|
//2.3获取所有医生信息的核查数
|
|
CheckUserVO checkUserVO = new CheckUserVO();
|
|
CheckUserVO checkUserVO = new CheckUserVO();
|
|
checkUserVO.setJobType(CheckJobTypeEnum.HOSP_SUPERVISOR.getKey());
|
|
checkUserVO.setJobType(CheckJobTypeEnum.HOSP_SUPERVISOR.getKey());
|
|
//通过核查人员id获取核查人员的核查任务数
|
|
//通过核查人员id获取核查人员的核查任务数
|
|
List<DeptCheckUserDTO> userJobs = baseMapper.getDeptJobNumByUserId(checkUserVO);
|
|
List<DeptCheckUserDTO> userJobs = baseMapper.getDeptJobNumByUserId(checkUserVO);
|
|
- addCheckInfoMaps(checkRoleMap,null,userJobs,checkUserDTOS,CheckerRoleEnum.HOSP_SUPERVISOR.getKey(),CheckJobTypeEnum.HOSP_SUPERVISOR.getKey());
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- checkRoleMap.put(CheckerRoleEnum.HOSP_SUPERVISOR.getKey()+"",new ArrayList<>());
|
|
|
|
|
|
+ addCheckInfoMaps(checkRoleMap, null, userJobs, checkUserDTOS, CheckerRoleEnum.HOSP_SUPERVISOR.getKey(), CheckJobTypeEnum.HOSP_SUPERVISOR.getKey());
|
|
|
|
+ } else {
|
|
|
|
+ checkRoleMap.put(CheckerRoleEnum.HOSP_SUPERVISOR.getKey() + "", new ArrayList<>());
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 院区人员用户科室合并
|
|
* @Description 院区人员用户科室合并
|
|
- * @Date 2021/6/1
|
|
|
|
|
|
+ * @Date 2021/6/1
|
|
* @Param [checkRoleMap, checkUserDTOS, s]
|
|
* @Param [checkRoleMap, checkUserDTOS, s]
|
|
* @Return void
|
|
* @Return void
|
|
* @MethodName margeDept
|
|
* @MethodName margeDept
|
|
*/
|
|
*/
|
|
private void margeDept(Map<String, List<CheckDeptDTO>> checkRoleMap, List<CheckUserDTO> checkUserDTOS, String roleId) {
|
|
private void margeDept(Map<String, List<CheckDeptDTO>> checkRoleMap, List<CheckUserDTO> checkUserDTOS, String roleId) {
|
|
- if(ListUtil.isEmpty(checkUserDTOS)){return;}
|
|
|
|
|
|
+ if (ListUtil.isEmpty(checkUserDTOS)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
Set<String> userIds = checkUserDTOS.stream().map(CheckUserDTO::getDoctorId).collect(Collectors.toSet());
|
|
Set<String> userIds = checkUserDTOS.stream().map(CheckUserDTO::getDoctorId).collect(Collectors.toSet());
|
|
try {
|
|
try {
|
|
List<CheckDeptDTO> tempDepts = new ArrayList<>();
|
|
List<CheckDeptDTO> tempDepts = new ArrayList<>();
|
|
@@ -433,13 +416,15 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
StringBuilder deptNameBuilder = new StringBuilder();
|
|
StringBuilder deptNameBuilder = new StringBuilder();
|
|
StringBuilder userName = new StringBuilder();
|
|
StringBuilder userName = new StringBuilder();
|
|
checkUserDTOS.stream().forEach(checkUserDTO -> {
|
|
checkUserDTOS.stream().forEach(checkUserDTO -> {
|
|
- if(userId.equals(checkUserDTO.getDoctorId())){
|
|
|
|
|
|
+ if (userId.equals(checkUserDTO.getDoctorId())) {
|
|
deptIdBuilder.append(checkUserDTO.getDeptId()).append(",");
|
|
deptIdBuilder.append(checkUserDTO.getDeptId()).append(",");
|
|
deptNameBuilder.append(checkUserDTO.getDeptName()).append(",");
|
|
deptNameBuilder.append(checkUserDTO.getDeptName()).append(",");
|
|
- if(userName.length()==0){userName.append(checkUserDTO.getDoctorName());}
|
|
|
|
|
|
+ if (userName.length() == 0) {
|
|
|
|
+ userName.append(checkUserDTO.getDoctorName());
|
|
|
|
+ }
|
|
//除了全部以外添加科室信息
|
|
//除了全部以外添加科室信息
|
|
- if(!tempDepts.stream().map(CheckDeptDTO::getDeptId).collect(Collectors.toList())
|
|
|
|
- .contains(checkUserDTO.getDeptId())){
|
|
|
|
|
|
+ if (!tempDepts.stream().map(CheckDeptDTO::getDeptId).collect(Collectors.toList())
|
|
|
|
+ .contains(checkUserDTO.getDeptId())) {
|
|
CheckDeptDTO oneCheckUser = new CheckDeptDTO();
|
|
CheckDeptDTO oneCheckUser = new CheckDeptDTO();
|
|
oneCheckUser.setDeptId(checkUserDTO.getDeptId());
|
|
oneCheckUser.setDeptId(checkUserDTO.getDeptId());
|
|
oneCheckUser.setDeptName(checkUserDTO.getDeptName());
|
|
oneCheckUser.setDeptName(checkUserDTO.getDeptName());
|
|
@@ -449,8 +434,8 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
});
|
|
});
|
|
|
|
|
|
//合并科室
|
|
//合并科室
|
|
- String deptId = deptIdBuilder.substring(0,deptIdBuilder.length()-1);
|
|
|
|
- String deptName = deptNameBuilder.substring(0,deptNameBuilder.length()-1);
|
|
|
|
|
|
+ String deptId = deptIdBuilder.substring(0, deptIdBuilder.length() - 1);
|
|
|
|
+ String deptName = deptNameBuilder.substring(0, deptNameBuilder.length() - 1);
|
|
//科室用户
|
|
//科室用户
|
|
DeptCheckUserDTO deptCheckUserDTO = new DeptCheckUserDTO();
|
|
DeptCheckUserDTO deptCheckUserDTO = new DeptCheckUserDTO();
|
|
deptCheckUserDTO.setDoctorId(userId);
|
|
deptCheckUserDTO.setDoctorId(userId);
|
|
@@ -459,28 +444,27 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
deptCheckUserDTO.setDeptName(deptName);
|
|
deptCheckUserDTO.setDeptName(deptName);
|
|
AtomicBoolean hasFlag = new AtomicBoolean(false);
|
|
AtomicBoolean hasFlag = new AtomicBoolean(false);
|
|
//全部处理
|
|
//全部处理
|
|
- if(ListUtil.isEmpty(allCheckDept.getDeptcheckUsers())){
|
|
|
|
|
|
+ if (ListUtil.isEmpty(allCheckDept.getDeptcheckUsers())) {
|
|
allCheckDept.getDeptcheckUsers().add(deptCheckUserDTO);
|
|
allCheckDept.getDeptcheckUsers().add(deptCheckUserDTO);
|
|
}
|
|
}
|
|
allCheckDept.getDeptcheckUsers().forEach(oneDeptCheckUser -> {
|
|
allCheckDept.getDeptcheckUsers().forEach(oneDeptCheckUser -> {
|
|
- if(!userId.equals(oneDeptCheckUser.getDoctorId()))
|
|
|
|
- {
|
|
|
|
|
|
+ if (!userId.equals(oneDeptCheckUser.getDoctorId())) {
|
|
hasFlag.set(true);
|
|
hasFlag.set(true);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- if(hasFlag.get()){
|
|
|
|
|
|
+ if (hasFlag.get()) {
|
|
allCheckDept.getDeptcheckUsers().add(deptCheckUserDTO);
|
|
allCheckDept.getDeptcheckUsers().add(deptCheckUserDTO);
|
|
}
|
|
}
|
|
|
|
|
|
tempDepts.stream().forEach(checkDeptDTO -> {
|
|
tempDepts.stream().forEach(checkDeptDTO -> {
|
|
- if(deptId.contains(checkDeptDTO.getDeptId())){
|
|
|
|
|
|
+ if (deptId.contains(checkDeptDTO.getDeptId())) {
|
|
checkDeptDTO.getDeptcheckUsers().add(deptCheckUserDTO);
|
|
checkDeptDTO.getDeptcheckUsers().add(deptCheckUserDTO);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- tempDepts.add(0,allCheckDept);
|
|
|
|
- checkRoleMap.put(roleId+"",tempDepts);
|
|
|
|
- }catch (Exception e){
|
|
|
|
|
|
+ tempDepts.add(0, allCheckDept);
|
|
|
|
+ checkRoleMap.put(roleId + "", tempDepts);
|
|
|
|
+ } catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -489,20 +473,19 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 质控科管理员获取管理的科室以及科室包涵质控人员
|
|
* @Description 质控科管理员获取管理的科室以及科室包涵质控人员
|
|
- * @Date 2021/5/17
|
|
|
|
|
|
+ * @Date 2021/5/17
|
|
* @Param [checkRoleMap, hospitalId, principleId]
|
|
* @Param [checkRoleMap, hospitalId, principleId]
|
|
* @Return void
|
|
* @Return void
|
|
* @MethodName getZKKCheckInfo
|
|
* @MethodName getZKKCheckInfo
|
|
*/
|
|
*/
|
|
private void getZKKCheckInfo(Map<String, List<CheckDeptDTO>> checkRoleMap, Long hospitalId, Long principleId) {
|
|
private void getZKKCheckInfo(Map<String, List<CheckDeptDTO>> checkRoleMap, Long hospitalId, Long principleId) {
|
|
//1.获取质控科id
|
|
//1.获取质控科id
|
|
- String zkkDeptId = basDeptInfoFacade.getOne(new QueryWrapper<BasDeptInfo>()
|
|
|
|
|
|
+ BasDeptInfo deptInfo = basDeptInfoFacade.getOne(new QueryWrapper<BasDeptInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .eq("hospital_id",hospitalId)
|
|
|
|
- .like("dept_name","质管科")).getDeptId();
|
|
|
|
- if(StringUtil.isBlank(zkkDeptId))
|
|
|
|
- {
|
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "科室质管科不存在!");
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .eq("station", "质管"));
|
|
|
|
+ if (deptInfo == null || deptInfo.getDeptId() == null) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "科室质管科不存在,请联系管理员!");
|
|
}
|
|
}
|
|
// //2.获取监管人员所在科室集合
|
|
// //2.获取监管人员所在科室集合
|
|
// List<String> deptIds = sysUserDeptFacade.list(new QueryWrapper<SysUserDept>()
|
|
// List<String> deptIds = sysUserDeptFacade.list(new QueryWrapper<SysUserDept>()
|
|
@@ -518,20 +501,19 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
// }
|
|
// }
|
|
CheckUserVO checkUserVOS = new CheckUserVO();
|
|
CheckUserVO checkUserVOS = new CheckUserVO();
|
|
//质管科人员角色
|
|
//质管科人员角色
|
|
- checkUserVOS.setRoleIds(Lists.newArrayList(CheckerRoleEnum.QUAT_GENERAL.getKey()*1l));
|
|
|
|
|
|
+ checkUserVOS.setRoleIds(Lists.newArrayList(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l));
|
|
//质管科
|
|
//质管科
|
|
checkUserVOS.setDeptStations(Lists.newArrayList("质管"));
|
|
checkUserVOS.setDeptStations(Lists.newArrayList("质管"));
|
|
- checkUserVOS.setDeptIds(Lists.newArrayList(zkkDeptId));
|
|
|
|
|
|
+ checkUserVOS.setDeptIds(Lists.newArrayList(deptInfo.getDeptId()));
|
|
checkUserVOS.setHospitalId(hospitalId);
|
|
checkUserVOS.setHospitalId(hospitalId);
|
|
List<CheckUserDTO> checkUserDTOS = baseMapper.getCheckUser(checkUserVOS);
|
|
List<CheckUserDTO> checkUserDTOS = baseMapper.getCheckUser(checkUserVOS);
|
|
//2.1获取科室详情
|
|
//2.1获取科室详情
|
|
- Map<String,String> deptMap = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
|
|
|
|
+ Map<String, String> deptMap = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .eq("hospital_id",hospitalId)
|
|
|
|
- .in("dept_id",Lists.newArrayList(zkkDeptId))).stream()
|
|
|
|
- .collect(Collectors.toMap(BasDeptInfo::getDeptId,BasDeptInfo::getDeptName, (v1, v2) -> v2));
|
|
|
|
- if(deptMap!=null&&!deptMap.isEmpty())
|
|
|
|
- {
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .in("dept_id", Lists.newArrayList(deptInfo.getDeptId()))).stream()
|
|
|
|
+ .collect(Collectors.toMap(BasDeptInfo::getDeptId, BasDeptInfo::getDeptName, (v1, v2) -> v2));
|
|
|
|
+ if (deptMap != null && !deptMap.isEmpty()) {
|
|
//2.3获取质控科核查人员的核查数
|
|
//2.3获取质控科核查人员的核查数
|
|
List<String> doctorIds = checkUserDTOS.stream().map(CheckUserDTO::getDoctorId).collect(Collectors.toList());
|
|
List<String> doctorIds = checkUserDTOS.stream().map(CheckUserDTO::getDoctorId).collect(Collectors.toList());
|
|
CheckUserVO checkUserVO = new CheckUserVO();
|
|
CheckUserVO checkUserVO = new CheckUserVO();
|
|
@@ -540,19 +522,19 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
//通过核查人员id获取核查人员的核查任务数
|
|
//通过核查人员id获取核查人员的核查任务数
|
|
List<DeptCheckUserDTO> userJobs = baseMapper.getDeptJobNumByUserId(checkUserVO);
|
|
List<DeptCheckUserDTO> userJobs = baseMapper.getDeptJobNumByUserId(checkUserVO);
|
|
userJobs.stream().forEach(deptCheckUserDTO -> {
|
|
userJobs.stream().forEach(deptCheckUserDTO -> {
|
|
- deptCheckUserDTO.setDeptId(zkkDeptId);
|
|
|
|
|
|
+ deptCheckUserDTO.setDeptId(deptInfo.getDeptId());
|
|
});
|
|
});
|
|
- addCheckInfoMaps(checkRoleMap,deptMap,userJobs,checkUserDTOS,CheckerRoleEnum.QUAT_SUPERVISOR.getKey(),CheckJobTypeEnum.QUAT_SUPERVISOR.getKey());
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- checkRoleMap.put(CheckerRoleEnum.QUAT_SUPERVISOR.getKey()+"",new ArrayList<>());
|
|
|
|
|
|
+ addCheckInfoMaps(checkRoleMap, deptMap, userJobs, checkUserDTOS, CheckerRoleEnum.QUAT_SUPERVISOR.getKey(), CheckJobTypeEnum.QUAT_SUPERVISOR.getKey());
|
|
|
|
+ } else {
|
|
|
|
+ checkRoleMap.put(CheckerRoleEnum.QUAT_SUPERVISOR.getKey() + "", new ArrayList<>());
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 临床科室管理员获取管理的科室以及科室包涵质控人员
|
|
* @Description 临床科室管理员获取管理的科室以及科室包涵质控人员
|
|
- * @Date 2021/5/17
|
|
|
|
|
|
+ * @Date 2021/5/17
|
|
* @Param [checkRoleMap, hospitalId, principleId]
|
|
* @Param [checkRoleMap, hospitalId, principleId]
|
|
* @Return void
|
|
* @Return void
|
|
* @MethodName getDeptCheckInfo
|
|
* @MethodName getDeptCheckInfo
|
|
@@ -562,31 +544,37 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
//1.获取监管人员所在科室集合
|
|
//1.获取监管人员所在科室集合
|
|
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("user_id",principleId)
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .eq("user_id", principleId)
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
).stream().map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
- if(deptIds.isEmpty()){return;}
|
|
|
|
|
|
+ if (deptIds.isEmpty()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
//1.2去除质管科
|
|
//1.2去除质管科
|
|
- String zkkDeptId = basDeptInfoFacade.getOne(new QueryWrapper<BasDeptInfo>()
|
|
|
|
|
|
+ BasDeptInfo deptInfo = basDeptInfoFacade.getOne(new QueryWrapper<BasDeptInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .eq("hospital_id",hospitalId)
|
|
|
|
- .like("dept_name","质管科")).getDeptId();
|
|
|
|
- if(StringUtil.isNotBlank(zkkDeptId)){deptIds.remove(zkkDeptId);}
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .eq("station", "质管"));
|
|
|
|
+ if (deptInfo == null || deptInfo.getDeptId() == null) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "科室质管科不存在,请联系管理员!");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtil.isNotBlank(deptInfo.getDeptId())) {
|
|
|
|
+ deptIds.remove(deptInfo.getDeptId());
|
|
|
|
+ }
|
|
CheckUserVO checkUserVOS = new CheckUserVO();
|
|
CheckUserVO checkUserVOS = new CheckUserVO();
|
|
//科室普通核查人员角色筛选
|
|
//科室普通核查人员角色筛选
|
|
- checkUserVOS.setRoleIds(Lists.newArrayList(CheckerRoleEnum.DEPT_GENERAL.getKey()*1l));
|
|
|
|
|
|
+ checkUserVOS.setRoleIds(Lists.newArrayList(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l));
|
|
checkUserVOS.setDeptIds(deptIds);
|
|
checkUserVOS.setDeptIds(deptIds);
|
|
checkUserVOS.setDeptStations(Lists.newArrayList("住院"));
|
|
checkUserVOS.setDeptStations(Lists.newArrayList("住院"));
|
|
checkUserVOS.setHospitalId(hospitalId);
|
|
checkUserVOS.setHospitalId(hospitalId);
|
|
List<CheckUserDTO> checkUserDTOS = baseMapper.getCheckUser(checkUserVOS);
|
|
List<CheckUserDTO> checkUserDTOS = baseMapper.getCheckUser(checkUserVOS);
|
|
//2.1获取科室详情
|
|
//2.1获取科室详情
|
|
- Map<String,String> deptMap = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
|
|
|
|
+ Map<String, String> deptMap = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .eq("hospital_id",hospitalId)
|
|
|
|
- .in("dept_id",deptIds)).stream()
|
|
|
|
- .collect(Collectors.toMap(BasDeptInfo::getDeptId,BasDeptInfo::getDeptName, (v1, v2) -> v2));
|
|
|
|
- if(deptMap!=null&&!deptMap.isEmpty())
|
|
|
|
- {
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .in("dept_id", deptIds)).stream()
|
|
|
|
+ .collect(Collectors.toMap(BasDeptInfo::getDeptId, BasDeptInfo::getDeptName, (v1, v2) -> v2));
|
|
|
|
+ if (deptMap != null && !deptMap.isEmpty()) {
|
|
//2.3获取所有医生信息的核查数
|
|
//2.3获取所有医生信息的核查数
|
|
List<String> doctorIds = checkUserDTOS.stream().map(CheckUserDTO::getDoctorId).collect(Collectors.toList());
|
|
List<String> doctorIds = checkUserDTOS.stream().map(CheckUserDTO::getDoctorId).collect(Collectors.toList());
|
|
CheckUserVO checkUserVO = new CheckUserVO();
|
|
CheckUserVO checkUserVO = new CheckUserVO();
|
|
@@ -595,44 +583,41 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
checkUserVO.setDeptIds(deptIds);
|
|
checkUserVO.setDeptIds(deptIds);
|
|
//通过核查人员id获取核查人员的核查任务数
|
|
//通过核查人员id获取核查人员的核查任务数
|
|
List<DeptCheckUserDTO> userJobs = baseMapper.getDeptJobNumByUserId(checkUserVO);
|
|
List<DeptCheckUserDTO> userJobs = baseMapper.getDeptJobNumByUserId(checkUserVO);
|
|
- addCheckInfoMaps(checkRoleMap,deptMap,userJobs,checkUserDTOS,CheckerRoleEnum.DEPT_SUPERVISOR.getKey(),CheckJobTypeEnum.DEPT_SUPERVISOR.getKey());
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- checkRoleMap.put(CheckerRoleEnum.DEPT_SUPERVISOR.getKey()+"",new ArrayList<>());
|
|
|
|
|
|
+ addCheckInfoMaps(checkRoleMap, deptMap, userJobs, checkUserDTOS, CheckerRoleEnum.DEPT_SUPERVISOR.getKey(), CheckJobTypeEnum.DEPT_SUPERVISOR.getKey());
|
|
|
|
+ } else {
|
|
|
|
+ checkRoleMap.put(CheckerRoleEnum.DEPT_SUPERVISOR.getKey() + "", new ArrayList<>());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 拼装科室、核查人员、任务数对象
|
|
* @Description 拼装科室、核查人员、任务数对象
|
|
- * @Date 2021/5/17
|
|
|
|
|
|
+ * @Date 2021/5/17
|
|
* @Param [checkRoleMap, doctorInfos, userJobs, deptInfos, roleId]
|
|
* @Param [checkRoleMap, doctorInfos, userJobs, deptInfos, roleId]
|
|
* @Return void
|
|
* @Return void
|
|
* @MethodName addCheckInfoMap
|
|
* @MethodName addCheckInfoMap
|
|
*/
|
|
*/
|
|
private void addCheckInfoMaps(Map<String, List<CheckDeptDTO>> checkRoleMap, Map<String, String> deptMap,
|
|
private void addCheckInfoMaps(Map<String, List<CheckDeptDTO>> checkRoleMap, Map<String, String> deptMap,
|
|
- List<DeptCheckUserDTO> userJobs, List<CheckUserDTO> checkUserDTOS, int roleId,int jobType) {
|
|
|
|
|
|
+ List<DeptCheckUserDTO> userJobs, List<CheckUserDTO> checkUserDTOS, int roleId, int jobType) {
|
|
//非院区任务
|
|
//非院区任务
|
|
- if(CheckJobTypeEnum.HOSP_SUPERVISOR.getKey()!=jobType){
|
|
|
|
- if(deptMap.isEmpty()||checkUserDTOS.isEmpty()){return;}
|
|
|
|
- checkRoleMap.put(roleId+"",new ArrayList<>());
|
|
|
|
|
|
+ if (CheckJobTypeEnum.HOSP_SUPERVISOR.getKey() != jobType) {
|
|
|
|
+ if (deptMap.isEmpty() || checkUserDTOS.isEmpty()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ checkRoleMap.put(roleId + "", new ArrayList<>());
|
|
//遍历科室
|
|
//遍历科室
|
|
- for(String deptId:deptMap.keySet())
|
|
|
|
- {
|
|
|
|
|
|
+ for (String deptId : deptMap.keySet()) {
|
|
//科室对象
|
|
//科室对象
|
|
CheckDeptDTO checkDeptDTO = new CheckDeptDTO();
|
|
CheckDeptDTO checkDeptDTO = new CheckDeptDTO();
|
|
checkDeptDTO.setDeptId(deptId);
|
|
checkDeptDTO.setDeptId(deptId);
|
|
checkDeptDTO.setDeptName(deptMap.get(deptId));
|
|
checkDeptDTO.setDeptName(deptMap.get(deptId));
|
|
checkDeptDTO.setDeptcheckUsers(new ArrayList<DeptCheckUserDTO>());
|
|
checkDeptDTO.setDeptcheckUsers(new ArrayList<DeptCheckUserDTO>());
|
|
//遍历医生
|
|
//遍历医生
|
|
- for(CheckUserDTO checkUserDTO:checkUserDTOS)
|
|
|
|
- {
|
|
|
|
|
|
+ for (CheckUserDTO checkUserDTO : checkUserDTOS) {
|
|
//同一科室
|
|
//同一科室
|
|
- if(checkDeptDTO.getDeptId().equals(checkUserDTO.getDeptId()))
|
|
|
|
- {
|
|
|
|
|
|
+ if (checkDeptDTO.getDeptId().equals(checkUserDTO.getDeptId())) {
|
|
DeptCheckUserDTO deptCheckUserDTO = new DeptCheckUserDTO();
|
|
DeptCheckUserDTO deptCheckUserDTO = new DeptCheckUserDTO();
|
|
deptCheckUserDTO.setDeptId(checkUserDTO.getDeptId());
|
|
deptCheckUserDTO.setDeptId(checkUserDTO.getDeptId());
|
|
deptCheckUserDTO.setDeptName(checkUserDTO.getDeptName());
|
|
deptCheckUserDTO.setDeptName(checkUserDTO.getDeptName());
|
|
@@ -641,20 +626,16 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
checkDeptDTO.getDeptcheckUsers().add(deptCheckUserDTO);
|
|
checkDeptDTO.getDeptcheckUsers().add(deptCheckUserDTO);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- for(DeptCheckUserDTO deptCheckUserDTO:checkDeptDTO.getDeptcheckUsers())
|
|
|
|
- {
|
|
|
|
|
|
+ for (DeptCheckUserDTO deptCheckUserDTO : checkDeptDTO.getDeptcheckUsers()) {
|
|
//遍历数量
|
|
//遍历数量
|
|
- for(DeptCheckUserDTO jobNumDto:userJobs)
|
|
|
|
- {
|
|
|
|
|
|
+ for (DeptCheckUserDTO jobNumDto : userJobs) {
|
|
//这个科室有这个人
|
|
//这个科室有这个人
|
|
- if(deptCheckUserDTO.getDeptId().equals(jobNumDto.getDeptId()))
|
|
|
|
- {
|
|
|
|
- if(deptCheckUserDTO.getDoctorId().equals(jobNumDto.getDoctorId()))
|
|
|
|
- {
|
|
|
|
- if(jobNumDto.getStatus()==0){
|
|
|
|
|
|
+ if (deptCheckUserDTO.getDeptId().equals(jobNumDto.getDeptId())) {
|
|
|
|
+ if (deptCheckUserDTO.getDoctorId().equals(jobNumDto.getDoctorId())) {
|
|
|
|
+ if (jobNumDto.getStatus() == 0) {
|
|
deptCheckUserDTO.setJobNum(jobNumDto.getJobNum());
|
|
deptCheckUserDTO.setJobNum(jobNumDto.getJobNum());
|
|
}
|
|
}
|
|
- if(jobNumDto.getStatus()==1){
|
|
|
|
|
|
+ if (jobNumDto.getStatus() == 1) {
|
|
|
|
|
|
deptCheckUserDTO.setCheckNum(jobNumDto.getJobNum());
|
|
deptCheckUserDTO.setCheckNum(jobNumDto.getJobNum());
|
|
}
|
|
}
|
|
@@ -663,21 +644,20 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- checkRoleMap.get(roleId+"").add(checkDeptDTO);
|
|
|
|
|
|
+ checkRoleMap.get(roleId + "").add(checkDeptDTO);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//院区任务不是同一科室的人员数量增加
|
|
//院区任务不是同一科室的人员数量增加
|
|
- else if(CheckJobTypeEnum.HOSP_SUPERVISOR.getKey()==jobType)
|
|
|
|
- {
|
|
|
|
- checkRoleMap.get(roleId+"").stream().forEach(checkDeptDTO -> {
|
|
|
|
- if(!ListUtil.isEmpty(checkDeptDTO.getDeptcheckUsers())){
|
|
|
|
|
|
+ else if (CheckJobTypeEnum.HOSP_SUPERVISOR.getKey() == jobType) {
|
|
|
|
+ checkRoleMap.get(roleId + "").stream().forEach(checkDeptDTO -> {
|
|
|
|
+ if (!ListUtil.isEmpty(checkDeptDTO.getDeptcheckUsers())) {
|
|
checkDeptDTO.getDeptcheckUsers().stream().forEach(deptCheckUser -> {
|
|
checkDeptDTO.getDeptcheckUsers().stream().forEach(deptCheckUser -> {
|
|
userJobs.stream().forEach(userJob -> {
|
|
userJobs.stream().forEach(userJob -> {
|
|
- if(deptCheckUser.getDoctorId().equals(userJob.getDoctorId())){
|
|
|
|
- if(userJob.getStatus()==0){
|
|
|
|
|
|
+ if (deptCheckUser.getDoctorId().equals(userJob.getDoctorId())) {
|
|
|
|
+ if (userJob.getStatus() == 0) {
|
|
deptCheckUser.setJobNum(userJob.getJobNum());
|
|
deptCheckUser.setJobNum(userJob.getJobNum());
|
|
}
|
|
}
|
|
- if(userJob.getStatus()==1){
|
|
|
|
|
|
+ if (userJob.getStatus() == 1) {
|
|
deptCheckUser.setCheckNum(userJob.getJobNum());
|
|
deptCheckUser.setCheckNum(userJob.getJobNum());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -689,31 +669,29 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description list求交集
|
|
* @Description list求交集
|
|
- * @Date 2021/5/14
|
|
|
|
|
|
+ * @Date 2021/5/14
|
|
* @Param [checkRoleIds, roleIds]
|
|
* @Param [checkRoleIds, roleIds]
|
|
* @Return java.util.List<java.lang.Long>
|
|
* @Return java.util.List<java.lang.Long>
|
|
* @MethodName containsRole
|
|
* @MethodName containsRole
|
|
*/
|
|
*/
|
|
- private List<Long> containsRole(List<Long> checkRoleIds, List<Long> roleIds) {
|
|
|
|
|
|
+ private List<Long> containsRole(List<Long> checkRoleIds, List<Long> roleIds) {
|
|
|
|
|
|
List<Long> searchRoleIds = new ArrayList<>();
|
|
List<Long> searchRoleIds = new ArrayList<>();
|
|
- for(Long id:roleIds)
|
|
|
|
- {
|
|
|
|
- if(checkRoleIds.contains(id))
|
|
|
|
- {
|
|
|
|
|
|
+ for (Long id : roleIds) {
|
|
|
|
+ if (checkRoleIds.contains(id)) {
|
|
searchRoleIds.add(id);
|
|
searchRoleIds.add(id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return searchRoleIds;
|
|
return searchRoleIds;
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 分配/取消核查任务
|
|
* @Description 分配/取消核查任务
|
|
- * @Date 2021/5/17
|
|
|
|
|
|
+ * @Date 2021/5/17
|
|
* @Param [distributionJobVO]
|
|
* @Param [distributionJobVO]
|
|
* @Return boolean
|
|
* @Return boolean
|
|
* @MethodName distributionJobs
|
|
* @MethodName distributionJobs
|
|
@@ -721,30 +699,28 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
public boolean distributionJobs(DistributionJobVO distributionJobVO) {
|
|
public boolean distributionJobs(DistributionJobVO distributionJobVO) {
|
|
|
|
|
|
//1非空校验
|
|
//1非空校验
|
|
- if(StringUtil.isBlank(distributionJobVO.getCheckId())||
|
|
|
|
- StringUtil.isBlank(distributionJobVO.getCheckName())||
|
|
|
|
- StringUtil.isBlank(distributionJobVO.getDistributionType())||
|
|
|
|
- distributionJobVO.getBehospitalCodes()==null||
|
|
|
|
- distributionJobVO.getBehospitalCodes().isEmpty())
|
|
|
|
- {
|
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_IS_NULL,"入参为空");
|
|
|
|
|
|
+ if (StringUtil.isBlank(distributionJobVO.getCheckId()) ||
|
|
|
|
+ StringUtil.isBlank(distributionJobVO.getCheckName()) ||
|
|
|
|
+ StringUtil.isBlank(distributionJobVO.getDistributionType()) ||
|
|
|
|
+ distributionJobVO.getBehospitalCodes() == null ||
|
|
|
|
+ distributionJobVO.getBehospitalCodes().isEmpty()) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "入参为空");
|
|
}
|
|
}
|
|
- if(StringUtil.isBlank(distributionJobVO.getCheckDept())){
|
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_IS_NULL,"核查人科室(checkDept)为空");
|
|
|
|
|
|
+ if (StringUtil.isBlank(distributionJobVO.getCheckDept())) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "核查人科室(checkDept)为空");
|
|
}
|
|
}
|
|
- if(distributionJobVO.getBehospitalDepts()==null
|
|
|
|
- ||distributionJobVO.getBehospitalDepts().isEmpty()){
|
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_IS_NULL,"核查任务科室集合(behospitalDepts)为空");
|
|
|
|
|
|
+ if (distributionJobVO.getBehospitalDepts() == null
|
|
|
|
+ || distributionJobVO.getBehospitalDepts().isEmpty()) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "核查任务科室集合(behospitalDepts)为空");
|
|
}
|
|
}
|
|
- if(StringUtil.isEmpty(distributionJobVO.getJobType()))
|
|
|
|
- {
|
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_IS_NULL,"核查任务类型(jobType)为空");
|
|
|
|
|
|
+ if (StringUtil.isEmpty(distributionJobVO.getJobType())) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "核查任务类型(jobType)为空");
|
|
}
|
|
}
|
|
//全院的话要判断院级核查人员和核查病历不是同一科室
|
|
//全院的话要判断院级核查人员和核查病历不是同一科室
|
|
- if(CheckJobTypeEnum.HOSP_SUPERVISOR.getKey()==Integer.parseInt(distributionJobVO.getJobType())){
|
|
|
|
- for(String deptId:distributionJobVO.getCheckDept().split(",")){
|
|
|
|
- if(distributionJobVO.getBehospitalDepts().contains(deptId)){
|
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,"院级核查人员和核查病历是同一科室");
|
|
|
|
|
|
+ if (CheckJobTypeEnum.HOSP_SUPERVISOR.getKey() == Integer.parseInt(distributionJobVO.getJobType())) {
|
|
|
|
+ for (String deptId : distributionJobVO.getCheckDept().split(",")) {
|
|
|
|
+ if (distributionJobVO.getBehospitalDepts().contains(deptId)) {
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "院级核查人员和核查病历是同一科室");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -755,32 +731,32 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
//2.获取任务类型 0分配 1取消
|
|
//2.获取任务类型 0分配 1取消
|
|
String distributionType = distributionJobVO.getDistributionType();
|
|
String distributionType = distributionJobVO.getDistributionType();
|
|
//3 分配
|
|
//3 分配
|
|
- if(StringUtil.isNotBlank(distributionType)&&"0".equals(distributionType))
|
|
|
|
- {
|
|
|
|
|
|
+ if (StringUtil.isNotBlank(distributionType) && "0".equals(distributionType)) {
|
|
//3.1 任务未分配校验
|
|
//3.1 任务未分配校验
|
|
List<String> distributionNames = this.list(new QueryWrapper<MedCheckInfo>()
|
|
List<String> distributionNames = this.list(new QueryWrapper<MedCheckInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .eq("hospital_id",hospitalId)
|
|
|
|
- .in("behospital_code",distributionJobVO.getBehospitalCodes())
|
|
|
|
- ).stream().filter(s-> s.getJobDistributionName() !=null).map(MedCheckInfo::getJobDistributionName)
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .in("behospital_code", distributionJobVO.getBehospitalCodes())
|
|
|
|
+ ).stream().filter(s -> s.getJobDistributionName() != null).map(MedCheckInfo::getJobDistributionName)
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
- if(distributionNames!=null&&distributionNames.size()>0)
|
|
|
|
- {
|
|
|
|
|
|
+ if (distributionNames != null && distributionNames.size() > 0) {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "待分配任务列表存在已分配任务!");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "待分配任务列表存在已分配任务!");
|
|
}
|
|
}
|
|
|
|
|
|
//获取分配用户信息
|
|
//获取分配用户信息
|
|
QueryWrapper<SysUser> userQuer = new QueryWrapper<>();
|
|
QueryWrapper<SysUser> userQuer = new QueryWrapper<>();
|
|
userQuer.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
userQuer.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .eq("id",principleId)
|
|
|
|
- .eq("status",1);
|
|
|
|
|
|
+ .eq("id", principleId)
|
|
|
|
+ .eq("status", 1);
|
|
SysUser user = sysUserFacade.getOne(userQuer);
|
|
SysUser user = sysUserFacade.getOne(userQuer);
|
|
String principleName = user.getLinkman();
|
|
String principleName = user.getLinkman();
|
|
//用户名称如果是null(目的:分配用户名为null表示用户未分配)
|
|
//用户名称如果是null(目的:分配用户名为null表示用户未分配)
|
|
- if(principleName==null){principleName = "";}
|
|
|
|
|
|
+ if (principleName == null) {
|
|
|
|
+ principleName = "";
|
|
|
|
+ }
|
|
Date now = DateUtil.now();
|
|
Date now = DateUtil.now();
|
|
//3.2分配核查任务
|
|
//3.2分配核查任务
|
|
- return this.update(new UpdateWrapper<MedCheckInfo>()
|
|
|
|
|
|
+ return this.update(new UpdateWrapper<MedCheckInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("hospital_id", hospitalId)
|
|
.eq("hospital_id", hospitalId)
|
|
.in("behospital_code", distributionJobVO.getBehospitalCodes())
|
|
.in("behospital_code", distributionJobVO.getBehospitalCodes())
|
|
@@ -792,31 +768,27 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
|
|
|
|
}
|
|
}
|
|
//4 取消分配
|
|
//4 取消分配
|
|
- else if(StringUtil.isNotBlank(distributionType)&&"1".equals(distributionType))
|
|
|
|
- {
|
|
|
|
|
|
+ else if (StringUtil.isNotBlank(distributionType) && "1".equals(distributionType)) {
|
|
//4.1 任务已取消校验
|
|
//4.1 任务已取消校验
|
|
Set<Long> checkIds = this.list(new QueryWrapper<MedCheckInfo>()
|
|
Set<Long> checkIds = this.list(new QueryWrapper<MedCheckInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
- .eq("hospital_id",hospitalId)
|
|
|
|
- .in("behospital_code",distributionJobVO.getBehospitalCodes())
|
|
|
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
|
+ .in("behospital_code", distributionJobVO.getBehospitalCodes())
|
|
).stream().map(MedCheckInfo::getCheckId).collect(Collectors.toSet());
|
|
).stream().map(MedCheckInfo::getCheckId).collect(Collectors.toSet());
|
|
//4.2获取出来的核查用户存在但不是一个
|
|
//4.2获取出来的核查用户存在但不是一个
|
|
- if(checkIds==null||checkIds.isEmpty()||
|
|
|
|
- (checkIds.size()!=1&&checkIds.contains(distributionJobVO.getCheckId())))
|
|
|
|
- {
|
|
|
|
|
|
+ if (checkIds == null || checkIds.isEmpty() ||
|
|
|
|
+ (checkIds.size() != 1 && checkIds.contains(distributionJobVO.getCheckId()))) {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "待取消分配任务列表不存在或存在不是该用户的任务!");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "待取消分配任务列表不存在或存在不是该用户的任务!");
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
|
|
+ } else {
|
|
Date now = DateUtil.now();
|
|
Date now = DateUtil.now();
|
|
//4.3取消分配
|
|
//4.3取消分配
|
|
Long a = null;
|
|
Long a = null;
|
|
- return this.update(new UpdateWrapper<MedCheckInfo>()
|
|
|
|
|
|
+ return this.update(new UpdateWrapper<MedCheckInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("hospital_id", hospitalId)
|
|
.eq("hospital_id", hospitalId)
|
|
- .eq("check_id", distributionJobVO.getCheckId())
|
|
|
|
|
|
+ .eq("check_id", distributionJobVO.getCheckId())
|
|
.in("behospital_code", distributionJobVO.getBehospitalCodes())
|
|
.in("behospital_code", distributionJobVO.getBehospitalCodes())
|
|
- .set("job_distributor",a)
|
|
|
|
|
|
+ .set("job_distributor", a)
|
|
.set("job_distribution_name", a)
|
|
.set("job_distribution_name", a)
|
|
.set("check_id", a)
|
|
.set("check_id", a)
|
|
.set("check_name", a)
|
|
.set("check_name", a)
|
|
@@ -826,32 +798,29 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
|
|
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @Author songxl
|
|
* @Author songxl
|
|
* @Description 获取指定核查人员的核查任务
|
|
* @Description 获取指定核查人员的核查任务
|
|
- * @Date 2021/5/17
|
|
|
|
|
|
+ * @Date 2021/5/17
|
|
* @Param [checkJobVO]
|
|
* @Param [checkJobVO]
|
|
* @Return java.util.List<com.diagbot.dto.CheckJobDTO>
|
|
* @Return java.util.List<com.diagbot.dto.CheckJobDTO>
|
|
* @MethodName getCheckListByUserId
|
|
* @MethodName getCheckListByUserId
|
|
*/
|
|
*/
|
|
public IPage<CheckJobDTO> getCheckListByUserId(CheckJobPageVO checkJobVO) {
|
|
public IPage<CheckJobDTO> getCheckListByUserId(CheckJobPageVO checkJobVO) {
|
|
//非空校验
|
|
//非空校验
|
|
- if(StringUtil.isBlank(checkJobVO.getCheckId()))
|
|
|
|
- {
|
|
|
|
|
|
+ if (StringUtil.isBlank(checkJobVO.getCheckId())) {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "没有传核查用户id!");
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "没有传核查用户id!");
|
|
}
|
|
}
|
|
- IPage<CheckJobDTO> checkJobDTOS= baseMapper.getCheckListByUserId(checkJobVO);
|
|
|
|
|
|
+ IPage<CheckJobDTO> checkJobDTOS = baseMapper.getCheckListByUserId(checkJobVO);
|
|
//获取当前登录人员
|
|
//获取当前登录人员
|
|
Long principleId = Long.valueOf(SysUserUtils.getCurrentPrincipleID());
|
|
Long principleId = Long.valueOf(SysUserUtils.getCurrentPrincipleID());
|
|
List<CheckJobDTO> outCheckJobDTOS = new ArrayList<>();
|
|
List<CheckJobDTO> outCheckJobDTOS = new ArrayList<>();
|
|
//判断分配人员是否是当前人员
|
|
//判断分配人员是否是当前人员
|
|
- for(CheckJobDTO checkJobDTO:checkJobDTOS.getRecords())
|
|
|
|
- {
|
|
|
|
- if (principleId.equals(checkJobDTO.getJobDistributor()))
|
|
|
|
- {
|
|
|
|
|
|
+ for (CheckJobDTO checkJobDTO : checkJobDTOS.getRecords()) {
|
|
|
|
+ if (principleId.equals(checkJobDTO.getJobDistributor())) {
|
|
checkJobDTO.setDelFlag(true);
|
|
checkJobDTO.setDelFlag(true);
|
|
- }
|
|
|
|
- else {
|
|
|
|
|
|
+ } else {
|
|
checkJobDTO.setDelFlag(false);
|
|
checkJobDTO.setDelFlag(false);
|
|
}
|
|
}
|
|
outCheckJobDTOS.add(checkJobDTO);
|
|
outCheckJobDTOS.add(checkJobDTO);
|