|
@@ -277,33 +277,41 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
qcResultDTO.setMenuData("");
|
|
|
}
|
|
|
res.put("result", qcResultDTO);
|
|
|
- //增加该病历是否核查状态
|
|
|
- QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
|
|
|
- medCheckInfoQuerys.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
- medCheckInfoQuerys.eq("behospital_code", getDetailVO.getBehospitalCode());
|
|
|
- medCheckInfoQuerys.eq("hospital_id", hospitalId);
|
|
|
- medCheckInfoQuerys.in("check_type", 0, 2);
|
|
|
- medCheckInfoQuerys.eq("status", 1);
|
|
|
- int count = medCheckInfoFacade.count(medCheckInfoQuerys);
|
|
|
- if (count > 0) {
|
|
|
- res.put("checkStatus", 1);
|
|
|
- } else {
|
|
|
- res.put("checkStatus", 0);
|
|
|
- }
|
|
|
- //增加该病案首页是否核查状态
|
|
|
- Map<String, Object> mapAllMr = new HashMap<String, Object>();
|
|
|
- mapAllMr.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
- mapAllMr.put("behospital_code", getDetailVO.getBehospitalCode());
|
|
|
- mapAllMr.put("hospital_id", hospitalId);
|
|
|
- mapAllMr.put("check_type", 1);
|
|
|
- QueryWrapper<MedCheckInfo> medCheckInfoMr = new QueryWrapper<>();
|
|
|
- medCheckInfoMr.allEq(mapAllMr);
|
|
|
- int countMr = medCheckInfoFacade.count(medCheckInfoMr);
|
|
|
- if (countMr > 0) {
|
|
|
- res.put("mrStatus", 1);
|
|
|
- } else {
|
|
|
- res.put("mrStatus", 0);
|
|
|
+ //通过页面类型显示不同操作按钮
|
|
|
+ showButtonByPageType(hospitalId, getDetailVO, res);
|
|
|
+ //添加核查操作是否与申诉状态关联配置
|
|
|
+ if(StringUtil.isBlank(sysHospitalSetFacade.getValue(hospitalId, "check_operation_with_appeal"))){
|
|
|
+ res.put("checkOperationWithAppeal", false);
|
|
|
+ }else{
|
|
|
+ res.put("checkOperationWithAppeal",Boolean.parseBoolean(sysHospitalSetFacade.getValue(hospitalId, "check_operation_with_appeal")));
|
|
|
}
|
|
|
+// //增加该病历是否核查状态
|
|
|
+// QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
|
|
|
+// medCheckInfoQuerys.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+// medCheckInfoQuerys.eq("behospital_code", getDetailVO.getBehospitalCode());
|
|
|
+// medCheckInfoQuerys.eq("hospital_id", hospitalId);
|
|
|
+// medCheckInfoQuerys.in("check_type", 0, 2);
|
|
|
+// medCheckInfoQuerys.eq("status", 1);
|
|
|
+// int count = medCheckInfoFacade.count(medCheckInfoQuerys);
|
|
|
+// if (count > 0) {
|
|
|
+// res.put("checkStatus", 1);
|
|
|
+// } else {
|
|
|
+// res.put("checkStatus", 0);
|
|
|
+// }
|
|
|
+// //增加该病案首页是否核查状态
|
|
|
+// Map<String, Object> mapAllMr = new HashMap<String, Object>();
|
|
|
+// mapAllMr.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+// mapAllMr.put("behospital_code", getDetailVO.getBehospitalCode());
|
|
|
+// mapAllMr.put("hospital_id", hospitalId);
|
|
|
+// mapAllMr.put("check_type", 1);
|
|
|
+// QueryWrapper<MedCheckInfo> medCheckInfoMr = new QueryWrapper<>();
|
|
|
+// medCheckInfoMr.allEq(mapAllMr);
|
|
|
+// int countMr = medCheckInfoFacade.count(medCheckInfoMr);
|
|
|
+// if (countMr > 0) {
|
|
|
+// res.put("mrStatus", 1);
|
|
|
+// } else {
|
|
|
+// res.put("mrStatus", 0);
|
|
|
+// }
|
|
|
//新增如果当前用户不是核查人员返回标志位用户核查按钮、修改、删除、隐藏显示
|
|
|
//1.获取病历核查人员id,该操作只能是核查员操作
|
|
|
// List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
|
|
@@ -353,20 +361,20 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
// } else {
|
|
|
// res.put("checkShow", 0);
|
|
|
// }
|
|
|
- //获取用户角色,如果用户包含核查角色显示核查相关按钮(不管病历是否生成、分配,只要有质控角色就显示核查对应按钮)
|
|
|
- List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("user_id", SysUserUtils.getCurrentPrincipleID())
|
|
|
- ).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
|
|
- if (roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l)) {
|
|
|
- res.put("checkShow", 1);
|
|
|
- } else if (roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l)) {
|
|
|
- res.put("checkShow", 1);
|
|
|
- } else if (roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l)) {
|
|
|
- res.put("checkShow", 1);
|
|
|
- } else {
|
|
|
- res.put("checkShow", 0);
|
|
|
- }
|
|
|
+// //获取用户角色,如果用户包含核查角色显示核查相关按钮(不管病历是否生成、分配,只要有质控角色就显示核查对应按钮)
|
|
|
+// List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
|
|
|
+// .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+// .eq("user_id", SysUserUtils.getCurrentPrincipleID())
|
|
|
+// ).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
|
|
+// if (roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l)) {
|
|
|
+// res.put("checkShow", 1);
|
|
|
+// } else if (roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l)) {
|
|
|
+// res.put("checkShow", 1);
|
|
|
+// } else if (roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l)) {
|
|
|
+// res.put("checkShow", 1);
|
|
|
+// } else {
|
|
|
+// res.put("checkShow", 0);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
// 获取提示信息
|
|
@@ -413,6 +421,107 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ private void showButtonByPageType(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
|
|
|
+ // switch (getDetailVO.getPageType()){
|
|
|
+ // case "1":
|
|
|
+ // break;
|
|
|
+ // case "2":
|
|
|
+ // checkButtonShow(hospitalId,getDetailVO,res);
|
|
|
+ // break;
|
|
|
+ // case "3":
|
|
|
+ // appealButtonShow(hospitalId,getDetailVO,res);
|
|
|
+ // break;
|
|
|
+ // default:
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ checkButtonShow(hospitalId, getDetailVO, res);
|
|
|
+ appealButtonShow(hospitalId, getDetailVO, res);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void checkButtonShow(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
|
|
|
+ //增加该病历是否核查状态
|
|
|
+ QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
|
|
|
+ medCheckInfoQuerys.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ medCheckInfoQuerys.eq("behospital_code", getDetailVO.getBehospitalCode());
|
|
|
+ medCheckInfoQuerys.eq("hospital_id", hospitalId);
|
|
|
+ medCheckInfoQuerys.in("check_type", 0, 2);
|
|
|
+ medCheckInfoQuerys.eq("status", 1);
|
|
|
+ int count = medCheckInfoFacade.count(medCheckInfoQuerys);
|
|
|
+ if (count > 0) {
|
|
|
+ res.put("checkStatus", 1);
|
|
|
+ } else {
|
|
|
+ res.put("checkStatus", 0);
|
|
|
+ }
|
|
|
+ //增加该病案首页是否核查状态
|
|
|
+ Map<String, Object> mapAllMr = new HashMap<String, Object>();
|
|
|
+ mapAllMr.put("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ mapAllMr.put("behospital_code", getDetailVO.getBehospitalCode());
|
|
|
+ mapAllMr.put("hospital_id", hospitalId);
|
|
|
+ mapAllMr.put("check_type", 1);
|
|
|
+ QueryWrapper<MedCheckInfo> medCheckInfoMr = new QueryWrapper<>();
|
|
|
+ medCheckInfoMr.allEq(mapAllMr);
|
|
|
+ int countMr = medCheckInfoFacade.count(medCheckInfoMr);
|
|
|
+ if (countMr > 0) {
|
|
|
+ res.put("mrStatus", 1);
|
|
|
+ } else {
|
|
|
+ res.put("mrStatus", 0);
|
|
|
+ }
|
|
|
+ //新增如果当前用户不是核查人员返回标志位用户核查按钮、修改、删除、隐藏显示
|
|
|
+ //1.获取病历核查人员id,该操作只能是核查员操作
|
|
|
+ List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", getDetailVO.getBehospitalCode())
|
|
|
+ .orderByDesc("gmt_create"));
|
|
|
+ if (medCheckInfos.size() >= 1 && medCheckInfos.get(0).getCheckId() != null
|
|
|
+ && medCheckInfos.get(0).getCheckId().equals(Long.parseLong(SysUserUtils.getCurrentPrincipleID()))) {
|
|
|
+ //2.1获取核查类型,判断当前用户有没有对应核查类型的角色
|
|
|
+ int jobType = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("behospital_code", getDetailVO.getBehospitalCode())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("check_id", SysUserUtils.getCurrentPrincipleID())).get(0).getJobType();
|
|
|
+ //2.2获取用户角色
|
|
|
+ List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("user_id", SysUserUtils.getCurrentPrincipleID())
|
|
|
+ ).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
|
|
|
+ switch (jobType) {
|
|
|
+ case 0:
|
|
|
+ if (roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l)) {
|
|
|
+ res.put("checkShow", 1);
|
|
|
+ } else {
|
|
|
+ res.put("checkShow", 0);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ if (roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l)) {
|
|
|
+ res.put("checkShow", 1);
|
|
|
+ } else {
|
|
|
+ res.put("checkShow", 0);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ if (roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l)) {
|
|
|
+ res.put("checkShow", 1);
|
|
|
+ } else {
|
|
|
+ res.put("checkShow", 0);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ res.put("checkShow", 0);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ res.put("checkShow", 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void appealButtonShow(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
|
|
|
+ res.put("appealShow", 1);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 处理数据(公共方法)
|
|
|
*
|