Ver código fonte

Merge remote-tracking branch 'origin/dev/20220105_2.2.0_通用版_申诉驳回' into dev/20220105_2.2.0_通用版_申诉驳回

zhanghang 3 anos atrás
pai
commit
f5096169d5

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

@@ -78,4 +78,7 @@ public class MsgDTO {
 
     @ApiModelProperty(value = "审核时间")
     private Date exampleDate;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
 }

+ 17 - 110
src/main/java/com/diagbot/entity/MedAppealExamineInfo.java

@@ -1,7 +1,12 @@
 package com.diagbot.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.io.Serializable;
 
@@ -13,6 +18,8 @@ import java.io.Serializable;
  * @author zhanghang
  * @since 2022-01-20
  */
+@Getter
+@Setter
 public class MedAppealExamineInfo implements Serializable {
 
     private static final long serialVersionUID = 1L;
@@ -43,6 +50,11 @@ public class MedAppealExamineInfo implements Serializable {
      */
     private String exampleOperation;
 
+    /**
+     * 审核分值
+     */
+    private BigDecimal value;
+
     /**
      * 处理结果
      */
@@ -53,6 +65,11 @@ public class MedAppealExamineInfo implements Serializable {
      */
     private String rejectReason;
 
+    /**
+     * 提示信息
+     */
+    private String msg;
+
     /**
      * 是否删除,N:未删除,Y:删除
      */
@@ -83,114 +100,4 @@ public class MedAppealExamineInfo implements Serializable {
      */
     private String remark;
 
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-    public Long getAppealInfoId() {
-        return appealInfoId;
-    }
-
-    public void setAppealInfoId(Long appealInfoId) {
-        this.appealInfoId = appealInfoId;
-    }
-    public Long getCheckId() {
-        return checkId;
-    }
-
-    public void setCheckId(Long checkId) {
-        this.checkId = checkId;
-    }
-    public String getExampleStatus() {
-        return exampleStatus;
-    }
-
-    public void setExampleStatus(String exampleStatus) {
-        this.exampleStatus = exampleStatus;
-    }
-    public String getExampleOperation() {
-        return exampleOperation;
-    }
-
-    public void setExampleOperation(String exampleOperation) {
-        this.exampleOperation = exampleOperation;
-    }
-    public String getProcessResult() {
-        return processResult;
-    }
-
-    public void setProcessResult(String processResult) {
-        this.processResult = processResult;
-    }
-    public String getRejectReason() {
-        return rejectReason;
-    }
-
-    public void setRejectReason(String rejectReason) {
-        this.rejectReason = rejectReason;
-    }
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-    public LocalDateTime getGmtCreate() {
-        return gmtCreate;
-    }
-
-    public void setGmtCreate(LocalDateTime gmtCreate) {
-        this.gmtCreate = gmtCreate;
-    }
-    public LocalDateTime getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(LocalDateTime gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String toString() {
-        return "MedAppealExamineInfo{" +
-            "id=" + id +
-            ", appealInfoId=" + appealInfoId +
-            ", checkId=" + checkId +
-            ", exampleStatus=" + exampleStatus +
-            ", exampleOperation=" + exampleOperation +
-            ", processResult=" + processResult +
-            ", rejectReason=" + rejectReason +
-            ", isDeleted=" + isDeleted +
-            ", gmtCreate=" + gmtCreate +
-            ", gmtModified=" + gmtModified +
-            ", creator=" + creator +
-            ", modifier=" + modifier +
-            ", remark=" + remark +
-        "}";
-    }
 }

+ 8 - 0
src/main/java/com/diagbot/facade/MedAppealExamineInfoManagementFacade.java

@@ -98,6 +98,8 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
                 MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
                 medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.UP_OR_DEL.getKey());
                 medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+                medAppealExamineInfo.setMsg(qcresultVO.getOptResultAlgVO().getMsg());
+                medAppealExamineInfo.setValue(qcresultVO.getOptResultAlgVO().getScore());
                 medAppealExamineInfo.setGmtCreate(dateTime);
                 medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
                 boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
@@ -129,6 +131,8 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
                 MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
                 medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.UP_OR_UP.getKey());
                 medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
+                medAppealExamineInfo.setMsg(qcresultVO.getOptResultAlgVO().getMsg());
+                medAppealExamineInfo.setValue(qcresultVO.getOptResultAlgVO().getScore());
                 medAppealExamineInfo.setGmtCreate(dateTime);
                 medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
                 boolean update = this.update(medAppealExamineInfo, new UpdateWrapper<MedAppealExamineInfo>()
@@ -168,6 +172,8 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
                 );
                 MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
                 medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.ADD_EXIST.getKey());
+                medAppealExamineInfo.setValue(qcresultVO.getOptResultAlgVO().getScore());
+                medAppealExamineInfo.setMsg(qcresultVO.getOptResultAlgVO().getMsg());
                 medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
                 medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
                 medAppealExamineInfo.setGmtCreate(dateTime);
@@ -212,6 +218,8 @@ public class MedAppealExamineInfoManagementFacade extends MedAppealExamineInfoSe
                     Boolean appealInfo = updateAppealInfo(approvedVo);
                     MedAppealExamineInfo medAppealExamineInfo = new MedAppealExamineInfo();
                     medAppealExamineInfo.setExampleOperation(ExampleOperationEnum.RECOVER.getKey());
+                    medAppealExamineInfo.setValue(qcresultVO.getOptResultAlgVO().getScore());
+                    medAppealExamineInfo.setMsg(qcresultVO.getOptResultAlgVO().getMsg());
                     medAppealExamineInfo.setExampleStatus(ExampleStatusEnum.ADOPT_EXAMPLE.getKey());
                     medAppealExamineInfo.setRemark(qcResultAlgVO.getExplainInfo());
                     medAppealExamineInfo.setGmtCreate(dateTime);

+ 0 - 1
src/main/java/com/diagbot/facade/QcresultInfoFacade.java

@@ -335,7 +335,6 @@ public class QcresultInfoFacade extends QcresultInfoServiceImpl {
                             .set("opt_type", 1)
                             .set("qcresult_info_id", newId)
                             .set("modifier", useId)
-                            .set("remark", null)
                             .set("gmt_modified", now)
                     );
                 } else {

+ 14 - 5
src/main/java/com/diagbot/facade/SysUserFacade.java

@@ -143,8 +143,9 @@ public class SysUserFacade extends SysUserServiceImpl {
 
     /**
      * 获取jwt
-     *
+     * <p>
      * userLoginVO
+     *
      * @return jwt
      */
     public JwtDTO getJwt(HttpServletRequest request, UserLoginVO userLoginVO) {
@@ -158,9 +159,9 @@ public class SysUserFacade extends SysUserServiceImpl {
                     "请输入密码");
         }
         //非湘雅医院执行
-        String captchaId ="";
-        if(0L == getHospitalMark()) {
-            if ( StringUtils.isEmpty(userLoginVO.getCaptcha())) {
+        String captchaId = "";
+        if (0L == getHospitalMark()) {
+            if (StringUtils.isEmpty(userLoginVO.getCaptcha())) {
                 throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
                         "请输入验证码");
             }
@@ -191,7 +192,7 @@ public class SysUserFacade extends SysUserServiceImpl {
         if (null == jwt) {
             throw new CommonException(ServiceErrorCode.GET_TOKEN_FAIL);
         }
-        if(0L == getHospitalMark()) {
+        if (0L == getHospitalMark()) {
             redisUtils.del("user:captchaIds:" + captchaId);
         }
         data.setAccessToken(jwt.getAccess_token());
@@ -779,6 +780,14 @@ public class SysUserFacade extends SysUserServiceImpl {
             throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "该医院下无该用户");
         }
     }
+
+    public Long getUserId(String claimantId, Long hospitalId) {
+        SysUser user = this.getBaseMapper().getUser(claimantId, hospitalId);
+        if (user != null && user.getId() != null) {
+            return user.getId();
+        }
+        return null;
+    }
     //-------------用户维护END---------------------------
 
 }

+ 3 - 0
src/main/java/com/diagbot/mapper/SysUserMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.SysUserQueryDTO;
 import com.diagbot.entity.SysUser;
 import com.diagbot.vo.SysUserQueryVO;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -16,4 +17,6 @@ import com.diagbot.vo.SysUserQueryVO;
  */
 public interface SysUserMapper extends BaseMapper<SysUser> {
     IPage<SysUserQueryDTO> userPage(SysUserQueryVO sysUserQueryVO);
+
+    SysUser getUser(@Param("claimantId") String claimantId, @Param("hospitalId") Long hospitalId);
 }

+ 16 - 7
src/main/java/com/diagbot/web/MedAppealInfoController.java

@@ -8,6 +8,7 @@ import com.diagbot.dto.*;
 import com.diagbot.entity.SysUserRole;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.facade.SysHospitalSetFacade;
+import com.diagbot.facade.SysUserFacade;
 import com.diagbot.facade.SysUserRoleFacade;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.SysUserUtils;
@@ -52,6 +53,9 @@ public class MedAppealInfoController {
     @Autowired
     SysUserRoleFacade sysUserRoleFacade;
 
+    @Autowired
+    SysUserFacade sysUserFacade;
+
     @ApiOperation(value = "申诉[by:songxl]",
             notes = "申诉")
     @PostMapping("/addAppealInfo")
@@ -77,6 +81,11 @@ public class MedAppealInfoController {
         String mapping = sysHospitalSetFacade.getValue(addAppealInfoApiVO.getHospitalId(), "work_flow_node_mapping");
         AddAppealInfoVO addAppealInfoVO = new AddAppealInfoVO();
         BeanUtils.copyProperties(addAppealInfoApiVO, addAppealInfoVO);
+        //通过医生id获取医生的用户id
+        Long userId = sysUserFacade.getUserId(addAppealInfoApiVO.getClaimantId(), addAppealInfoApiVO.getHospitalId());
+        if (userId != null) {
+            addAppealInfoApiVO.setClaimantId(userId+"");
+        }
         if (StringUtil.isNotEmpty(mapping)) {
             JSONObject mapJSON = JSONObject.parseObject(mapping);
             addAppealInfoVO.setWorkFlowNodeId(mapJSON.getLong("addAppealInfo"));
@@ -124,10 +133,10 @@ public class MedAppealInfoController {
     @Transactional
     public RespDTO<Boolean> cancelAppealInfoApi(@RequestBody @Valid CancelAppealInfoApiVO cancelAppealInfoApiVO) {
         //获取操作流节点
-        String mapping = sysHospitalSetFacade.getValue(cancelAppealInfoApiVO.getHospitalId(),"work_flow_node_mapping");
+        String mapping = sysHospitalSetFacade.getValue(cancelAppealInfoApiVO.getHospitalId(), "work_flow_node_mapping");
         CancelAppealInfoVO cancelAppealInfoVO = new CancelAppealInfoVO();
-        BeanUtils.copyProperties(cancelAppealInfoApiVO,cancelAppealInfoVO);
-        if(StringUtil.isNotEmpty(mapping)){
+        BeanUtils.copyProperties(cancelAppealInfoApiVO, cancelAppealInfoVO);
+        if (StringUtil.isNotEmpty(mapping)) {
             JSONObject mapJSON = JSONObject.parseObject(mapping);
             cancelAppealInfoVO.setWorkFlowNodeId(mapJSON.getLong("cancelAppealInfo"));
         }
@@ -162,10 +171,10 @@ public class MedAppealInfoController {
         String currentPrincipleID = SysUserUtils.getCurrentPrincipleID();
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         getAppealDeptVo.setHospitalId(Long.valueOf(hospitalId));
-        if(Long.valueOf(getAppealDeptVo.getPageType())==1){
+        if (Long.valueOf(getAppealDeptVo.getPageType()) == 1) {
             //申诉人
             getAppealDeptVo.setClaimantId(Long.valueOf(currentPrincipleID));
-        }else {
+        } else {
             //审核人
             getAppealDeptVo.setCheckId(Long.valueOf(currentPrincipleID));
         }
@@ -179,10 +188,10 @@ public class MedAppealInfoController {
         String currentPrincipleID = SysUserUtils.getCurrentPrincipleID();
         String hospitalId = SysUserUtils.getCurrentHospitalID();
         getAppealModeVo.setHospitalId(Long.valueOf(hospitalId));
-        if(Long.valueOf(getAppealModeVo.getPageType())==1){
+        if (Long.valueOf(getAppealModeVo.getPageType()) == 1) {
             //申诉人
             getAppealModeVo.setClaimantId(Long.valueOf(currentPrincipleID));
-        }else {
+        } else {
             //审核人
             getAppealModeVo.setCheckId(Long.valueOf(currentPrincipleID));
         }

+ 1 - 0
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -707,6 +707,7 @@
         c.gmt_modified,
         c.modifier,
         c.is_deleted,
+        c.remark,
         c.explain_info AS explainInfo,
         a.type,
         a.drgs,

+ 14 - 0
src/main/resources/mapper/SysUserMapper.xml

@@ -126,4 +126,18 @@
             and t3.linkman like CONCAT('%',#{linkman},'%')
         </if>
     </select>
+
+    <select id="getUser" resultType="com.diagbot.entity.SysUser">
+        SELECT
+        *
+    FROM
+        sys_user u,
+        sys_user_hospital uh
+    WHERE
+        u.is_deleted = "N"
+    AND uh.is_deleted = "N"
+    AND u.id = uh.user_id
+    AND u.username = #{claimantId}
+    AND uh.hospital_id = #{hospitalId}
+    </select>
 </mapper>