Bläddra i källkod

Merge remote-tracking branch 'origin/dev/20200810_1.4.1' into debug

zhaops 4 år sedan
förälder
incheckning
f72293c6a7

+ 12 - 0
doc/020.20200805v1.4.0/qc_initv1.4.0.sql

@@ -0,0 +1,12 @@
+use `qc`;
+
+-- 默认列设置
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'behospitalCode';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'mrTime';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'chTime';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'sex';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'age';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'bedCode';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'placefileDate';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'behDoctorName';
+UPDATE sys_user_pageset SET `status` = 0 WHERE user_id =- 1 AND val = 'directorDoctorName';

+ 2 - 2
src/main/java/com/diagbot/dto/ReBeHosDetailDTO.java

@@ -60,10 +60,10 @@ public class ReBeHosDetailDTO {
      * 住院天数
      */
     @Excel(name = "住院天数", width = 15, orderNum = "8")
-    private Integer behospitalDayNum;
+    private String behospitalDayNum;
     /**
      * 住院费用
      */
     @Excel(name = "住院费用", width = 15, orderNum = "9")
-    private Double totleFee;
+    private String totleFee;
 }

+ 4 - 4
src/main/java/com/diagbot/dto/ReBeHosMergeDTO.java

@@ -37,8 +37,8 @@ public class ReBeHosMergeDTO {
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date lastLeaveHospitalDate;
     private Integer diffDays;
-    private Double totleFee;
-    private Integer behospitalDayNum;
-    private Double lastTotleFee;
-    private Integer lastBehospitalDayNum;
+    private String totleFee;
+    private String behospitalDayNum;
+    private String lastTotleFee;
+    private String lastBehospitalDayNum;
 }

+ 5 - 5
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -225,13 +225,13 @@ public class ConsoleExportFacade {
         qcResultShortPageVO.setHospitalId(hospitalId);
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
-        //时间间隔7
-        long interval = 7 * 24 * 60 * 60 * 1000;
+        //时间间隔90
+        long interval = 90 * 24 * 60 * 60 * 1000;
         if (endDate.getTime() < startDate.getTime()) {
             throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
         }
         if (endDate.getTime() - startDate.getTime() > interval) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
         }
 
         qcResultShortPageVO.setCurrent(1L);
@@ -294,12 +294,12 @@ public class ConsoleExportFacade {
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
         //时间间隔7天
-        long interval = 7 * 24 * 60 * 60 * 1000;
+        long interval = 90 * 24 * 60 * 60 * 1000;
         if (endDate.getTime() < startDate.getTime()) {
             throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
         }
         if (endDate.getTime() - startDate.getTime() > interval) {
-            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
+            throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
         }
 
         qcResultShortPageVO.setCurrent(1L);

+ 7 - 0
src/main/java/com/diagbot/util/ExcelUtils.java

@@ -45,6 +45,13 @@ public class ExcelUtils {
         userExport(list, pojoClass, fileName, response, exportParams);
     }
 
+    public static void exportXSSFExcelUser(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName,
+                                       HttpServletResponse response) {
+        ExportParams exportParams = new ExportParams(title, sheetName, ExcelType.XSSF);
+        exportParams.setStyle(ExcelExportStylerUserImpl.class);
+        userExport(list, pojoClass, fileName, response, exportParams);
+    }
+
     public static void exportExcelDynamicCol(List<ExcelExportEntity> entityList, Collection<?> dataSet, String title, String sheetName, String fileName,
                                     HttpServletResponse response) {
         ExportParams exportParams = new ExportParams(title, sheetName);

+ 27 - 3
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -6116,6 +6116,9 @@
         AND t.behospitalCode = qd.behospital_code
         LEFT JOIN qc_cases qc ON qc.is_deleted = 'N'
         AND qd.cases_id = qc.id
+        LEFT JOIN qc_cases_entry qce ON qce.is_deleted = 'N'
+        AND qd.cases_id = qce.cases_id
+        AND qd.cases_entry_id = qce.id
         where 1=1
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
@@ -6141,6 +6144,18 @@
         <if test="qcResultShortPageVO.mrTimeEnd != null ">
             <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
         </if>
+        <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
+            AND qce.NAME = #{qcResultShortPageVO.casesEntryName}
+        </if>
+        <if test="qcResultShortPageVO.casesEntryId != null ">
+            AND qce.id = #{qcResultShortPageVO.casesEntryId}
+        </if>
+        <if test="qcResultShortPageVO.casesName != null and qcResultShortPageVO.casesName != ''">
+            AND qce.cases_name = #{qcResultShortPageVO.casesName}
+        </if>
+        <if test="qcResultShortPageVO.casesId != null">
+            AND qce.cases_id = #{qcResultShortPageVO.casesId}
+        </if>
         )f1,
         (SELECT
         ROUND( AVG( qi.score_res ), 2 ) AS avgScore,
@@ -6800,9 +6815,6 @@
         <if test="qcResultShortPageVO.patName != null and qcResultShortPageVO.patName != ''">
             AND a.NAME LIKE CONCAT( '%', #{qcResultShortPageVO.patName}, '%' )
         </if>
-        <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
-            AND d.NAME = #{qcResultShortPageVO.casesEntryName}
-        </if>
         <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
             AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
             OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
@@ -6813,6 +6825,9 @@
             OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
             OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
         </if>
+        <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
+            AND d.NAME = #{qcResultShortPageVO.casesEntryName}
+        </if>
         <if test="qcResultShortPageVO.casesEntryId != null ">
             AND d.id = #{qcResultShortPageVO.casesEntryId}
         </if>
@@ -6846,6 +6861,9 @@
         AND t.behospitalCode = qd.behospital_code
         LEFT JOIN qc_cases qc ON qc.is_deleted = 'N'
         AND qd.cases_id = qc.id
+        LEFT JOIN qc_cases_entry qce ON qce.is_deleted = 'N'
+        AND qd.cases_id = qce.cases_id
+        AND qd.cases_entry_id = qce.id
         where 1=1
         <if test="qcResultShortPageVO.checkStatus != null">
             AND t.checkStatus = #{qcResultShortPageVO.checkStatus}
@@ -6871,6 +6889,12 @@
         <if test="qcResultShortPageVO.mrTimeEnd != null ">
             <![CDATA[ AND t.mrTime <= #{qcResultShortPageVO.mrTimeEnd}]]>
         </if>
+        <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
+            AND qce.NAME = #{qcResultShortPageVO.casesEntryName}
+        </if>
+        <if test="qcResultShortPageVO.casesEntryId != null ">
+            AND qce.id = #{qcResultShortPageVO.casesEntryId}
+        </if>
         )f1,
         (SELECT
         ROUND( AVG( qi.score_res ), 2 ) AS avgScore,