فهرست منبع

申诉2.2.0申诉相关功能提交

songxinlu 3 سال پیش
والد
کامیت
afd9ee36bb

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

@@ -12,7 +12,7 @@ CREATE TABLE `med_appeal_info` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
   `hospital_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '医院ID',
   `behospital_code` varchar(16) NOT NULL COMMENT '病人住院ID',
-  `qcresult_detail_id` bigint(20) NOT NULL COMMENT '质控缺陷id',
+  `qcresult_detail_id` bigint(20) DEFAULT NULL COMMENT '质控缺陷id',
   `qcresult_detail_msg` varchar(255) DEFAULT NULL COMMENT '缺陷详情',
   `qcresult_detai_value` bigint(60) DEFAULT NULL COMMENT '缺陷扣分分值',
   `cases_entry_id` bigint(20) DEFAULT NULL COMMENT '条目ID',
@@ -35,7 +35,7 @@ CREATE TABLE `med_appeal_info` (
   `modifier` varchar(60) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
   `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='申诉记录表';
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='申诉记录表';
 
 /**
 med_appeal_examine_info 申诉审批表
@@ -45,7 +45,7 @@ CREATE TABLE `med_appeal_examine_info` (
   `appeal_info_id` bigint(11) NOT NULL COMMENT '申诉id',
   `check_id` bigint(20) NOT NULL COMMENT '审核人id',
   `example_status` char(1) DEFAULT '0' COMMENT '审核状态:0:驳回|1:通过',
-  `example_operation` char(1) DEFAULT NULL COMMENT '审核处理方式: 1:修改|2:删除|3:新增已有|4:新增缺失',
+  `example_operation` char(1) DEFAULT NULL COMMENT '审核处理方式: 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复',
   `process_result` varchar(255) DEFAULT NULL COMMENT '处理结果',
   `reject_reason` varchar(255) DEFAULT NULL COMMENT '驳回理由',
   `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
@@ -55,7 +55,7 @@ CREATE TABLE `med_appeal_examine_info` (
   `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
   `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
   PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='申诉审批表';
+) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='申诉审批表';
 
 
 /**

+ 14 - 4
src/main/java/com/diagbot/client/MedAppealInfoServiceClient.java

@@ -1,23 +1,24 @@
 package com.diagbot.client;
 
 import com.diagbot.client.hystrix.MedAppealInfoServiceHystrix;
-import com.diagbot.client.hystrix.QcServiceHystrix;
+import com.diagbot.dto.GetAppealInfoDTO;
 import com.diagbot.dto.GetReviewerDTO;
-import com.diagbot.dto.OutputInfo;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.Response;
 import com.diagbot.entity.WorkFlowInfo;
 import com.diagbot.vo.AddAppealInfoVO;
+import com.diagbot.vo.CancelAppealInfoVO;
+import com.diagbot.vo.GetAppealInfoVO;
+import com.diagbot.vo.GetAppealOperationTypeVO;
 import com.diagbot.vo.GetReviewerVO;
 import com.diagbot.vo.MedAppealInfoVO;
-import com.diagbot.vo.QueryVo;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
 import javax.validation.Valid;
-import java.net.URI;
 import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -37,6 +38,15 @@ public interface MedAppealInfoServiceClient {
     @PostMapping(value = "/report-service/medAppealInfoManage/getReviewer")
     RespDTO<List<GetReviewerDTO>> getReviewer(@RequestBody GetReviewerVO getReviewerVO);
 
+    @PostMapping(value = "/report-service/medAppealInfoManage/getAppealOperationType")
+    RespDTO<Map<String, String>> getAppealOperationType(@RequestBody @Valid GetAppealOperationTypeVO getAppealOperationTypeVO);
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/cancelAppealInfo")
+    RespDTO<Boolean> cancelAppealInfo(@RequestBody @Valid CancelAppealInfoVO cancelAppealInfoVO);
+
+    @PostMapping(value = "/report-service/medAppealInfoManage/getAppealInfo")
+    RespDTO<GetAppealInfoDTO> getAppealInfo(@RequestBody GetAppealInfoVO getAppealInfoVO);
+
 
 }
 

+ 23 - 0
src/main/java/com/diagbot/client/hystrix/MedAppealInfoServiceHystrix.java

@@ -3,12 +3,16 @@ package com.diagbot.client.hystrix;
 
 import com.diagbot.client.MedAppealInfoServiceClient;
 import com.diagbot.client.QcServiceClient;
+import com.diagbot.dto.GetAppealInfoDTO;
 import com.diagbot.dto.GetReviewerDTO;
 import com.diagbot.dto.OutputInfo;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.Response;
 import com.diagbot.entity.WorkFlowInfo;
 import com.diagbot.vo.AddAppealInfoVO;
+import com.diagbot.vo.CancelAppealInfoVO;
+import com.diagbot.vo.GetAppealInfoVO;
+import com.diagbot.vo.GetAppealOperationTypeVO;
 import com.diagbot.vo.GetReviewerVO;
 import com.diagbot.vo.MedAppealInfoVO;
 import com.diagbot.vo.QueryVo;
@@ -19,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import javax.validation.Valid;
 import java.net.URI;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @description: 申诉远程调用熔断器
@@ -46,4 +51,22 @@ public class MedAppealInfoServiceHystrix implements MedAppealInfoServiceClient {
         log.error("【hystrix】调用{}异常", "getReviewer");
         return null;
     }
+
+    @Override
+    public RespDTO<Map<String, String>> getAppealOperationType(@Valid GetAppealOperationTypeVO getAppealOperationTypeVO) {
+        log.error("【hystrix】调用{}异常", "getAppealOperationType");
+        return null;
+    }
+
+    @Override
+    public RespDTO<Boolean> cancelAppealInfo(@Valid CancelAppealInfoVO cancelAppealInfoVO) {
+        log.error("【hystrix】调用{}异常", "cancelAppealInfo");
+        return null;
+    }
+
+    @Override
+    public RespDTO<GetAppealInfoDTO> getAppealInfo(GetAppealInfoVO getAppealInfoVO) {
+        log.error("【hystrix】调用{}异常", "getAppealInfo");
+        return null;
+    }
 }

+ 3 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -293,6 +293,9 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/appealInfoME/getComplaintRecord").permitAll()
                 .antMatchers("/qc/appealInfo/addAppealInfo").permitAll()
                 .antMatchers("/qc/appealInfo/getReviewer").permitAll()
+                .antMatchers("/qc/appealInfo/getAppealOperationType").permitAll()
+                .antMatchers("/qc/appealInfo/cancelAppealInfo").permitAll()
+                .antMatchers("/qc/appealInfo/getAppealInfo").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

+ 3 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -345,6 +345,9 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/appealInfoME/getComplaintRecord", request)
                 || matchers("/qc/appealInfo/addAppealInfo", request)
                 || matchers("/qc/appealInfo/getReviewer", request)
+                || matchers("/qc/appealInfo/getAppealOperationType", request)
+                || matchers("/qc/appealInfo/cancelAppealInfo", request)
+                || matchers("/qc/appealInfo/getAppealInfo", request)
                 || matchers("/", request)) {
             return true;
         }

+ 114 - 0
src/main/java/com/diagbot/dto/GetAppealInfoDTO.java

@@ -0,0 +1,114 @@
+package com.diagbot.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Description: 申诉审核内容对象
+ * @Author songxl
+ */
+@Data
+public class GetAppealInfoDTO implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(value = "病人住院ID")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "性别(男,女)")
+    private String sex;
+
+    @ApiModelProperty(value = "年龄")
+    private String age;
+
+    @ApiModelProperty(value = "住院科室ID")
+    private String deptId;
+
+    @ApiModelProperty(value = "住院科室名称")
+    private String deptName;
+
+    @ApiModelProperty(value = "入院时间")
+    private Date behospitalDate;
+
+    @ApiModelProperty(value = "出院时间")
+    private Date leaveHospitalDate;
+
+    @ApiModelProperty(value = "申诉id")
+    private Long id;
+
+    @ApiModelProperty(value = "医院ID")
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "质控缺陷id")
+    private Long qcresultDetailId;
+
+    @ApiModelProperty(value = "缺陷详情")
+    private String qcresultDetailMsg;
+
+    @ApiModelProperty(value = "缺陷扣分分值")
+    private Long qcresultDetaiValue;
+
+    @ApiModelProperty(value = "条目ID")
+    private Long casesEntryId;
+
+    @ApiModelProperty(value = "质控条目(新增已有操作才有值)")
+    private String casesEntryName;
+
+    @ApiModelProperty(value = "提示信息(新增已有操作才有值)")
+    private String casesEntryMsg;
+
+    @ApiModelProperty(value = "分值(新增已有操作才有值)")
+    private Long value;
+
+    @ApiModelProperty(value = "申诉模块id")
+    private Long modeId;
+
+    @ApiModelProperty(value = "模块名称")
+    private String modeName;
+
+    @ApiModelProperty(value = "病历内容")
+    private String defectContent;
+
+    @ApiModelProperty(value = "申诉人id")
+    private Long claimantId;
+
+    @ApiModelProperty(value = "申诉类型(0:医生申诉|1:质控申诉)")
+    private String appealType;
+
+    @ApiModelProperty(value = "申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "申诉说明")
+    private String appealExplain;
+
+    @ApiModelProperty(value = "审核人id")
+    private Long checkId;
+
+    @ApiModelProperty(value = "申诉备注")
+    private String appealRemark;
+
+    @ApiModelProperty(value = "审核状态:0:驳回|1:通过")
+    private String exampleStatus;
+
+    @ApiModelProperty(value = "审核处理方式: 1:修改|2:删除|3:新增已有|4:新增缺失|5:恢复")
+    private String exampleOperation;
+
+    @ApiModelProperty(value = "处理结果")
+    private String processResult;
+
+    @ApiModelProperty(value = "驳回理由")
+    private String rejectReason;
+
+    @ApiModelProperty(value = "审核备注")
+    private String exampleRemark;
+
+    @ApiModelProperty(value = "申诉人姓名")
+    private String claimantName;
+
+    @ApiModelProperty(value = "审核人姓名")
+    private String checkName;
+}

