Browse Source

质控评分页面加入是否为日间病历条件入参及返参

zhanghang 3 years ago
parent
commit
e3c142919d

+ 4 - 0
src/main/java/com/diagbot/dto/BehospitalInfoDTO.java

@@ -2,6 +2,7 @@ package com.diagbot.dto;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -152,4 +153,7 @@ public class BehospitalInfoDTO implements Serializable {
     private Date chTime;
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date mrTime;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

+ 4 - 0
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -2,6 +2,7 @@ package com.diagbot.dto;
 
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -121,4 +122,7 @@ public class QcResultShortDTO {
      */
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date mrTime;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

+ 5 - 0
src/main/java/com/diagbot/entity/BehospitalInfo.java

@@ -163,6 +163,11 @@ public class BehospitalInfo implements Serializable {
      */
     private String inState;
 
+    /**
+     * 是否日间病例,1:是,0:否
+     */
+    private String isDaytime;
+
     /**
      * 是否删除,N:未删除,Y:删除
      */

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

@@ -109,6 +109,9 @@ public class BehospitalPageVO extends Page implements Serializable {
     private Date mrTimeStart;
     private Date mrTimeEnd;
 
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
+
     @ApiModelProperty("页面类型 1:评分详情页|2:核查详情页|3:申诉详情页")
     private String pageType = "1";
 

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

@@ -112,4 +112,7 @@ public class GetEntryDefectImproveInnerVO extends Page {
      * 0-不导出 1-导出
      */
     private Long exportType = 0L;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

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

@@ -151,4 +151,7 @@ public class QcResultPageVO extends Page {
      * 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)
      */
     private Integer improveType;
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

+ 4 - 0
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -147,4 +147,8 @@ public class QcResultShortPageVO extends Page {
      * 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)
      */
     private Integer improveType;
+
+
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

+ 2 - 0
src/main/java/com/diagbot/vo/QcResultShortXYPageVO.java

@@ -152,4 +152,6 @@ public class QcResultShortXYPageVO extends Page {
      * 改善标志(1:病案首页改善病历,2:病案首页改善至合格病历,3:病案首页改善至满分病历)
      */
     private Integer improveType;
+    @ApiModelProperty("是否日间病例,1:是,0:否")
+    private String isDaytime;
 }

+ 99 - 20
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -34,6 +34,7 @@
         <result column="placefile_date" property="placefileDate"/>
         <result column="in_state" property="inState"/>
         <result column="is_deleted" property="isDeleted"/>
+        <result column="is_daytime" property="isDaytime"/>
         <result column="gmt_create" property="gmtCreate"/>
         <result column="gmt_modified" property="gmtModified"/>
         <result column="creator" property="creator"/>
@@ -71,6 +72,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         where t.is_deleted = 'N'
+        <if test="isDaytime != null and isDaytime != ''">
+            AND t.is_daytime = #{isDaytime}
+        </if>
         <if test="diagnose != null and diagnose != ''">
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
@@ -1184,6 +1188,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         where t.is_deleted = 'N'
+        <if test="isDaytime != null and isDaytime != ''">
+            and t.is_daytime = #{isDaytime}
+        </if>
         <if test="diagnose != null and diagnose != ''">
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
@@ -1316,6 +1323,9 @@
         ON t.behospital_code = h.behospital_code
         AND t.hospital_id = h.hospital_id
         WHERE t.is_deleted = 'N'
+        <if test="isDaytime != null and isDaytime != ''">
+            and t.is_daytime = #{isDaytime}
+        </if>
         <if test="diagnose != null and diagnose != ''">
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
@@ -1420,6 +1430,9 @@
         and c1.id = #{userId}
         )
         )
+        <if test="isDaytime != null and isDaytime != ''">
+            and t.is_daytime = #{isDaytime}
+        </if>
         <if test="diagnose != null and diagnose != ''">
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
@@ -5546,7 +5559,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (
         SELECT DISTINCT
@@ -5591,7 +5605,8 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        b.gmt_create
+        b.gmt_create,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -5613,6 +5628,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -5823,7 +5841,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (
         SELECT DISTINCT
@@ -5864,6 +5883,7 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
+        a.is_daytime,
         b.gmt_create
         FROM
         med_behospital_info a,
@@ -5882,6 +5902,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -6070,7 +6093,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (
         SELECT DISTINCT
@@ -6110,6 +6134,7 @@
         a.director_doctor_name,
         a.diagnose,
         a.placefile_date,
+        a.is_daytime,
         a.ward_name,
         b.gmt_create
         FROM
@@ -6133,6 +6158,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.userId!=null">
             AND e.user_id = #{qcResultShortPageVO.userId}
         </if>
@@ -7787,7 +7815,8 @@
         t1.chTime,
         t1.mrTime,
         CONCAT( ifnull(t2.age,'') ,ifnull(t2.age_unit,'') )as age,
-        t1.file_code AS fileCode
+        t1.file_code AS fileCode,
+        t1.is_daytime
         FROM
         (
         SELECT be.*,
@@ -7832,12 +7861,16 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        a.file_code
+        a.file_code,
+        a.is_daytime
         FROM
         med_behospital_info a
         WHERE
         a.is_deleted = 'N'
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -12391,7 +12424,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (SELECT
         be.*,
@@ -12428,7 +12462,8 @@
         a.director_doctor_name,
         a.diagnose,
         a.placefile_date,
-        a.ward_name
+        a.ward_name,
+        a.is_daytime
         FROM
         med_behospital_info a,
         sys_user_dept c,
@@ -12443,6 +12478,9 @@
         AND a.behospital_code = e.behospital_code
         AND a.qc_type_id != 0
         AND e.cases_id = 243
+        <if test="isDaytime != null and isDaytime != ''">
+            and a.is_daytime = #{isDaytime}
+        </if>
         <if test="userId!=null">
             AND c.user_id = #{userId}
         </if>
@@ -12589,7 +12627,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (SELECT
         be.*,
@@ -12626,7 +12665,8 @@
         a.director_doctor_name,
         a.diagnose,
         a.placefile_date,
-        a.ward_name
+        a.ward_name,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_cases e
@@ -12637,6 +12677,9 @@
         AND a.behospital_code = e.behospital_code
         AND a.qc_type_id != 0
         AND e.cases_id = 243
+        <if test="qcResultPageVO.isDaytime != null and qcResultPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultPageVO.isDaytime}
+        </if>
         <if test="qcResultPageVO.titleName != null ">
             <if test="qcResultPageVO.titleName == '不合格数'">
                 AND e.`level`='不合格'
@@ -12997,7 +13040,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (SELECT
         be.*,
@@ -13034,7 +13078,8 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        b.gmt_create
+        b.gmt_create,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -13052,6 +13097,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -13196,7 +13244,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (SELECT
         be.*,
@@ -13233,7 +13282,8 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        b.gmt_create
+        b.gmt_create,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_info b,
@@ -13255,6 +13305,9 @@
         AND a.beh_dept_id = f.dept_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.userId!=null">
             AND f.user_id = #{qcResultShortPageVO.userId}
         </if>
@@ -16603,7 +16656,8 @@
         t1.file_code AS fileCode,
         t1.checkStatus,
         t1.chName,
-        t1.chTime
+        t1.chTime,
+        t1.is_daytime
         FROM
         (
         SELECT
@@ -16638,7 +16692,8 @@
         a.placefile_date,
         a.ward_name,
         c.gmt_create,
-        d.score_res as scoreBn
+        d.score_res as scoreBn,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_home_page b,
@@ -16667,6 +16722,9 @@
         AND m3.have_home_page = 1
         AND m4.cases_id = 243
         AND m1.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and m1.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and m1.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -16714,6 +16772,9 @@
         AND d.cases_id = 243
         AND d.score_res > e.score_res
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -16840,7 +16901,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (
         SELECT
@@ -16878,6 +16940,7 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
+        a.is_daytime,
         c.gmt_create
         FROM
         med_behospital_info a,
@@ -16908,6 +16971,9 @@
         AND m3.have_home_page = 1
         AND m4.cases_id = 243
         AND m1.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and m1.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and m1.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -16958,6 +17024,9 @@
         AND d.cases_id = 243
         AND d.score_res > e.score_res
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.userId!=null">
             AND f.user_id = #{qcResultShortPageVO.userId}
         </if>
@@ -17094,7 +17163,8 @@
         t1.file_code AS fileCode,
         t1.checkStatus,
         t1.chName,
-        t1.chTime
+        t1.chTime,
+        t1.is_daytime
         FROM
         (
         SELECT
@@ -17129,7 +17199,8 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
-        b.gmt_create
+        b.gmt_create,
+        a.is_daytime
         FROM
         med_behospital_info a,
         med_qcresult_info b
@@ -17139,6 +17210,9 @@
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
             and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
         </if>
@@ -17267,7 +17341,8 @@
         t1.chName,
         t1.mrName,
         t1.chTime,
-        t1.mrTime
+        t1.mrTime,
+        t1.is_daytime
         FROM
         (
         SELECT
@@ -17305,6 +17380,7 @@
         a.diagnose,
         a.placefile_date,
         a.ward_name,
+        a.is_daytime,
         b.gmt_create
         FROM
         med_behospital_info a,
@@ -17319,6 +17395,9 @@
         AND a.beh_dept_id = c.dept_id
         AND a.behospital_code = b.behospital_code
         AND a.qc_type_id != 0
+        <if test="qcResultShortPageVO.isDaytime != null and qcResultShortPageVO.isDaytime != ''">
+            and a.is_daytime = #{qcResultShortPageVO.isDaytime}
+        </if>
         <if test="qcResultShortPageVO.userId!=null">
             AND c.user_id = #{qcResultShortPageVO.userId}
         </if>

+ 4 - 0
src/main/resources/mapper/MedClickInfoMapper.xml

@@ -231,6 +231,7 @@
         b.file_code AS fileCode,
         b.behospital_code as behospitalCode,
         b.name,
+        b.is_daytime,
         b.behospital_date AS behospitalDate,
         b.leave_hospital_date AS leaveHospitalDate,
         b.doctor_id AS doctorId,
@@ -251,6 +252,9 @@
         AND a.hospital_id =c.hospital_id
         AND a.behospital_code =b.behospital_code
         AND a.behospital_code =c.behospital_code
+        <if test="isDaytime != null and isDaytime != ''">
+            and b.is_daytime = #{isDaytime}
+        </if>
         <if test="hospitalId != null and hospitalId != ''">
             AND b.hospital_id = #{hospitalId}
         </if>