Pārlūkot izejas kodu

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

zhaops 4 gadi atpakaļ
vecāks
revīzija
611e97e8c7

+ 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 = 90l * 24l * 60l * 60l * 1000l;
         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 = 90l * 24l * 60l * 60l * 1000l;
         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,