+ 7 - 0
src/main/java/com/diagbot/dto/MsgDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -62,4 +63,10 @@ public class MsgDTO {
     private String explainInfo;
     // 条目id对应页面数据的key值
     private List<Long> pageKeyList = new ArrayList<>();
+
+    @ApiModelProperty("申诉条目id")
+    private Long appealInfoId;
+
+    @ApiModelProperty("审核状态 0:待审核|1:驳回|2:通过")
+    private String exampleStatus;
 }

+ 100 - 76
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -260,82 +260,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 qcResultDTO.setMenuData("");
             }
             res.put("result", qcResultDTO);
-            //增加该病历是否核查状态
-            QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
-            medCheckInfoQuerys.eq("is_deleted", IsDeleteEnum.N.getKey());
-            medCheckInfoQuerys.eq("behospital_code", getDetailVO.getBehospitalCode());
-            medCheckInfoQuerys.eq("hospital_id", hospitalId);
-            medCheckInfoQuerys.in("check_type", 0, 2);
-            medCheckInfoQuerys.eq("status", 1);
-            int count = medCheckInfoFacade.count(medCheckInfoQuerys);
-            if (count > 0) {
-                res.put("checkStatus", 1);
-            } else {
-                res.put("checkStatus", 0);
-            }
-            //增加该病案首页是否核查状态
-            Map<String, Object> mapAllMr = new HashMap<String, Object>();
-            mapAllMr.put("is_deleted", IsDeleteEnum.N.getKey());
-            mapAllMr.put("behospital_code", getDetailVO.getBehospitalCode());
-            mapAllMr.put("hospital_id", hospitalId);
-            mapAllMr.put("check_type", 1);
-            QueryWrapper<MedCheckInfo> medCheckInfoMr = new QueryWrapper<>();
-            medCheckInfoMr.allEq(mapAllMr);
-            int countMr = medCheckInfoFacade.count(medCheckInfoMr);
-            if (countMr > 0) {
-                res.put("mrStatus", 1);
-            } else {
-                res.put("mrStatus", 0);
-            }
-            //新增如果当前用户不是核查人员返回标志位用户核查按钮、修改、删除、隐藏显示
-            //1.获取病历核查人员id,该操作只能是核查员操作
-            List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
-                    .eq("is_deleted", IsDeleteEnum.N.getKey())
-                    .eq("hospital_id", hospitalId)
-                    .eq("behospital_code", getDetailVO.getBehospitalCode()));
-            if (medCheckInfos.size() == 1 && medCheckInfos.get(0).getCheckId() != null
-                    && medCheckInfos.get(0).getCheckId().equals(Long.parseLong(SysUserUtils.getCurrentPrincipleID()))) {
-                //2.1获取核查类型,判断当前用户有没有对应核查类型的角色
-                int jobType = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("behospital_code", getDetailVO.getBehospitalCode())
-                        .eq("hospital_id", hospitalId)
-                        .eq("check_id", SysUserUtils.getCurrentPrincipleID())).get(0).getJobType();
-                //2.2获取用户角色
-                List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("user_id", SysUserUtils.getCurrentPrincipleID())
-                ).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
-                switch (jobType) {
-                    case 0:
-                        if (roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l)) {
-                            res.put("checkShow", 1);
-                        } else {
-                            res.put("checkShow", 0);
-                        }
-                        break;
-                    case 1:
-                        if (roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l)) {
-                            res.put("checkShow", 1);
-                        } else {
-                            res.put("checkShow", 0);
-                        }
-                        break;
-                    case 2:
-                        if (roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l)) {
-                            res.put("checkShow", 1);
-                        } else {
-                            res.put("checkShow", 0);
-                        }
-                        break;
-                    default:
-                        res.put("checkShow", 0);
-                        break;
-                }
-
-            } else {
-                res.put("checkShow", 0);
-            }
+            //通过页面类型显示不同操作按钮
+            showButtonByPageType(hospitalId,getDetailVO,res);
         }
 
         // 获取提示信息
