Преглед изворни кода

新增申诉、获取审核人对外接口

songxinlu пре 3 година
родитељ
комит
675f37fd11

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

@@ -149,13 +149,13 @@ INSERT INTO `sys_dictionary_info` (`is_deleted`, `gmt_create`, `gmt_modified`, `
 /**
 sys_hospital_set 系统配置表
  */
-INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '医院是否开启申诉功能', 'appeal_flag', 'true', '医院是否开启申诉功能');
-INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '审核人是否可以是自己开关', 'self_flag', 'false', '审核人是否可以是自己开关');
-INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '核查按钮是否关联申诉流程', 'check_appeal_relation', 'true', '核查按钮是否关联申诉流程');
-INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '核查操作是否与申诉状态关联配置', 'check_operation_with_appeal', 'true', '核查操作是否与申诉状态关联配置');
-INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '工作流节点-操作接口映射关系', 'work_flow_node_mapping', '{\"addAppealInfo\":1,\"cancelAppealInfo\":2,\"approved\":3,\"rejected\":3}', '工作流节点-操作接口映射关系');
-INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '医院是否开启申诉功能', 'appeal_flag', 'true', '医院是否开启申诉功能');
-INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '35', '审核人是否可以是自己开关', 'self_flag', 'false', '审核人是否可以是自己开关');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '医院是否开启申诉功能', 'appeal_flag', 'true', '医院是否开启申诉功能');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '审核人是否可以是自己开关', 'self_flag', 'false', '审核人是否可以是自己开关');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '核查按钮是否关联申诉流程', 'check_appeal_relation', 'true', '核查按钮是否关联申诉流程');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '核查操作是否与申诉状态关联配置', 'check_operation_with_appeal', 'true', '核查操作是否与申诉状态关联配置');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '工作流节点-操作接口映射关系', 'work_flow_node_mapping', '{\"addAppealInfo\":1,\"cancelAppealInfo\":2,\"approved\":3,\"rejected\":3}', '工作流节点-操作接口映射关系');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '医院是否开启申诉功能', 'appeal_flag', 'true', '医院是否开启申诉功能');
+INSERT INTO `sys_hospital_set` (`is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `hospital_id`, `name`, `code`, `value`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @hospitalid, '审核人是否可以是自己开关', 'self_flag', 'false', '审核人是否可以是自己开关');
 
 
 /**

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

@@ -272,7 +272,9 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/appealExamineInfo/getAppealReviewDictionary").permitAll()
                 .antMatchers("/qc/appealExamineInfo/getAuditNumber").permitAll()
                 .antMatchers("/qc/appealInfo/addAppealInfo").permitAll()
+                .antMatchers("/qc/appealInfo/addAppealInfoApi").permitAll()
                 .antMatchers("/qc/appealInfo/getReviewer").permitAll()
+                .antMatchers("/qc/appealInfo/getReviewerApi").permitAll()
                 .antMatchers("/qc/behospitalInfo/addCase").permitAll()
                 .antMatchers("/qc/appealInfo/delCase").permitAll()
                 .antMatchers("/qc/appealInfo/logicDelCase").permitAll()

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

@@ -349,7 +349,9 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/appealExamineInfo/getAppealReviewDictionary", request)
                 || matchers("/qc/appealExamineInfo/getAuditNumber", request)
                 || matchers("/qc/appealInfo/addAppealInfo", request)
+                || matchers("/qc/appealInfo/addAppealInfoApi", request)
                 || matchers("/qc/appealInfo/getReviewer", request)
+                || matchers("/qc/appealInfo/getReviewerApi", request)
                 || matchers("/qc/behospitalInfo/addCase", request)
                 || matchers("/qc/behospitalInfo/delCase", request)
                 || matchers("/qc/behospitalInfo/logicDelCase", request)

+ 3 - 0
src/main/java/com/diagbot/dto/GetComplaintRecordDTO.java

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -64,4 +65,6 @@ public class GetComplaintRecordDTO {
     @ApiModelProperty(value = "状态")
     private String exampleStatus;
 
+    @ApiModelProperty(value = "缺陷扣分分值")
+    private BigDecimal qcresultDetaiValue;
 }

+ 88 - 0
src/main/java/com/diagbot/vo/AddAppealInfoApiVO.java

@@ -0,0 +1,88 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class AddAppealInfoApiVO {
+
+    @ApiModelProperty(value = "医院ID",required = true)
+    @NotNull(message = "医院ID不能为空")
+    private Long hospitalId;
+
+    @ApiModelProperty(value = "病人住院ID", required = true)
+    @NotBlank(message = "病人住院ID不能为空")
+    private String behospitalCode;
+
+    @ApiModelProperty(value = "质控缺陷id")
+    private Long qcresultDetailId;
+
+    @ApiModelProperty(value = "缺陷详情")
+    private String qcresultDetailMsg;
+
+    @ApiModelProperty(value = "缺陷扣分分值")
+    private BigDecimal qcresultDetaiValue;
+
+    @ApiModelProperty(value = "条目ID")
+    private Long casesEntryId;
+
+    @ApiModelProperty(value = "模块总分")
+    private BigDecimal casesScore;
+
+    @ApiModelProperty(value = "单项否决(1-单项否决 0-非)")
+    private Integer isReject;
+
+    @ApiModelProperty(value = "质控条目(新增已有操作才有值)")
+    private String casesEntryName;
+
+    @ApiModelProperty(value = "提示信息(新增已有操作才有值)")
+    private String casesEntryMsg;
+
+    @ApiModelProperty(value = "分值(新增已有操作才有值)")
+    private BigDecimal value;
+
+    @ApiModelProperty(value = "模块数据标准id")
+    private Long casesId;
+
+    @ApiModelProperty(value = "模块名称", hidden = true)
+    private String casesName;
+
+
+    @ApiModelProperty(value = "病历内容")
+    private String defectContent;
+
+    @ApiModelProperty(value = "申诉人工号", required = true)
+    @NotBlank(message = "申诉人工号不能为空")
+    private String claimantId;
+
+    @ApiModelProperty(value = "申诉类型(0:医生申诉|1:质控申诉)", required = true)
+    @NotBlank(message = "申诉类型不能为空")
+    private String appealType;
+
+    @ApiModelProperty(value = "申诉操作类型(0:删改|1:新增已有|2:新增缺失|3:恢复)", required = true)
+    @NotBlank(message = "申诉操作类型不能为空")
+    private String appealOperationType;
+
+    @ApiModelProperty(value = "申诉说明", required = true)
+    @NotBlank(message = "申诉说明不能为空")
+    private String appealExplain;
+
+    @ApiModelProperty(value = "审核人id", required = true)
+    @NotNull(message = "审核人id不能为空")
+    private Long checkId;
+
+    @ApiModelProperty(value = "当前工作流节点id", hidden = true)
+    private Long workFlowNodeId;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+}

+ 3 - 3
src/main/java/com/diagbot/vo/AddAppealInfoVO.java

@@ -15,7 +15,7 @@ import java.math.BigDecimal;
 @Data
 public class AddAppealInfoVO {
 
-    @ApiModelProperty(value = "医院ID", hidden = true)
+    @ApiModelProperty(value = "医院ID")
     private Long hospitalId;
 
     @ApiModelProperty(value = "病人住院ID", required = true)
@@ -59,8 +59,8 @@ public class AddAppealInfoVO {
     @ApiModelProperty(value = "病历内容")
     private String defectContent;
 
-    @ApiModelProperty(value = "申诉人id", hidden = true)
-    private Long claimantId;
+    @ApiModelProperty(value = "申诉人id")
+    private String claimantId;
 
     @ApiModelProperty(value = "申诉类型(0:医生申诉|1:质控申诉)", required = true)
     @NotBlank(message = "申诉类型不能为空")

+ 22 - 0
src/main/java/com/diagbot/vo/GetReviewerApiVO.java

@@ -0,0 +1,22 @@
+package com.diagbot.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @Description:
+ * @Author songxl
+ * @Date 2022/1/6
+ */
+@Data
+public class GetReviewerApiVO {
+    @ApiModelProperty(value = "申述人工号",required = true)
+    @NotBlank(message = "申述人工号不能为空")
+    private String claimantId;
+    @ApiModelProperty(value = "是否包含自身开关", hidden = true)
+    private Boolean selfFlag = false;
+    @ApiModelProperty(value = "审核角色id", hidden = true)
+    private String roleID = "10";
+}

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

