Browse Source

申诉驳回v2.2.0审核通过接口修改

zhanghang 3 years ago
parent
commit
92280556ec

+ 9 - 28
src/main/java/com/diagbot/facade/MedAppealExamineInfoManagementFacade.java

@@ -23,7 +23,7 @@ import com.diagbot.vo.QcresultVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.math.BigDecimal;
+import java.time.LocalDateTime;
 
 /**
  * @Description:申述记录
@@ -45,21 +45,16 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
      * @return
      */
     public Boolean approved (ApprovedVo approvedVo) {
+        LocalDateTime dateTime = LocalDateTime.now();
         QcresultVO qcresultVO = new QcresultVO();
         qcresultVO.setBehospitalCode(approvedVo.getBehospitalCode());
         qcresultVO.setHospitalId(approvedVo.getHospitalId());
         QcResultAlgVO qcResultAlgVO = approvedVo.getQcResultAlgVO();
         qcresultVO.setOptResultAlgVO(qcResultAlgVO);
-//        optResultAlgVO.setCasesId(approvedVo.getCasesId());
-//        optResultAlgVO.setScore(approvedVo.getValue());
-//        optResultAlgVO.setMsg(approvedVo.getCasesEntryMsg());
-//        optResultAlgVO.setExplainInfo(approvedVo.getRemark());
         //获取处理方式
         String handling = approvedVo.getExampleOperation();
         if(StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.UP_OR_DEL.getKey())){
             //调用删除接口
-            //optResultAlgVO.setCasesEntryId(approvedVo.getQcresultDetailId());
-//            qcresultVO.setOptResultAlgVO(optResultAlgVO);
             qcresultVO.setDelStatus(0);
             qcresultVO.setType(4);
             AnalyzeDTO analyzeDTORespDTO = qcresultInfoFacade.changeQcResult(qcresultVO);
@@ -68,6 +63,7 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
                 MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
                 medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.UP_OR_DEL.getKey());
                 medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+                medAppealExamineInfo.setGmtCreate(dateTime);
                 medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
                 boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -85,8 +81,6 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
         }
         if(StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.UP_OR_UP.getKey())){
             //调用修改接口
-//            qcResultAlgVO.setCasesEntryId(approvedVo.getQcresultDetailId());
-//            qcresultVO.setOptResultAlgVO(optResultAlgVO);
             qcresultVO.setType(3);
             AnalyzeDTO analyzeDTORespDTO = qcresultInfoFacade.changeQcResult(qcresultVO);
             if(analyzeDTORespDTO.getIsSuccess()){
@@ -94,6 +88,7 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
                 MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
                 medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.UP_OR_UP.getKey());
                 medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+                medAppealExamineInfo.setGmtCreate(dateTime);
                 medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
                 boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -110,8 +105,6 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
             }
         }
         if(StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.ADD_EXIST.getKey())){
-            //optResultAlgVO.setCasesEntryId(approvedVo.getCasesEntryId());
-//            qcresultVO.setOptResultAlgVO(optResultAlgVO);
             //判断是否已存在该条目
             QcresultDetail qcresultDetail = qcresultDetailFacade.getOne(new QueryWrapper<QcresultDetail>()
                     .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -127,27 +120,18 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
 
             AnalyzeDTO analyzeDTORespDTO = qcresultInfoFacade.changeQcResult(qcresultVO);
             if(analyzeDTORespDTO.getIsSuccess()){
-                MedAppealInfo medAppealInfo = new MedAppealInfo();
-                medAppealInfo.setCasesEntryId(qcResultAlgVO.getCasesEntryId());
-                medAppealInfo.setCasesEntryMsg(qcResultAlgVO.getMsg());
-                medAppealInfo.setCasesEntryName(approvedVo.getCasesEntryName());
-                medAppealInfo.setValue(qcResultAlgVO.getScore());
-                boolean update = medAppealInfoManagementFacade.update(medAppealInfo, new UpdateWrapper<MedAppealInfo>()
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("hospital_id", approvedVo.getHospitalId())
-                        .eq("behospital_code", approvedVo.getBehospitalCode())
-                        .eq("check_id", approvedVo.getAppealId())
-                );
+                Boolean appealInfo = updateAppealInfo(approvedVo);
                 MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
                 medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.ADD_EXIST.getKey());
                 medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
                 medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
+                medAppealExamineInfo.setGmtCreate(dateTime);
                 boolean update1 = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
                         .eq("appeal_info_id", approvedVo.getId())
                         .eq("check_id", approvedVo.getAppealId())
                 );
-                if(update  && update1){
+                if(appealInfo && update1){
                     return  true;
                 }else {
                     throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "审核通过失败!");
@@ -157,8 +141,6 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
             }
         }
         if(StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.RECOVER.getKey())){
-//            qcResultAlgVO.setCasesEntryId(approvedVo.getQcresultDetailId());
-//            qcresultVO.setOptResultAlgVO(qcResultAlgVO);
             qcresultVO.setType(4);
             qcresultVO.setDelStatus(1);
             //调用删除接口
@@ -169,6 +151,7 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
                 medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.RECOVER.getKey());
                 medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
                 medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
+                medAppealExamineInfo.setGmtCreate(dateTime);
                 boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
                         .eq("appeal_info_id", approvedVo.getId())
@@ -184,14 +167,12 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
             }
         }
         if(StringUtil.isNotEmpty(handling) && handling.equals(ExampleOperationEnum.ADD_NO_EXIST.getKey())){
-//            optResultAlgVO.setCasesEntryId(approvedVo.getQcresultDetailId());
-//            qcresultVO.setOptResultAlgVO(optResultAlgVO);
-//            qcresultVO.setDelStatus(1);
             Boolean appealInfo = updateAppealInfo(approvedVo);
             MedAppealExamineInfo medAppealExamineInfo= new MedAppealExamineInfo();
             medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.ADD_NO_EXIST.getKey());
             medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
             medAppealExamineInfo.setProcessResult(approvedVo.getProcessResult());
+            medAppealExamineInfo.setGmtCreate(dateTime);
             boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
                     .eq("is_deleted", IsDeleteEnum.N.getKey())
                     .eq("appeal_info_id", approvedVo.getId())

+ 1 - 1
src/main/java/com/diagbot/vo/ApprovedVo.java

@@ -37,7 +37,7 @@ public class ApprovedVo {
     @ApiModelProperty(value = "处理方式(1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复)",required = true)
     private String exampleOperation;
 
-    @ApiModelProperty(value = "处理结果",required = true)
+    @ApiModelProperty(value = "处理结果")
     private String processResult;
 
 //    @ApiModelProperty(value = "申诉模块",required = true)