|
@@ -4,29 +4,29 @@ package com.lantone.report.facade;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.google.common.collect.Maps;
|
|
|
-import com.lantone.report.dto.GetAppealInfoDTO;
|
|
|
-import com.lantone.report.dto.GetReviewerDTO;
|
|
|
import com.lantone.common.enums.IsDeleteEnum;
|
|
|
-import com.lantone.report.exception.Asserts;
|
|
|
+import com.lantone.common.exception.Asserts;
|
|
|
import com.lantone.common.util.DateUtil;
|
|
|
import com.lantone.common.util.ListUtil;
|
|
|
import com.lantone.common.util.StringUtil;
|
|
|
-import com.lantone.report.vo.AddAppealInfoVO;
|
|
|
-import com.lantone.report.vo.CancelAppealInfoVO;
|
|
|
-import com.lantone.report.vo.GetAppealInfoVO;
|
|
|
-import com.lantone.report.vo.GetAppealOperationTypeVO;
|
|
|
-import com.lantone.report.vo.GetReviewerVO;
|
|
|
+import com.lantone.report.dto.GetAppealInfoDTO;
|
|
|
+import com.lantone.report.dto.GetReviewerDTO;
|
|
|
import com.lantone.report.entity.AppealExamineInfo;
|
|
|
import com.lantone.report.entity.AppealInfo;
|
|
|
import com.lantone.report.entity.QcresultDetail;
|
|
|
+import com.lantone.report.enums.AppealOperationTypeEnum;
|
|
|
+import com.lantone.report.enums.ExampleStatusEnum;
|
|
|
+import com.lantone.report.enums.WorkFlowNodeEnum;
|
|
|
import com.lantone.report.facade.base.AppealExamineInfoFacade;
|
|
|
import com.lantone.report.facade.base.AppealInfoFacade;
|
|
|
import com.lantone.report.facade.base.QcresultDetailFacade2;
|
|
|
import com.lantone.report.facade.base.SysUserRoleFacade2;
|
|
|
import com.lantone.report.facade.base.WorkFlowNodeFacade;
|
|
|
-import com.lantone.report.enums.AppealOperationTypeEnum;
|
|
|
-import com.lantone.report.enums.ExampleStatusEnum;
|
|
|
-import com.lantone.report.enums.WorkFlowNodeEnum;
|
|
|
+import com.lantone.report.vo.AddAppealInfoVO;
|
|
|
+import com.lantone.report.vo.CancelAppealInfoVO;
|
|
|
+import com.lantone.report.vo.GetAppealInfoVO;
|
|
|
+import com.lantone.report.vo.GetAppealOperationTypeVO;
|
|
|
+import com.lantone.report.vo.GetReviewerVO;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -73,7 +73,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
, addAppealInfoVO.getQcresultDetailId());
|
|
|
//缺陷状态-删除
|
|
|
if (IsDeleteEnum.Y.getKey().equals(qcresultDetail.getIsDeleted())) {
|
|
|
- Asserts.fail2("该缺陷已被删除,请走恢复流程");
|
|
|
+ Asserts.fail("该缺陷已被删除,请走恢复流程");
|
|
|
}
|
|
|
//申诉记录不存在
|
|
|
if (appealInfo == null) {
|
|
@@ -82,7 +82,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
}
|
|
|
//获取申诉记录当前节点状态(1:申诉|2:撤销|3:科室审核)
|
|
|
if (WorkFlowNodeEnum.APPEAL.getKey().equals(appealInfo.getWorkFlowNodeId() + "")) {
|
|
|
- Asserts.fail2("该缺陷已被申诉");
|
|
|
+ Asserts.fail("该缺陷已被申诉");
|
|
|
} else {
|
|
|
//删除申诉记录
|
|
|
appealInfoFacade.update(new UpdateWrapper<AppealInfo>().set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
@@ -101,7 +101,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
addAppealInfoVO.setQcresultDetailMsg(addAppealInfoVO.getCasesEntryMsg());
|
|
|
}
|
|
|
if (ListUtil.isNotEmpty(qcresultDetails)) {
|
|
|
- Asserts.fail2("该缺陷已存在无需申诉新增");
|
|
|
+ Asserts.fail("该缺陷已存在无需申诉新增");
|
|
|
}
|
|
|
//获取申诉新增已有待审核的申诉记录
|
|
|
AppealInfo oldAppealInfo = getAppealInfo(addAppealInfoVO);
|
|
@@ -112,7 +112,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
appealInfoFacade.update(new UpdateWrapper<AppealInfo>().set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
|
.eq("id", oldAppealInfo.getId()));
|
|
|
}else if (WorkFlowNodeEnum.APPEAL.getKey().equals(oldAppealInfo.getWorkFlowNodeId() + "")) {
|
|
|
- Asserts.fail2("该缺陷已被申诉无需再次恢复");
|
|
|
+ Asserts.fail("该缺陷已被申诉无需再次恢复");
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -140,7 +140,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
, addAppealInfoVO.getQcresultDetailId());
|
|
|
//缺陷状态-删除
|
|
|
if (qcresultDetail1.getIsDeleted().equals(IsDeleteEnum.N.getKey())) {
|
|
|
- Asserts.fail2("缺陷已被恢复无需再次恢复");
|
|
|
+ Asserts.fail("缺陷已被恢复无需再次恢复");
|
|
|
}
|
|
|
//申诉记录不存在
|
|
|
if (appealInfo1 == null) {
|
|
@@ -149,7 +149,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
}
|
|
|
//获取申诉记录当前节点状态(1:申诉|2:撤销|3:科室审核)
|
|
|
if (WorkFlowNodeEnum.APPEAL.getKey().equals(appealInfo1.getWorkFlowNodeId() + "")) {
|
|
|
- Asserts.fail2("该缺陷已被申诉");
|
|
|
+ Asserts.fail("该缺陷已被申诉");
|
|
|
} else {
|
|
|
//删除申诉记录
|
|
|
appealInfoFacade.update(new UpdateWrapper<AppealInfo>().set("is_deleted", IsDeleteEnum.Y.getKey())
|
|
@@ -158,20 +158,20 @@ public class MedAppealInfoManagementFacade {
|
|
|
//新增申诉记录+审核记录
|
|
|
return addAppealInfoAndExamineInfo(addAppealInfoVO);
|
|
|
default:
|
|
|
- Asserts.fail2("申诉操作类型不存在!");
|
|
|
+ Asserts.fail("申诉操作类型不存在!");
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
private AppealInfo getAppealInfo(AddAppealInfoVO addAppealInfoVO) {
|
|
|
if (addAppealInfoVO.getCasesEntryId() == null) {
|
|
|
- Asserts.fail2("新增已有条目casesEntryId不能为空");
|
|
|
+ Asserts.fail("新增已有条目casesEntryId不能为空");
|
|
|
}
|
|
|
if (addAppealInfoVO.getIsReject() == null) {
|
|
|
- Asserts.fail2("新增已有条目isReject不能为空");
|
|
|
+ Asserts.fail("新增已有条目isReject不能为空");
|
|
|
}
|
|
|
if (addAppealInfoVO.getCasesScore() == null) {
|
|
|
- Asserts.fail2("新增已有条目casesScore不能为空");
|
|
|
+ Asserts.fail("新增已有条目casesScore不能为空");
|
|
|
}
|
|
|
List<AppealInfo> appealInfos = appealInfoFacade.list(new QueryWrapper<AppealInfo>()
|
|
|
.eq("hospital_id", addAppealInfoVO.getHospitalId())
|
|
@@ -198,7 +198,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
appealExamineInfo.setCheckId(addAppealInfoVO.getCheckId());
|
|
|
return appealExamineInfoFacade.save(appealExamineInfo);
|
|
|
}
|
|
|
- Asserts.fail2("申诉记录插入失败!");
|
|
|
+ Asserts.fail("申诉记录插入失败!");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -212,7 +212,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
private AppealInfo getAppealInfo(Long hospitalId, String behospitalCode, Long qcresultDetailId) {
|
|
|
|
|
|
if (qcresultDetailId == null) {
|
|
|
- Asserts.fail2("质控缺陷id为空");
|
|
|
+ Asserts.fail("质控缺陷id为空");
|
|
|
}
|
|
|
List<AppealInfo> appealInfos = appealInfoFacade.list(new QueryWrapper<AppealInfo>()
|
|
|
.eq("hospital_id", hospitalId)
|
|
@@ -233,11 +233,11 @@ public class MedAppealInfoManagementFacade {
|
|
|
*/
|
|
|
private QcresultDetail getQcresultDetailById(Long qcresultDetailId) {
|
|
|
if (qcresultDetailId == null) {
|
|
|
- Asserts.fail2("质控缺陷id为空");
|
|
|
+ Asserts.fail("质控缺陷id为空");
|
|
|
}
|
|
|
QcresultDetail qcresultDetail = qcresultDetailFacade.getById(qcresultDetailId);
|
|
|
if (qcresultDetail == null) {
|
|
|
- Asserts.fail2("质控缺陷不存在");
|
|
|
+ Asserts.fail("质控缺陷不存在");
|
|
|
}
|
|
|
return qcresultDetail;
|
|
|
}
|
|
@@ -286,7 +286,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
switch (getAppealOperationTypeVO.getAppealOperationType()) {
|
|
|
case "0":
|
|
|
if (qcresultDetail == null) {
|
|
|
- Asserts.fail2("质控缺陷条目不存在");
|
|
|
+ Asserts.fail("质控缺陷条目不存在");
|
|
|
}
|
|
|
if (IsDeleteEnum.N.getKey().equals(qcresultDetail.getIsDeleted())) {
|
|
|
out.put("appealOperationType", AppealOperationTypeEnum.UP_OR_DEL.getKey());
|
|
@@ -319,7 +319,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
- Asserts.fail2("申诉操作类型不存在");
|
|
|
+ Asserts.fail("申诉操作类型不存在");
|
|
|
}
|
|
|
return out;
|
|
|
}
|
|
@@ -333,7 +333,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
//获取申诉记录
|
|
|
AppealInfo appealInfo = appealInfoFacade.getById(cancelAppealInfoVO.getId());
|
|
|
if (appealInfo == null) {
|
|
|
- Asserts.fail2("撤回申诉条目不存在");
|
|
|
+ Asserts.fail("撤回申诉条目不存在");
|
|
|
}
|
|
|
if (WorkFlowNodeEnum.APPEAL.getKey().equals(appealInfo.getWorkFlowNodeId() + "")) {
|
|
|
//获取该条目申诉历史记录
|
|
@@ -363,7 +363,7 @@ public class MedAppealInfoManagementFacade {
|
|
|
}
|
|
|
return out;
|
|
|
} else {
|
|
|
- Asserts.fail2("撤回申诉条目状态不是申诉状态");
|
|
|
+ Asserts.fail("撤回申诉条目状态不是申诉状态");
|
|
|
}
|
|
|
return false;
|
|
|
}
|