@@ -11,7 +11,7 @@ import lombok.Data;
 @Data
 public class GetReviewerVO {
     @ApiModelProperty(value = "申诉人id", hidden = true)
-    private Long claimantId;
+    private String claimantId;
     @ApiModelProperty(value = "是否包含自身开关", hidden = true)
     private Boolean selfFlag = false;
     @ApiModelProperty(value = "审核角色id", hidden = true)

+ 38 - 2
src/main/java/com/diagbot/web/MedAppealInfoController.java

@@ -11,19 +11,24 @@ import com.diagbot.dto.Response;
 import com.diagbot.entity.SysUser;
 import com.diagbot.entity.WorkFlowInfo;
 import com.diagbot.facade.SysHospitalSetFacade;
+import com.diagbot.util.BeanUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.SysJwtUtil;
 import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.AddAppealInfoApiVO;
 import com.diagbot.vo.AddAppealInfoVO;
 import com.diagbot.vo.CancelAppealInfoVO;
 import com.diagbot.vo.GetAppealInfoVO;
 import com.diagbot.vo.GetAppealOperationTypeVO;
+import com.diagbot.vo.GetReviewerApiVO;
 import com.diagbot.vo.GetReviewerVO;
 import com.diagbot.vo.MedAppealInfoVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -63,7 +68,7 @@ public class MedAppealInfoController {
     @Transactional
     public RespDTO<Boolean> addAppealInfo(@RequestBody @Valid AddAppealInfoVO addAppealInfoVO) {
         addAppealInfoVO.setHospitalId(Long.parseLong(SysUserUtils.getCurrentHospitalID()));
-        addAppealInfoVO.setClaimantId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
+        addAppealInfoVO.setClaimantId(SysUserUtils.getCurrentPrincipleID());
         //获取操作流节点
         String mapping = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()),"work_flow_node_mapping");
         if(StringUtil.isNotEmpty(mapping)){
@@ -72,11 +77,42 @@ public class MedAppealInfoController {
         }
         return medAppealInfoServiceClient.addAppealInfo(addAppealInfoVO);
     }
+
+    @ApiOperation(value = "申诉-对外api接口[by:songxl]",
+            notes = "申诉")
+    @PostMapping("/addAppealInfoApi")
+    @Transactional
+    public RespDTO<Boolean> addAppealInfoApi(@RequestBody @Valid AddAppealInfoApiVO addAppealInfoApiVO) {
+        //获取操作流节点
+        String mapping = sysHospitalSetFacade.getValue(addAppealInfoApiVO.getHospitalId(),"work_flow_node_mapping");
+        AddAppealInfoVO addAppealInfoVO = new AddAppealInfoVO();
+        BeanUtils.copyProperties(addAppealInfoApiVO,addAppealInfoVO);
+        if(StringUtil.isNotEmpty(mapping)){
+            JSONObject mapJSON = JSONObject.parseObject(mapping);
+            addAppealInfoVO.setWorkFlowNodeId(mapJSON.getLong("addAppealInfo"));
+        }
+        return medAppealInfoServiceClient.addAppealInfo(addAppealInfoVO);
+    }
+
+    @ApiOperation(value = "获取审核人-对外api接口[by:songxl]",
+            notes = "获取审核人")
+    @PostMapping("/getReviewerApi")
+    public RespDTO<List<GetReviewerDTO>> getReviewerApi(@RequestBody GetReviewerApiVO getReviewerApiVO) {
+        //申诉人是否包含自身开关
+        String flag = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()),"self_flag");
+        GetReviewerVO getReviewerVO = new GetReviewerVO();
+        BeanUtils.copyProperties(getReviewerApiVO,getReviewerVO);
+        if(StringUtils.isNotEmpty(flag)){
+            getReviewerVO.setSelfFlag(Boolean.parseBoolean(flag));
+        }
+        return medAppealInfoServiceClient.getReviewer(getReviewerVO);
+    }
+
     @ApiOperation(value = "获取审核人[by:songxl]",
             notes = "获取审核人")
     @PostMapping("/getReviewer")
     public RespDTO<List<GetReviewerDTO>> getReviewer(@RequestBody GetReviewerVO getReviewerVO) {
-        getReviewerVO.setClaimantId(Long.parseLong(SysUserUtils.getCurrentPrincipleID()));
+        getReviewerVO.setClaimantId(SysUserUtils.getCurrentPrincipleID());
         //申诉人是否包含自身开关
         String flag = sysHospitalSetFacade.getValue(Long.parseLong(SysUserUtils.getCurrentHospitalID()),"self_flag");
         if(StringUtils.isNotEmpty(flag)){

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

@@ -183,4 +183,5 @@ initmodeid:
 log_switch:
   enable: true
 
-appeal.address: http://192.168.2.237:8871
+appeal.address: http://192.168.2.237:8871
+currenthospitalid: 35

+ 2 - 1
src/main/resources/application-local.yml

@@ -183,4 +183,5 @@ initmodeid:
 log_switch:
   enable: true
 
-appeal.address: http://192.168.2.237:8871
+appeal.address: http://192.168.2.237:8871
+currenthospitalid: 35