|
@@ -1,6 +1,8 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.dto.AlgorithmDTO;
|
|
|
+import com.diagbot.entity.QcresultDetail;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
@@ -32,6 +34,8 @@ public class AlgorithmFacade {
|
|
|
|
|
|
@Autowired
|
|
|
private SysHospitalSetFacade sysHospitalSetFacade;
|
|
|
+ @Autowired
|
|
|
+ private QcresultDetailFacade qcresultDetailFacade;
|
|
|
|
|
|
/**
|
|
|
* 获取评分结果和等级
|
|
@@ -196,7 +200,7 @@ public class AlgorithmFacade {
|
|
|
|
|
|
}
|
|
|
//删除
|
|
|
- else if (algorithmVO.getType().equals(2)) {
|
|
|
+ else if (algorithmVO.getType().equals(2)||(algorithmVO.getType().equals(4)&&0==algorithmVO.getDelStatus())) {
|
|
|
if (null == algorithmVO.getOptResultAlgVO()) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "删除操作条目不能为空!");
|
|
|
}
|
|
@@ -216,6 +220,35 @@ public class AlgorithmFacade {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //恢复
|
|
|
+ else if (algorithmVO.getType().equals(4)&&1==algorithmVO.getDelStatus()) {
|
|
|
+ if (null == algorithmVO.getOptResultAlgVO()) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "恢复操作条目不能为空!");
|
|
|
+ }
|
|
|
+ //操作数据
|
|
|
+ if (ListUtil.isNotEmpty(qcResultAlgVOList)) {
|
|
|
+ Boolean hasData = false;
|
|
|
+ Long optId = algorithmVO.getOptResultAlgVO().getId(); // 操作id
|
|
|
+ QcresultDetail qcresultDetail = qcresultDetailFacade.getOne(new QueryWrapper<QcresultDetail>()
|
|
|
+ .eq("id",optId));
|
|
|
+ if(qcresultDetail!=null)
|
|
|
+ {
|
|
|
+ QcResultAlgVO qcResultAlgVO = new QcResultAlgVO();
|
|
|
+ qcResultAlgVO.setScore(qcresultDetail.getScore());
|
|
|
+ qcResultAlgVO.setId(qcresultDetail.getId());
|
|
|
+ qcResultAlgVO.setCasesEntryId(qcresultDetail.getCasesEntryId());
|
|
|
+ qcResultAlgVO.setCasesId(qcresultDetail.getCasesId());
|
|
|
+ qcResultAlgVO.setMsg(qcresultDetail.getMsg());
|
|
|
+ qcResultAlgVO.setIsReject(qcresultDetail.getIsReject());
|
|
|
+ qcResultAlgVOList.add(qcResultAlgVO);
|
|
|
+ hasData = true;
|
|
|
+ }
|
|
|
+ if (!hasData) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "恢复的条目不存在!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//修改
|
|
|
else if (algorithmVO.getType().equals(3)) {
|
|
|
if (null == algorithmVO.getOptResultAlgVO()) {
|