|
@@ -63,6 +63,11 @@ public class MedAppealInfoManagementFacade {
|
|
|
|
|
|
public Boolean addAppealInfo(AddAppealInfoVO addAppealInfoVO) {
|
|
|
|
|
|
+ //判断是否只单人操作
|
|
|
+ if (addAppealInfoVO.getSingleAppealFalg()) {
|
|
|
+ checkSingleAppeal(addAppealInfoVO);
|
|
|
+ }
|
|
|
+
|
|
|
if (addAppealInfoVO.getModeId() != null) {
|
|
|
//获取模块名称
|
|
|
String modeName = appealInfoFacade.getBaseMapper().getModeName(addAppealInfoVO.getModeId());
|
|
@@ -198,6 +203,23 @@ public class MedAppealInfoManagementFacade {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ private void checkSingleAppeal(AddAppealInfoVO addAppealInfoVO) {
|
|
|
+ //新增缺失
|
|
|
+ if (AppealOperationTypeEnum.ADD_NO_EXIST.getKey().equals(addAppealInfoVO.getAppealOperationType())) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ List<AppealInfo> appealInfos = appealInfoFacade.list(new QueryWrapper<AppealInfo>()
|
|
|
+ .eq("hospital_id", addAppealInfoVO.getHospitalId())
|
|
|
+ .eq("behospital_code", addAppealInfoVO.getBehospitalCode())
|
|
|
+ .eq("cases_entry_id", addAppealInfoVO.getCasesEntryId())
|
|
|
+ .notIn("claimant_id",addAppealInfoVO.getClaimantId())
|
|
|
+ .orderByDesc("gmt_create"));
|
|
|
+ if (ListUtil.isNotEmpty(appealInfos)) {
|
|
|
+ Asserts.fail("该缺陷条目已被他人操作,无法操作。");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private AppealInfo getAppealInfo(AddAppealInfoVO addAppealInfoVO) {
|
|
|
if (addAppealInfoVO.getCasesEntryId() == null) {
|
|
|
Asserts.fail("新增已有条目casesEntryId不能为空");
|
|
@@ -347,12 +369,12 @@ public class MedAppealInfoManagementFacade {
|
|
|
QcresultDetail nowQcresultDetail = null;
|
|
|
if (qcresultDetail != null) {
|
|
|
//获取最新的缺陷
|
|
|
- List<QcresultDetail> qcresultDetails = qcresultDetailFacade.list(new QueryWrapper<QcresultDetail>()
|
|
|
- .eq("hospital_id",qcresultDetail.getHospitalId())
|
|
|
- .eq("behospital_code",qcresultDetail.getBehospitalCode())
|
|
|
- .eq("cases_entry_id",qcresultDetail.getCasesEntryId())
|
|
|
+ List<QcresultDetail> qcresultDetails = qcresultDetailFacade.list(new QueryWrapper<QcresultDetail>()
|
|
|
+ .eq("hospital_id", qcresultDetail.getHospitalId())
|
|
|
+ .eq("behospital_code", qcresultDetail.getBehospitalCode())
|
|
|
+ .eq("cases_entry_id", qcresultDetail.getCasesEntryId())
|
|
|
.orderByDesc("gmt_create"));
|
|
|
- if(ListUtil.isNotEmpty(qcresultDetails)){
|
|
|
+ if (ListUtil.isNotEmpty(qcresultDetails)) {
|
|
|
nowQcresultDetail = qcresultDetails.get(0);
|
|
|
}
|
|
|
|