Ver código fonte

Merge branch 'dev/20210120_2.0.1' into debug

chengyao 4 anos atrás
pai
commit
9e17b49353

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

@@ -47,7 +47,7 @@ public class QualityControlDTO {
     /**
      * 科室名称
      */
-    @Excel(name = "科室名称", width = 16, orderNum = "4")
+    @Excel(name = "科室名称", width = 16, orderNum = "4",mergeVertical = true)
     private String deptName;
 
     /**
@@ -59,7 +59,7 @@ public class QualityControlDTO {
     /**
      * 出院时间
      */
-    @Excel(name = "出院日期", width = 25, orderNum = "5")
+    @Excel(name = "出院日期", width = 25, orderNum = "5", exportFormat = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date leaveHospitalDate;
 

+ 0 - 24
src/main/java/com/diagbot/dto/QualityExportExcelDTO.java

@@ -1,24 +0,0 @@
-package com.diagbot.dto;
-
-import cn.afterturn.easypoi.excel.annotation.Excel;
-import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.util.List;
-
-/**
- * @Description:
- * @author: gaodm
- * @time: 2020/6/2 19:00
- */
-@Getter
-@Setter
-public class QualityExportExcelDTO {
-    @Excel(name = "科室", needMerge = true,orderNum ="4")
-    private String behDeptName;
-    @ExcelCollection(name = "")
-    private List<QualityBehospitalExportDTO> excelBehospitalDTOS;
-
-
-}

+ 11 - 1
src/main/java/com/diagbot/facade/ConsoleByDeptExportFacade.java

@@ -387,9 +387,19 @@ public class ConsoleByDeptExportFacade {
         behospitalPageVO.setCurrent(1L);
         behospitalPageVO.setSize(Long.MAX_VALUE);
         behospitalPageVO.setSearchCount(false);
+        Date startDate = behospitalPageVO.getLeaveHosDateStart();
+        Date endDate = behospitalPageVO.getLeaveHosDateEnd();
+        //时间间隔30天
+        long interval = 30 * 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, "统计区间不能大于30天");
+        }
         String  fileName = "病历质控报表科室详情.xls";
         IPage<QualityControlDTO> records = consoleByDeptFacade.qualityControlByDept(behospitalPageVO);
-        ExcelUtils.exportExcel(records.getRecords(), null, "sheet1", QualityControlDTO.class, fileName, response, 15.8f);
+        ExcelUtils.exportExcel(records.getRecords(), null, "sheet1", QualityControlDTO.class, fileName, response, 26.8f);
     }
 
 

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

@@ -611,20 +611,20 @@ public class ConsoleExportFacade {
 
     Date startDate = behospitalPageVO.getLeaveHosDateStart();
     Date endDate = behospitalPageVO.getLeaveHosDateEnd();
-    //时间间隔7
-//    long interval = 90 * 24l * 60l * 60l * 1000l;
+    //时间间隔30
+    long interval = 30 * 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, "统计区间不能大于90天");
-//    }
+        if (endDate.getTime() - startDate.getTime() > interval) {
+        throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于30天");
+    }
 
         behospitalPageVO.setCurrent(1L);
         behospitalPageVO.setSize(Long.MAX_VALUE);
         behospitalPageVO.setSearchCount(false);
         IPage<QualityControlDTO> records = consoleFacade.getQualityControl(behospitalPageVO);
         String fileName = "病历质控报表详情页.xls";
-        ExcelUtils.exportExcelUser(records.getRecords(), null, "sheet1", QualityControlDTO.class, fileName, response);
+        ExcelUtils.exportExcel(records.getRecords(), null, "sheet1", QualityControlDTO.class, fileName, response, 26.8f);
     }
 }

+ 4 - 4
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -449,10 +449,10 @@
         and t.qc_type_id != 0) p
         where p.is_deleted="N"
         <if test="chName != null and chName !=''">
-            AND p.ch_name like CONCAT('%',#{chName},'%')
+            AND p.chName like CONCAT('%',#{chName},'%')
         </if>
         <if test="mrName != null and mrName !=''">
-            AND p.mr_name like CONCAT('%',#{mrName},'%')
+            AND p.mrName like CONCAT('%',#{mrName},'%')
         </if>
     </select>
 
@@ -536,10 +536,10 @@
         and t.qc_type_id != 0) p
         where p.is_deleted="N"
         <if test="chName != null and chName !=''">
-            AND p.ch_name like CONCAT('%',#{chName},'%')
+            AND p.chName like CONCAT('%',#{chName},'%')
         </if>
         <if test="mrName != null and mrName !=''">
-            AND p.mr_name like CONCAT('%',#{mrName},'%')
+            AND p.mrName like CONCAT('%',#{mrName},'%')
         </if>
     </select>
    <!-- <select id="getQualityControl" resultType="com.diagbot.dto.QualityControlDTO">