|
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.diagbot.dto.AlgorithmDTO;
|
|
|
import com.diagbot.dto.AnalyzeDTO;
|
|
|
import com.diagbot.dto.QcResultDTO;
|
|
|
+import com.diagbot.entity.BehospitalInfo;
|
|
|
import com.diagbot.entity.QcresultDetail;
|
|
|
import com.diagbot.entity.QcresultInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
@@ -42,6 +43,8 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
private QcresultDetailServiceImpl qcresultDetailServiceImpl;
|
|
|
@Autowired
|
|
|
private AlgorithmFacade algorithmFacade;
|
|
|
+ @Autowired
|
|
|
+ private BehospitalInfoFacade behospitalInfoFacade;
|
|
|
|
|
|
public AnalyzeDTO changeQcResult(QcresultVO qcresultVO) {
|
|
|
//入参验证
|
|
@@ -53,6 +56,16 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
Long hospitalId = Long.valueOf(SysUserUtils.getCurrentHospitalID());
|
|
|
+ //验证改病历的存在性
|
|
|
+ Integer mrcnt
|
|
|
+ = behospitalInfoFacade.count(
|
|
|
+ new QueryWrapper<BehospitalInfo>()
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("behospital_code", qcresultVO.getBehospitalCode()));
|
|
|
+ if (mrcnt < 1){
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS, "该医院下改病历号不存在!");
|
|
|
+ }
|
|
|
//验证是否评估过
|
|
|
Integer cnt
|
|
|
= this.count(
|