|
@@ -45,6 +45,8 @@ import java.util.Map;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
+import static java.sql.JDBCType.NULL;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @author wangfeng
|
|
* @author wangfeng
|
|
* @Description:
|
|
* @Description:
|
|
@@ -396,8 +398,21 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
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 = checkUserDTOS.stream()
|
|
|
|
- .collect(Collectors.toMap(CheckUserDTO::getDeptId,CheckUserDTO::getDeptName, (v1, v2) -> v2));
|
|
|
|
|
|
+ //2.1.1获取院区核查的人员id
|
|
|
|
+ List<Long> userIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("role_id",CheckerRoleEnum.HOSP_GENERAL.getKey())).stream()
|
|
|
|
+ .map(SysUserRole::getUserId).collect(Collectors.toList());
|
|
|
|
+ List<String> deptIds = sysUserDeptFacade.list(new QueryWrapper<SysUserDept>()
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("hospital_id",hospitalId)
|
|
|
|
+ .in("user_id",userIds)).stream()
|
|
|
|
+ .map(SysUserDept::getDeptId).collect(Collectors.toList());
|
|
|
|
+ Map<String,String> deptMap = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
|
|
+ .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())
|
|
if(deptMap!=null&&!deptMap.isEmpty())
|
|
{
|
|
{
|
|
//2.3获取所有医生信息的核查数
|
|
//2.3获取所有医生信息的核查数
|
|
@@ -451,8 +466,11 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
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 = checkUserDTOS.stream()
|
|
|
|
- .collect(Collectors.toMap(CheckUserDTO::getDeptId,CheckUserDTO::getDeptName, (v1, v2) -> v2));
|
|
|
|
|
|
+ Map<String,String> deptMap = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
|
|
+ .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())
|
|
if(deptMap!=null&&!deptMap.isEmpty())
|
|
{
|
|
{
|
|
//2.3获取质控科核查人员的核查数
|
|
//2.3获取质控科核查人员的核查数
|
|
@@ -503,8 +521,11 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
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 = checkUserDTOS.stream()
|
|
|
|
- .collect(Collectors.toMap(CheckUserDTO::getDeptId,CheckUserDTO::getDeptName, (v1, v2) -> v2));
|
|
|
|
|
|
+ Map<String,String> deptMap = basDeptInfoFacade.list(new QueryWrapper<BasDeptInfo>()
|
|
|
|
+ .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())
|
|
if(deptMap!=null&&!deptMap.isEmpty())
|
|
{
|
|
{
|
|
//2.3获取所有医生信息的核查数
|
|
//2.3获取所有医生信息的核查数
|
|
@@ -691,15 +712,16 @@ public class MedCheckInfoFacade extends MedCheckInfoServiceImpl {
|
|
{
|
|
{
|
|
Date now = DateUtil.now();
|
|
Date now = DateUtil.now();
|
|
//4.3取消分配
|
|
//4.3取消分配
|
|
|
|
+ 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",-1)
|
|
|
|
- .set("job_distribution_name", null)
|
|
|
|
- .set("check_id", -1)
|
|
|
|
- .set("check_name", "")
|
|
|
|
|
|
+ .set("job_distributor",a)
|
|
|
|
+ .set("job_distribution_name", a)
|
|
|
|
+ .set("check_id", a)
|
|
|
|
+ .set("check_name", a)
|
|
.set("job_distribution_time", now));
|
|
.set("job_distribution_time", now));
|
|
}
|
|
}
|
|
}
|
|
}
|