浏览代码

Merge branch 'dev/20220105_2.2.0_通用版_申诉驳回' into test

zhanghang 3 年之前
父节点
当前提交
e41cc358ff

+ 6 - 6
doc/041.20220118_v2.2.0_通用版_申诉驳回/qc_init_v2.2.0_通用版_申诉驳回.sql

@@ -137,13 +137,13 @@ INSERT INTO `med_work_flow_node` (`work_flow_id`,`work_flow_node_id`, `work_node
 sys_dictionary_info 系统字典表
  */
 
-INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '0', '删改', '2', '0', '操作类型');
-INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '1', '新增已有', '2', '0', '操作类型');
-INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '2', '新增缺失', '2', '0', '操作类型');
-INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '3', '恢复', '2', '0', '操作类型');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '0', '删改条目', '2', '0', '操作类型');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '1', '新增已有条目', '2', '0', '操作类型');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '2', '新增缺失条目', '2', '0', '操作类型');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '32', '3', '恢复条目', '2', '0', '操作类型');
 INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '0', '待审核', '2', '0', '状态');
-INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '1', '驳回', '2', '0', '状态');
-INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '2', '通过', '2', '0', '状态');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '1', '驳回', '2', '0', '状态');
+INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '33', '2', '审核通过', '2', '0', '状态');
 INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '34', '申诉驳回', '32,33,35', '2', '0', '申诉驳回状态登字典数据总览');
 INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '1', '修改', '2', '0', '审核处理方式');
 INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '2', '删除', '2', '0', '审核处理方式');

+ 17 - 7
src/main/java/com/diagbot/facade/MedAppealExamineInfoManagementFacade.java

@@ -7,16 +7,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.diagbot.client.MedAppealExamineInfoServiceClient;
 import com.diagbot.dto.AnalyzeDTO;
 
-import com.diagbot.dto.ExportExcelByDeptDTO;
 import com.diagbot.dto.ExportGetAppealReviewDTO;
 import com.diagbot.dto.ExportGetComplaintRecordDTO;
-import com.diagbot.dto.ExportSevenByDeptDTO;
 import com.diagbot.dto.GetAppealReviewDTO;
 import com.diagbot.dto.GetComplaintRecordDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.MedAppealExamineInfo;
 import com.diagbot.entity.MedAppealInfo;
 
+import com.diagbot.entity.QcCasesEntry;
 import com.diagbot.entity.QcresultDetail;
 import com.diagbot.enums.ExampleOperationEnum;
 import com.diagbot.enums.ExampleStatusEnum;
@@ -26,13 +25,11 @@ import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.MedAppealExamineInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ExcelUtils;
-import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.ApprovedVo;
 import com.diagbot.vo.GetAppealReviewVO;
 import com.diagbot.vo.GetComplaintRecordVO;
 import com.diagbot.vo.QcResultAlgVO;
-import com.diagbot.vo.QcResultShortPageVO;
 import com.diagbot.vo.QcresultVO;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,7 +37,6 @@ import org.springframework.stereotype.Component;
 
 import javax.servlet.http.HttpServletResponse;
 import java.time.LocalDateTime;
-import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -56,6 +52,8 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
     private  MedAppealInfoManagementFacade medAppealInfoManagementFacade;
     @Autowired
     private QcresultInfoFacade qcresultInfoFacade;
+    @Autowired
+    private QcCasesEntryFacade qcCasesEntryFacade ;
 
     /**
      * 审核通过
@@ -138,7 +136,7 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
 
             AnalyzeDTO analyzeDTORespDTO = qcresultInfoFacade.changeQcResult(qcresultVO);
             if(analyzeDTORespDTO.getIsSuccess()){
-                Boolean appealInfo = updateAppealInfo(approvedVo);
+                Boolean updateAppealInfo = updateAppealInfo(approvedVo);
                 MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
                 medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.ADD_EXIST.getKey());
                 medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
@@ -149,7 +147,7 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
                         .eq("appeal_info_id", approvedVo.getId())
                         .eq("check_id", approvedVo.getAppealId())
                 );
-                if(appealInfo && update1){
+                if(updateAppealInfo && update1){
                     return  true;
                 }else {
                     throw new CommonException(CommonErrorCode.INSERT_DATA_FAILED, "审核通过失败!");
@@ -206,7 +204,19 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
     }
 
     public Boolean updateAppealInfo (ApprovedVo approvedVo) {
+        QcresultDetail qcresultDetail = qcresultDetailFacade.getOne(new QueryWrapper<QcresultDetail>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", approvedVo.getHospitalId())
+                .eq("behospital_code", approvedVo.getBehospitalCode())
+                .eq("cases_entry_id", approvedVo.getQcResultAlgVO().getCasesEntryId())
+        );
+        QcCasesEntry qcCasesEntry = qcCasesEntryFacade.getOne(new QueryWrapper<QcCasesEntry>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", approvedVo.getQcResultAlgVO().getCasesEntryId())
+        );
         MedAppealInfo medAppealInfo = new MedAppealInfo();
+        medAppealInfo.setQcresultDetailId(qcresultDetail.getId());
+        medAppealInfo.setCasesEntryName(qcCasesEntry.getName());
         medAppealInfo.setWorkFlowNodeId(approvedVo.getWorkFlowNodeId());
         boolean update = medAppealInfoManagementFacade.update(medAppealInfo, new UpdateWrapper<MedAppealInfo>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())