@@ -382,6 +308,104 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         return res;
     }
 
+    private void showButtonByPageType(Long hospitalId, GetDetailVO getDetailVO,Map<String, Object> res) {
+        switch (getDetailVO.getPageType()){
+            case "1":
+                break;
+            case "2":
+                checkButtonShow(hospitalId,getDetailVO,res);
+                break;
+            case "3":
+                appealButtonShow(hospitalId,getDetailVO,res);
+                break;
+            default:
+                break;
+        }
+    }
+
+    private void appealButtonShow(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
+        res.put("appealShow", 1);
+    }
+
+    private void checkButtonShow(Long hospitalId, GetDetailVO getDetailVO, Map<String, Object> res) {
+        //增加该病历是否核查状态
+        QueryWrapper<MedCheckInfo> medCheckInfoQuerys = new QueryWrapper<>();
+        medCheckInfoQuerys.eq("is_deleted", IsDeleteEnum.N.getKey());
+        medCheckInfoQuerys.eq("behospital_code", getDetailVO.getBehospitalCode());
+        medCheckInfoQuerys.eq("hospital_id", hospitalId);
+        medCheckInfoQuerys.in("check_type", 0, 2);
+        medCheckInfoQuerys.eq("status", 1);
+        int count = medCheckInfoFacade.count(medCheckInfoQuerys);
+        if (count > 0) {
+            res.put("checkStatus", 1);
+        } else {
+            res.put("checkStatus", 0);
+        }
+        //增加该病案首页是否核查状态
+        Map<String, Object> mapAllMr = new HashMap<String, Object>();
+        mapAllMr.put("is_deleted", IsDeleteEnum.N.getKey());
+        mapAllMr.put("behospital_code", getDetailVO.getBehospitalCode());
+        mapAllMr.put("hospital_id", hospitalId);
+        mapAllMr.put("check_type", 1);
+        QueryWrapper<MedCheckInfo> medCheckInfoMr = new QueryWrapper<>();
+        medCheckInfoMr.allEq(mapAllMr);
+        int countMr = medCheckInfoFacade.count(medCheckInfoMr);
+        if (countMr > 0) {
+            res.put("mrStatus", 1);
+        } else {
+            res.put("mrStatus", 0);
+        }
+        //新增如果当前用户不是核查人员返回标志位用户核查按钮、修改、删除、隐藏显示
+        //1.获取病历核查人员id,该操作只能是核查员操作
+        List<MedCheckInfo> medCheckInfos = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId)
+                .eq("behospital_code", getDetailVO.getBehospitalCode()));
+        if (medCheckInfos.size() == 1 && medCheckInfos.get(0).getCheckId() != null
+                && medCheckInfos.get(0).getCheckId().equals(Long.parseLong(SysUserUtils.getCurrentPrincipleID()))) {
+            //2.1获取核查类型,判断当前用户有没有对应核查类型的角色
+            int jobType = medCheckInfoFacade.list(new QueryWrapper<MedCheckInfo>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("behospital_code", getDetailVO.getBehospitalCode())
+                    .eq("hospital_id", hospitalId)
+                    .eq("check_id", SysUserUtils.getCurrentPrincipleID())).get(0).getJobType();
+            //2.2获取用户角色
+            List<Long> roleIds = sysUserRoleFacade.list(new QueryWrapper<SysUserRole>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("user_id", SysUserUtils.getCurrentPrincipleID())
+            ).stream().distinct().map(SysUserRole::getRoleId).collect(Collectors.toList());
+            switch (jobType) {
+                case 0:
+                    if (roleIds.contains(CheckerRoleEnum.DEPT_GENERAL.getKey() * 1l)) {
+                        res.put("checkShow", 1);
+                    } else {
+                        res.put("checkShow", 0);
+                    }
+                    break;
+                case 1:
+                    if (roleIds.contains(CheckerRoleEnum.QUAT_GENERAL.getKey() * 1l)) {
+                        res.put("checkShow", 1);
+                    } else {
+                        res.put("checkShow", 0);
+                    }
+                    break;
+                case 2:
+                    if (roleIds.contains(CheckerRoleEnum.HOSP_GENERAL.getKey() * 1l)) {
+                        res.put("checkShow", 1);
+                    } else {
+                        res.put("checkShow", 0);
+                    }
+                    break;
+                default:
+                    res.put("checkShow", 0);
+                    break;
+            }
+
+        } else {
+            res.put("checkShow", 0);
+        }
+    }
+
     /**
      * 处理数据(公共方法)
      *

+ 20 - 0
src/main/java/com/diagbot/vo/CancelAppealInfoVO.java

@@ -0,0 +1,20 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class CancelAppealInfoVO {
+    @ApiModelProperty(value = "申诉id", required = true)
+    private Long id;
+    @ApiModelProperty(value = "当前工作流节点id 1:申诉|2:撤回|3:审核", required = true)
+    @NotNull(message = "当前工作流节点id不能为空")
+    private Long workFlowNodeId;
+}

+ 21 - 0
src/main/java/com/diagbot/vo/GetAppealInfoVO.java

@@ -0,0 +1,21 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetAppealInfoVO {
+    @ApiModelProperty(value = "申诉id", required = true)
+    @NotNull(message = "申诉id不能为空")
+    private Long id;
+
+    @ApiModelProperty(value = "类型 1:申诉查看|2:审核查看")
+    private String type = "1";
+}

+ 25 - 0
src/main/java/com/diagbot/vo/GetAppealOperationTypeVO.java

@@ -0,0 +1,25 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetAppealOperationTypeVO {
+    @ApiModelProperty(value = "质控缺陷id", required = true)
+    @NotNull(message = "质控缺陷id不能为空")
+    private Long qcresultDetailId;
+    @ApiModelProperty(value = "审核状态 0:待审核|1:驳回|2:通过", required = true)
+    @NotBlank(message = "审核状态不能为空")
+    private String exampleStatus;
+    @ApiModelProperty(value = "申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)", required = true)
+    @NotBlank(message = "申诉操作类型不能为空")
+    private String appealOperationType;
+}

+ 3 - 0
src/main/java/com/diagbot/vo/GetDetailVO.java

@@ -19,4 +19,7 @@ public class GetDetailVO {
     @ApiModelProperty(hidden = true)
     private Long hospitalId; //医院ID
     private List<String> paramStr = new ArrayList<>(); // 获取具体的参数
+
+    @ApiModelProperty(value = "页面类型 1:评分详情页|2:核查详情页|3:申诉详情页")
+    private String pageType = "1";
 }

+ 28 - 0
src/main/java/com/diagbot/web/MedAppealInfoController.java

@@ -3,6 +3,7 @@ package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.client.MedAppealInfoServiceClient;
+import com.diagbot.dto.GetAppealInfoDTO;
 import com.diagbot.dto.GetReviewerDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.Response;
@@ -12,6 +13,9 @@ import com.diagbot.facade.SysHospitalSetFacade;
 import com.diagbot.util.SysJwtUtil;
 import com.diagbot.util.SysUserUtils;
 import com.diagbot.vo.AddAppealInfoVO;
+import com.diagbot.vo.CancelAppealInfoVO;
+import com.diagbot.vo.GetAppealInfoVO;
+import com.diagbot.vo.GetAppealOperationTypeVO;
 import com.diagbot.vo.GetReviewerVO;
 import com.diagbot.vo.MedAppealInfoVO;
 import io.swagger.annotations.Api;
@@ -27,6 +31,7 @@ import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
 import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -78,4 +83,27 @@ public class MedAppealInfoController {
         }
         return medAppealInfoServiceClient.getReviewer(getReviewerVO);
     }
+
+    @ApiOperation(value = "再次申诉获取操作类型[by:songxl]",
+            notes = "再次申诉获取操作类型")
+    @PostMapping("/getAppealOperationType")
+    public RespDTO<Map<String, String>> getAppealOperationType(@RequestBody @Valid GetAppealOperationTypeVO getAppealOperationTypeVO) {
+        return medAppealInfoServiceClient.getAppealOperationType(getAppealOperationTypeVO);
+    }
+
+    @ApiOperation(value = "撤回申诉[by:songxl]",
+            notes = "撤回申诉")
+    @PostMapping("/cancelAppealInfo")
+    @Transactional
+    public RespDTO<Boolean> cancelAppealInfo(@RequestBody @Valid CancelAppealInfoVO cancelAppealInfoVO) {
+        return medAppealInfoServiceClient.cancelAppealInfo(cancelAppealInfoVO);
+    }
+
+    @ApiOperation(value = "申诉记录详情-查看[by:songxl]",
+            notes = "申诉记录详情-查看")
+    @PostMapping("/getAppealInfo")
+    public RespDTO<GetAppealInfoDTO> getAppealInfo(@RequestBody GetAppealInfoVO getAppealInfoVO) {
+        return medAppealInfoServiceClient.getAppealInfo(getAppealInfoVO);
+    }
+
 }

+ 4 - 2
src/main/resources/application-dev.yml

@@ -59,7 +59,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.237:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.2.237:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: lantone
       # 连接池的配置信息
@@ -179,4 +179,6 @@ initmodeid:
 
 #对接过程中是否记录正常流程的日志
 log_switch:
-  enable: true
+  enable: true
+
+appeal.address: http://${myhost}:8871

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -2,7 +2,7 @@ spring:
   application:
     name: mrqc-sys
   profiles:
-    active: local
+    active: dev
   main:
     allow-bean-definition-overriding: true
 

+ 49 - 13
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -680,25 +680,61 @@
     </select>-->
 
     <select id="getMsg" resultType="com.diagbot.dto.MsgDTO">
-        SELECT a.*, u.linkman
+        SELECT
+        a.*, u.linkman,
+        appeal.id appeal_info_id,
+        examine.example_status
         FROM
         (
-        SELECT DISTINCT b.`name` model_name,c.score,c.msg,c.cases_entry_id,c.is_reject,c.id id,c.info, a.cases_id cases_id, d.score cases_score,
-        b.id model_id, a.name standard_msg, c.opt_type, c.grade_type,
-         c.gmt_create, c.gmt_modified, c.modifier,c.is_deleted,c.explain_info as explainInfo,
-        a.type, a.drgs
+        SELECT DISTINCT
+        b.`name` model_name,
+        c.score,
+        c.msg,
+        c.cases_entry_id,
+        c.is_reject,
+        c.id id,
+        c.info,
+        a.cases_id cases_id,
+        d.score cases_score,
+        b.id model_id,
+        a. NAME standard_msg,
+        c.opt_type,
+        c.grade_type,
+        c.gmt_create,
+        c.gmt_modified,
+        c.modifier,
+        c.is_deleted,
+        c.explain_info AS explainInfo,
+        a.type,
+        a.drgs
         FROM
-        `qc_cases_entry` a, qc_mode b, med_qcresult_detail c, qc_cases_hospital d
-        where a.is_deleted = 'N' and b.is_deleted = 'N' and d.is_deleted = 'N'
-        and a.id = c.cases_entry_id and a.mode_id = b.id
-        AND c.cases_id = d.cases_id and c.hospital_id = d.hospital_id
-        and c.hospital_id = #{hospitalId}
+        `qc_cases_entry` a,
+        qc_mode b,
+        med_qcresult_detail c,
+        qc_cases_hospital d
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.id = c.cases_entry_id
+        AND a.mode_id = b.id
+        AND c.cases_id = d.cases_id
+        AND c.hospital_id = d.hospital_id
+        AND c.hospital_id = #{hospitalId}
         <if test="qcresultInfoId != null">
             AND c.qcresult_info_id = #{qcresultInfoId}
         </if>
-        and c.behospital_code = #{behospitalCode}
-        order by b.order_no, c.grade_type desc, a.order_no) a
-        LEFT JOIN sys_user u  on u.id = a.modifier  and u.is_deleted = 'N'
+        AND c.behospital_code = #{behospitalCode}
+        ORDER BY
+        b.order_no,
+        c.grade_type DESC,
+        a.order_no
+        ) a
+        LEFT JOIN sys_user u ON u.id = a.modifier
+        LEFT JOIN med_appeal_info appeal ON a.id = appeal.qcresult_detail_id
+        AND appeal.is_deleted = 'N'
+        LEFT JOIN med_appeal_examine_info examine ON examine.appeal_info_id = appeal.id
+        AND u.is_deleted = 'N'
     </select>
 
     <select id="getForeignMsg" resultType="com.diagbot.dto.MsgDTO">