|
@@ -153,6 +153,13 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
useId = 952795279527L;
|
|
useId = 952795279527L;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //获取上一次人工添加的缺陷
|
|
|
|
+ QcresultInfo qcresultInfoup
|
|
|
|
+ = this.getOne(
|
|
|
|
+ new QueryWrapper<QcresultInfo>()
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode()), false);
|
|
Date now = DateUtil.now();
|
|
Date now = DateUtil.now();
|
|
this.update(new UpdateWrapper<QcresultInfo>()
|
|
this.update(new UpdateWrapper<QcresultInfo>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -200,12 +207,16 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
// qcresultDetailServiceImpl.remove(new QueryWrapper<QcresultDetail>()
|
|
// qcresultDetailServiceImpl.remove(new QueryWrapper<QcresultDetail>()
|
|
// .eq("hospital_id", analyzeVO.getHospitalId())
|
|
// .eq("hospital_id", analyzeVO.getHospitalId())
|
|
// .eq("behospital_code", analyzeVO.getBehospitalCode()));
|
|
// .eq("behospital_code", analyzeVO.getBehospitalCode()));
|
|
- //1.获取原来人工添加的缺陷
|
|
|
|
- List<QcresultDetail> oldQcresultDetails = qcresultDetailServiceImpl.list(new QueryWrapper<QcresultDetail>()
|
|
|
|
- .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
- .eq("grade_type", "2")
|
|
|
|
- .eq("behospital_code", analyzeVO.getBehospitalCode()));
|
|
|
|
|
|
+
|
|
|
|
+ //上一次人工评分条目
|
|
|
|
+ List<QcresultDetail> oldQcresultDetails = null;
|
|
|
|
+ if (qcresultInfoup != null) {
|
|
|
|
+ oldQcresultDetails = qcresultDetailServiceImpl.list(new QueryWrapper<QcresultDetail>()
|
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
+ .eq("qcresult_info_id", qcresultInfoup.getId())
|
|
|
|
+ .eq("grade_type", "2")
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode()));
|
|
|
|
+ }
|
|
|
|
|
|
qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -332,37 +343,36 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
} else {
|
|
} else {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "delStatus参数错误");
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "delStatus参数错误");
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
/* DO NOTHING */
|
|
/* DO NOTHING */
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- //修改原条目id
|
|
|
|
- //1.上一次手动评分的
|
|
|
|
- if (qcresultInfoOld != null && qcresultInfoOld.getId() != null) {
|
|
|
|
|
|
+ //如果不是自动评分(是新增修改删除条目)修改评分主表id
|
|
|
|
+ if (algorithmVO.getType() != 0) {
|
|
|
|
+ //修改上一次人工条目 评分主表id
|
|
|
|
+ if (qcresultInfoup != null && qcresultInfoup.getId() != null) {
|
|
|
|
+ qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
|
+ .eq("qcresult_info_id", qcresultInfoup.getId())
|
|
|
|
+ .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
+ .eq("grade_type", 2)
|
|
|
|
+ .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
|
+ .set("qcresult_info_id", newId)
|
|
|
|
+ .set("modifier", useId)
|
|
|
|
+ .set("gmt_modified", now)
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ //未删除的 评分主表id
|
|
qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
- .eq("qcresult_info_id", qcresultInfoOld.getId())
|
|
|
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("hospital_id", analyzeVO.getHospitalId())
|
|
.eq("hospital_id", analyzeVO.getHospitalId())
|
|
- .eq("grade_type", 2)
|
|
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
.eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
.set("qcresult_info_id", newId)
|
|
.set("qcresult_info_id", newId)
|
|
.set("modifier", useId)
|
|
.set("modifier", useId)
|
|
.set("gmt_modified", now)
|
|
.set("gmt_modified", now)
|
|
);
|
|
);
|
|
}
|
|
}
|
|
- //2.上一次未删除的
|
|
|
|
- qcresultDetailServiceImpl.update(new UpdateWrapper<QcresultDetail>()
|
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
|
- .eq("hospital_id", analyzeVO.getHospitalId())
|
|
|
|
- .eq("behospital_code", analyzeVO.getBehospitalCode())
|
|
|
|
- .set("qcresult_info_id", newId)
|
|
|
|
- .set("modifier", useId)
|
|
|
|
- .set("gmt_modified", now)
|
|
|
|
- );
|
|
|
|
|
|
|
|
|
|
|
|
//质控模块评分数据
|
|
//质控模块评分数据
|