|
@@ -48,25 +48,38 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
if (null == qcresultVO.getOptResultAlgVO()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "操作条目不能为空!");
|
|
|
}
|
|
|
+
|
|
|
+ Long hospitalId = Long.valueOf(SysUserUtils.getCurrentHospitalID());
|
|
|
+ //验证是否评估过
|
|
|
+ Integer cnt
|
|
|
+ = this.count(
|
|
|
+ new QueryWrapper<QcresultInfo>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", qcresultVO.getBehospitalCode()));
|
|
|
+ if (cnt < 1){
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS, "该病历尚未评分,请先评分!");
|
|
|
+ }
|
|
|
//查询质控评分明细信息
|
|
|
- qcresultVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
|
|
|
+ qcresultVO.setHospitalId(hospitalId);
|
|
|
List<QcresultDetail> qcresultDetails
|
|
|
= qcresultDetailServiceImpl.list(
|
|
|
new QueryWrapper<QcresultDetail>()
|
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("hospital_id", qcresultVO.getHospitalId())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
.eq("behospital_code", qcresultVO.getBehospitalCode()));
|
|
|
|
|
|
//评分
|
|
|
AlgorithmVO algorithmVO = new AlgorithmVO();
|
|
|
List<QcResultAlgVO> qcResultAlgVOList
|
|
|
= BeanUtil.listCopyTo(qcresultDetails, QcResultAlgVO.class);
|
|
|
+ algorithmVO.setType(qcresultVO.getType());
|
|
|
algorithmVO.setOptResultAlgVO(qcresultVO.getOptResultAlgVO());
|
|
|
algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
|
|
|
AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
|
|
|
//更新质控评分结果信息
|
|
|
AnalyzeVO analyzeVO = new AnalyzeVO();
|
|
|
- analyzeVO.setHospitalId(qcresultVO.getHospitalId());
|
|
|
+ analyzeVO.setHospitalId(hospitalId);
|
|
|
analyzeVO.setBehospitalCode(qcresultVO.getBehospitalCode());
|
|
|
this.saveQcResult(algorithmDTO, algorithmVO, analyzeVO,null);
|
|
|
return true;
|