瀏覽代碼

脚本添加

chengyao 4 年之前
父節點
當前提交
f1f3d1b0ec

+ 2 - 0
doc/028.20201210v1.4.9/qc_initv1.4.9.sql

@@ -21,3 +21,5 @@ CREATE TABLE `med_nurse` (
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 SET FOREIGN_KEY_CHECKS = 1;
+
+INSERT INTO `qc_mode`( `name`, `order_no`, `parent_id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `remark`) VALUES ( '护理信息', 259, 37, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', NULL);

+ 10 - 32
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -229,44 +229,22 @@ public class ConsoleExportFacade {
         }
         Date startDate = qcResultShortPageVO.getStartDate();
         Date endDate = qcResultShortPageVO.getEndDate();
-        //时间间隔7天
-        long interval_7 = 7 * 24 * 60 * 60 * 1000;
-        long interval_90 = 90l * 24 * 60 * 60 * 1000;
-
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
-            //时间间隔7天
-            if (endDate.getTime() < startDate.getTime()) {
-                throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
-            }
-            if (endDate.getTime() - startDate.getTime() > interval_7) {
-                throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于7天");
-            }
-        }else{
-            //时间间隔90天
-            if (endDate.getTime() < startDate.getTime()) {
-                throw new CommonException(CommonErrorCode.PARAM_ERROR, "截止时间不能小于起始时间");
-            }
-            if (endDate.getTime() - startDate.getTime() > interval_90) {
-                throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
-            }
+        //时间间隔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, "统计区间不能大于90天");
         }
 
         qcResultShortPageVO.setCurrent(1L);
         qcResultShortPageVO.setSize(Long.MAX_VALUE);
         qcResultShortPageVO.setSearchCount(false);
-        List<ExportExcelDTO> records = behospitalInfoFacade.qcResultShortPageExport(qcResultShortPageVO);
-        List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
-            resWide = transList(records, resWide);
-        }
+        List<ExportExcelDTO> record = behospitalInfoFacade.qcResultShortPageExport(qcResultShortPageVO);
         String fileName = "缺陷详情质控评分页.xls";
-        if("1".equals(qcResultShortPageVO.getRadioCheck())){
-            ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
-        }
-        if("2".equals(qcResultShortPageVO.getRadioCheck())){
-            ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
-        }
-   }
+        ExcelUtils.exportExcelUser(record, null, "sheet1", ExportExcelDTO.class, fileName, response);
+    }
 
     /**
      * 出院人数统计导出

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

@@ -6444,11 +6444,9 @@
         FROM
         (SELECT
         t.*,
-        <if test="qcResultShortPageVO.radioCheck !=null and qcResultShortPageVO.radioCheck == 1">
+        qi.score_res AS score,
         qd.msg AS msg,
-        qc.NAME AS caseName,
-        </if>
-        qi.score_res AS score
+        qc.NAME AS caseName
         FROM
         (SELECT DISTINCT
         t1.hospital_id AS hospitalId,