Browse Source

Merge branch '20220510_v2.7.0通用版_申诉审核列表新增' into develop

songxinlu 3 years ago
parent
commit
056c44035f

+ 3 - 0
report-service/src/main/java/com/lantone/report/dto/GetAppealReviewDTO.java

@@ -42,6 +42,9 @@ public class GetAppealReviewDTO {
     @ApiModelProperty(value = "条目ID")
     private String casesEntryId;
 
+    @ApiModelProperty(value = "病案号")
+    private String fileCode;
+
     @ApiModelProperty(value = "患者姓名")
     private String name;
 

+ 6 - 0
report-service/src/main/java/com/lantone/report/entity/AppealInfo.java

@@ -117,6 +117,12 @@ public class AppealInfo implements Serializable {
     @TableField("claimant_id")
     private String claimantId;
 
+    /**
+     * 申述人姓名
+     */
+    @TableField("claimant_name")
+    private String claimantName;
+
     /**
      * 申诉类型(0:医生申诉|1:质控申诉)
      */

+ 3 - 0
report-service/src/main/java/com/lantone/report/vo/AddAppealInfoVO.java

@@ -62,6 +62,9 @@ public class AddAppealInfoVO {
     @ApiModelProperty(value = "申诉人id", hidden = true)
     private String claimantId;
 
+    @ApiModelProperty(value = "申诉人姓名")
+    private String claimantName;
+
     @ApiModelProperty(value = "申诉类型(0:医生申诉|1:质控申诉)", required = true)
     @NotBlank(message = "申诉类型不能为空")
     private String appealType;

+ 6 - 0
report-service/src/main/java/com/lantone/report/vo/GetAppealReviewVO.java

@@ -52,4 +52,10 @@ public class GetAppealReviewVO extends Page implements Serializable {
     @ApiModelProperty(value = "是否已归档(0:未归档,1:已归档)")
     private String isPlacefile;
 
+    @ApiModelProperty(value = "病案号")
+    private String fileCode;
+
+    @ApiModelProperty(value = "患者姓名")
+    private String patientName;
+
 }

+ 14 - 10
report-service/src/main/resources/mapper/AppealExamineInfoMapper.xml

@@ -6,9 +6,7 @@
     <select id="getComplaintRecord" resultType="com.lantone.report.dto.GetComplaintRecordDTO">
         SELECT
         a.*,
-        CASE WHEN b.linkman IS NULL
-        THEN doctor.`name`
-        ELSE b.linkman END AS claimant_name,
+        a.claimant_name claimantName,
         c.linkman AS check_name
         FROM
         (
@@ -29,6 +27,7 @@
         a.mode_name,
         a.defect_content,
         a.claimant_id,
+        a.claimant_name,
         a.check_id,
         a.gmt_create AS claimant_gmt_create,
         b.`name`,
@@ -112,7 +111,6 @@
             <![CDATA[ AND c.example_status = #{getComplaintRecordVO.state}]]>
         </if>
         ) a
-        LEFT JOIN sys_user b ON a.claimant_id = b.id AND b.is_deleted='N'
         LEFT JOIN sys_user c ON a.check_id = c.id AND c.is_deleted='N'
         LEFT JOIN bas_doctor_info doctor ON doctor.doctor_id = a.claimant_id AND a.hospital_id = doctor.hospital_id AND doctor.is_deleted='N'
         WHERE
@@ -124,9 +122,8 @@
 
     <select id="getAppealReview" resultType="com.lantone.report.dto.GetAppealReviewDTO">
         SELECT
-        a.*, CASE WHEN b.linkman IS NULL
-        THEN doctor.`name`
-        ELSE b.linkman END AS claimant_name,
+        a.*,
+        a.claimant_name claimantName,
         c.linkman AS check_name
         FROM
         (
@@ -146,11 +143,13 @@
         a.mode_name,
         a.defect_content,
         a.claimant_id,
+        a.claimant_name,
         a.check_id,
         a.gmt_create AS claimant_gmt_create,
         b.`name`,
         b.beh_dept_name,
-        a.appeal_operation_type
+        a.appeal_operation_type,
+        b.file_code fileCode
         FROM
         (
         SELECT
@@ -213,6 +212,12 @@
         <if test="getAppealReviewVO.deptName != null and getAppealReviewVO.deptName != '' ">
             <![CDATA[ AND b.beh_dept_name = #{getAppealReviewVO.deptName}]]>
         </if>
+        <if test="getAppealReviewVO.patientName != null and getAppealReviewVO.patientName != '' ">
+            <![CDATA[ AND b.name like concat('%',#{getAppealReviewVO.patientName},'%')]]>
+        </if>
+        <if test="getAppealReviewVO.fileCode != null and getAppealReviewVO.fileCode != '' ">
+            <![CDATA[ AND b.file_code like concat('%',#{getAppealReviewVO.fileCode},'%')]]>
+        </if>
         ) a
         LEFT JOIN med_appeal_examine_info c ON a.id = c.appeal_info_id
         WHERE
@@ -221,12 +226,11 @@
             <![CDATA[ AND c.example_status = #{getAppealReviewVO.state}]]>
         </if>
         ) a
-        LEFT JOIN sys_user b ON a.claimant_id = b.id AND b.is_deleted='N'
         LEFT JOIN sys_user c ON a.check_id = c.id
         LEFT JOIN bas_doctor_info doctor ON doctor.doctor_id = a.claimant_id AND a.hospital_id = doctor.hospital_id AND doctor.is_deleted='N'
         WHERE c.is_deleted='N'
         <if test="getAppealReviewVO.name != null and getAppealReviewVO.name != '' ">
-            <![CDATA[ AND b.linkman like concat('%',#{getAppealReviewVO.name},'%')]]>
+            <![CDATA[ AND a.claimant_name like concat('%',#{getAppealReviewVO.name},'%')]]>
         </if>
     </select>
 

+ 1 - 4
report-service/src/main/resources/mapper/AppealInfoMapper.xml

@@ -66,16 +66,13 @@
             mae.gmt_create appealExamineDate,
             mae.msg,
             mae.`value` score,
-            CASE WHEN u.linkman IS NULL
-            THEN doctor.`name`
-            ELSE u.linkman END claimantName,
+            mai.claimant_name claimantName,
             u2.linkman checkName
         FROM
             med_appeal_info mai
         LEFT JOIN med_appeal_examine_info mae ON mai.id = mae.appeal_info_id
         LEFT JOIN qc_cases_entry qce ON mai.cases_entry_id = qce.id
         AND qce.is_deleted = "N"
-        LEFT JOIN sys_user u ON mai.claimant_id = u.id
         LEFT JOIN sys_user u2 ON mai.check_id = u2.id
         LEFT JOIN bas_doctor_info doctor ON doctor.doctor_id = mai.claimant_id AND mai.hospital_id = doctor.hospital_id AND doctor.is_deleted='N'
         WHERE