소스 검색

台州/长兴各科室占比/导出代码

chengyao 4 년 전
부모
커밋
b06a4e6d4d

+ 0 - 250
src/main/java/com/diagbot/dto/LevelStatisticStrDTO.java

@@ -1,250 +0,0 @@
-package com.diagbot.dto;
-
-import cn.afterturn.easypoi.excel.annotation.Excel;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:各科室缺陷占比返回结构
- * @Author:zhaops
- * @time: 2020/5/19 16:04
- */
-@Getter
-@Setter
-public class LevelStatisticStrDTO {
-    /**
-     * 科室id(科室编码)
-     */
-//    @Excel(name = "科室编码", orderNum = "0")
-    private String deptId;
-    /**
-     * 科室名称
-     */
-    @Excel(name = "科室名称", width = 30, orderNum = "2")
-    private String deptName;
-    /**
-     * 主管医生id
-     */
-    private String doctorId;
-    /**
-     * 主管医生名称
-     */
-    private String doctorName;
-    /**
-     * 缺陷条目数
-     */
-    private Integer entryNum;
-
-    /**
-     * 缺陷条目数-带升降标示
-     */
-    @Excel(name = "缺陷总数", orderNum = "3")
-    private String entryStrNum = "0";
-
-    /**
-     * 同比总数
-     */
-    private Integer sameNum = 0;
-
-    /**
-     * 同比总数-带升降标示
-     */
-    @Excel(name = "同比总数", orderNum = "4")
-    private String sameStrNum = "0";
-
-    /**
-     * 质控病历数
-     */
-    private Integer mrNum;
-
-    /**
-     * 质控病历数-带升降标示
-     */
-    @Excel(name = "质控病历数", orderNum = "7")
-    private String mrStrNum = "0";
-
-    /**
-     * 同比病历数
-     */
-    private Integer sameMrNum = 0;
-
-    /**
-     * 同比病历数-带升降标示
-     */
-    @Excel(name = "同比质控数", orderNum = "8")
-    private String sameMrStrNum = "0";
-
-
-
-    /**
-     * 质控评分(总分)
-     */
-    private Double totleValue;
-
-    /**
-     * 同比质控评分(总分)
-     */
-    private Double sameTotleValue = 0d;
-
-    /**
-     * 质控评分(平均分)
-     */
-    private Double averageValue;
-
-    /**
-     * 质控评分(平均分)-带升降标示
-     */
-    @Excel(name = "质控平均分", orderNum = "5")
-    private String averageStrValue = "0";
-
-    /**
-     * 同比评分(平均分)
-     */
-    private Double sameAvgValue = 0d;
-
-    /**
-     * 同比评分(平均分)-带升降标示
-     */
-    @Excel(name = "同比平均分", orderNum = "6")
-    private String sameAvgStrValue = "0";
-
-
-    /**
-     * 甲级病历数/病案首页合格病历数
-     */
-    private Integer firstLevelNum = 0;
-
-    /**
-     * 甲级病历数/病案首页合格病历数-带升降标示
-     */
-    @Excel(name = "甲级病历数", orderNum = "9")
-    private String firstLevelStrNum = "0";
-
-    /**
-     * 同比甲级病历数/病案首页合格病历数
-     */
-    private Integer sameFirstLevelNum = 0;
-
-    /**
-     * 同比甲级病历数/病案首页合格病历数-带升降标示
-     */
-    @Excel(name = "同比甲级数", orderNum = "10")
-    private String sameFirstLevelStrNum = "0";
-
-
-
-    /**
-     * 乙级病历数/病案首页不合格病历数
-     */
-    private Integer secondLevelNum = 0;
-
-    /**
-     * 乙级病历数/病案首页不合格病历数-带升降标示
-     */
-    @Excel(name = "乙级病历数", orderNum = "11")
-    private String secondLevelStrNum = "0";
-
-    /**
-     * 同比乙级病历数/病案首页不合格病历数
-     */
-    private Integer sameSecondLevelNum = 0;
-
-    /**
-     * 同比乙级病历数/病案首页不合格病历数-带升降标示
-     */
-    @Excel(name = "同比乙级数", orderNum = "12")
-    private String sameSecondLevelStrNum = "0";
-
-
-
-    /**
-     * 丙级病历数
-     */
-    private Integer thirdLevelNum = 0;
-
-    /**
-     * 丙级病历数-带升降标示
-     */
-    @Excel(name = "丙级病历数", orderNum = "13")
-    private String thirdLevelStrNum = "0";
-
-    /**
-     * 同比丙级病历数
-     */
-    private Integer sameThirdLevelNum = 0;
-
-    /**
-     * 同比丙级病历数-带升降标示
-     */
-    @Excel(name = "同比丙级数", orderNum = "14")
-    private String sameThirdLevelStrNum = "0";
-
-
-    /**
-     * 甲级病历占比/病案首页合格病历占比
-     */
-    private Double firstLevelPercent ;
-
-    /**
-     * 同比甲级病历占比/病案首页合格病历占比
-     */
-    private Double sameFirstLevelPercent = 0d;
-
-
-    /**
-     * 乙级病历占比/病案首页不合格病历占比
-     */
-    private Double secondLevelPercent;
-
-    /**
-     * 同比乙级病历占比/病案首页不合格病历占比
-     */
-    private Double sameSecondLevelPercent = 0d;
-
-    /**
-     * 丙级病历占比
-     */
-    private Double thirdLevelPercent;
-
-    /**
-     * 同比丙级病历占比
-     */
-    private Double sameThirdLevelPercent = 0d;
-
-    /**
-     * 甲级病历占比(百分比)/病案首页合格病历占比(百分比)
-     */
-    @Excel(name = "甲级率", orderNum = "15")
-    private String firstLevelPercentStr= "0.00%";
-
-    /**
-     * 同比甲级病历占比(百分比)/病案首页合格病历占比(百分比)
-     */
-    @Excel(name = "同比甲级率", orderNum = "16")
-    private String sameFirstLevelPercentStr = "0.00%";
-
-    /**
-     * 乙级病历占比(百分比)/病案首页不合格病历占比(百分比)
-     */
-    @Excel(name = "乙级率", orderNum = "17")
-    private String secondLevelPercentStr = "0.00%";
-
-    /**
-     * 同比乙级病历占比(百分比)/病案首页不合格病历占比(百分比)
-     */
-    @Excel(name = "同比乙级率", orderNum = "18")
-    private String sameSecondLevelPercentStr = "0.00%";
-
-    /**
-     * 丙级病历占比(百分比)
-     */
-    @Excel(name = "丙级率", orderNum = "19")
-    private String thirdLevelPercentStr = "0.00%";
-
-    /**
-     * 同比丙级病历占比(百分比)
-     */
-    @Excel(name = "同比丙级率", orderNum = "20")
-    private String sameThirdLevelPercentStr = "0.00%";
-
-}

+ 74 - 12
src/main/java/com/diagbot/dto/LevelStatisticsDTO.java

@@ -33,15 +33,25 @@ public class LevelStatisticsDTO {
     /**
      * 缺陷条目数
      */
-    @Excel(name = "缺陷总数", orderNum = "3")
     private Integer entryNum = 0;
 
+    /**
+     * 缺陷条目数-带升降标示
+     */
+    @Excel(name = "缺陷总数", orderNum = "3")
+    private String entryStrNum = "0";
+
     /**
      * 同比总数
      */
-    @Excel(name = "同比总数", orderNum = "4")
     private Integer sameNum = 0;
 
+    /**
+     * 同比总数-带升降标示
+     */
+    @Excel(name = "同比总数", orderNum = "4")
+    private String sameStrNum = "0";
+
     /**
      * 缺陷条目数现有数据与同期数据对比(-1-降 0-持平 1-升)
      */
@@ -50,15 +60,25 @@ public class LevelStatisticsDTO {
     /**
      * 质控病历数
      */
-    @Excel(name = "质控病历数", orderNum = "7")
     private Integer mrNum = 0;
 
+    /**
+     * 质控病历数-带升降标示
+     */
+    @Excel(name = "质控病历数", orderNum = "7")
+    private String mrStrNum = "0";
+
     /**
      * 同比病历数
      */
-    @Excel(name = "同比质控数", orderNum = "8")
     private Integer sameMrNum= 0;
 
+    /**
+     * 同比病历数-带升降标示
+     */
+    @Excel(name = "同比质控数", orderNum = "8")
+    private String sameMrStrNum = "0";
+
     /**
      * 质控病历数现有数据与同期数据对比(-1-降 0-持平 1-升)
      */
@@ -74,18 +94,29 @@ public class LevelStatisticsDTO {
      */
     private Double sameTotleValue= 0d;
 
+
     /**
      * 质控评分(平均分)
      */
-    @Excel(name = "质控平均分", orderNum = "5")
     private Double averageValue = 0d;
 
+    /**
+     * 质控评分(平均分)-带升降标示
+     */
+    @Excel(name = "质控平均分", orderNum = "5")
+    private String averageStrValue = "0";
+
     /**
      * 同比评分(平均分)
      */
-    @Excel(name = "同比平均分", orderNum = "6")
     private Double sameAvgValue = 0d;
 
+    /**
+     * 同比评分(平均分)-带升降标示
+     */
+    @Excel(name = "同比平均分", orderNum = "6")
+    private String sameAvgStrValue = "0";
+
     /**
      * 质控评分现有数据与同期数据对比(-1-降 0-持平 1-升)
      */
@@ -94,15 +125,25 @@ public class LevelStatisticsDTO {
     /**
      * 甲级病历数/病案首页合格病历数
      */
-    @Excel(name = "甲级病历数", orderNum = "9")
     private Integer firstLevelNum = 0;
 
+    /**
+     * 甲级病历数/病案首页合格病历数-带升降标示
+     */
+    @Excel(name = "甲级病历数", orderNum = "9")
+    private String firstLevelStrNum = "0";
+
     /**
      * 同比甲级病历数/病案首页合格病历数
      */
-    @Excel(name = "同比甲级数", orderNum = "10")
     private Integer sameFirstLevelNum = 0;
 
+    /**
+     * 同比甲级病历数/病案首页合格病历数-带升降标示
+     */
+    @Excel(name = "同比甲级数", orderNum = "10")
+    private String sameFirstLevelStrNum = "0";
+
     /**
      * 甲级病历数现有数据与同期数据对比(-1-降 0-持平 1-升)
      */
@@ -111,15 +152,26 @@ public class LevelStatisticsDTO {
     /**
      * 乙级病历数/病案首页不合格病历数
      */
-    @Excel(name = "乙级病历数", orderNum = "11")
     private Integer secondLevelNum = 0;
 
+    /**
+     * 乙级病历数/病案首页不合格病历数-带升降标示
+     */
+    @Excel(name = "乙级病历数", orderNum = "11")
+    private String secondLevelStrNum = "0";
+
     /**
      * 同比乙级病历数/病案首页不合格病历数
      */
-    @Excel(name = "同比乙级数", orderNum = "12")
     private Integer sameSecondLevelNum = 0;
 
+    /**
+     * 同比乙级病历数/病案首页不合格病历数-带升降标示
+     */
+    @Excel(name = "同比乙级数", orderNum = "12")
+    private String sameSecondLevelStrNum = "0";
+
+
     /**
      * 乙级病历数现有数据与同期数据对比(-1-降 0-持平 1-升)
      */
@@ -128,15 +180,25 @@ public class LevelStatisticsDTO {
     /**
      * 丙级病历数
      */
-    @Excel(name = "丙级病历数", orderNum = "13")
     private Integer thirdLevelNum = 0;
 
+    /**
+     * 丙级病历数-带升降标示
+     */
+    @Excel(name = "丙级病历数", orderNum = "13")
+    private String thirdLevelStrNum = "0";
+
     /**
      * 同比丙级病历数
      */
-    @Excel(name = "同比丙级数", orderNum = "14")
     private Integer sameThirdLevelNum = 0;
 
+    /**
+     * 同比丙级病历数-带升降标示
+     */
+    @Excel(name = "同比丙级数", orderNum = "14")
+    private String sameThirdLevelStrNum = "0";
+
     /**
      * 丙级病历数现有数据与同期数据对比(-1-降 0-持平 1-升)
      */

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

@@ -1,24 +0,0 @@
-package com.diagbot.dto;
-
-import cn.afterturn.easypoi.excel.annotation.Excel;
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:各科室缺陷占比-台州
- * @Author:zhaops
- * @time: 2020/6/22 13:41
- */
-@Getter
-@Setter
-public class LevelStatisticsStrTZDTO extends LevelStatisticStrDTO {
-    /**
-     * 上级科室id(上级科室编码)
-     */
-    private String deptClassId;
-    /**
-     * 上级科室名称
-     */
-    @Excel(name = "科室系统", orderNum = "1", replace = { "内科系统_内科", "外科系统_外科", "-_null" })
-    private String deptClass;
-}

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

@@ -93,21 +93,21 @@ public class ConsoleExportFacade {
      * @return
      */
     public void levelExport(HttpServletResponse response, FilterOrderVO filterOrderVO) {
-        List<LevelStatisticsDTO> records = consoleFacade.levelStatistics(filterOrderVO);
+        List<LevelStatisticsDTO> records = consoleFacade.levelStatisticsStr(filterOrderVO);
         String fileName = "各科室缺陷占比.xls";
         ExcelUtils.exportExcel(records, null, "sheet1", LevelStatisticsDTO.class, fileName, response, 12.8f);
     }
 
     /**
-     * 各科室缺陷占比(组合)-台州
+     * 各科室缺陷占比(组合)-台州-导出
      *
      * @param filterOrderVO
      * @return
      */
     public void levelExport_TZ(HttpServletResponse response, FilterOrderVO filterOrderVO) {
-        List<LevelStatisticsStrTZDTO> records = consoleFacade.levelStatisticsByDeptStr_TZ(filterOrderVO);
+        List<LevelStatisticsTZDTO> records = consoleFacade.levelStatisticsByDeptStr_TZ(filterOrderVO);
         String fileName = "各科室缺陷占比-台州.xls";
-        ExcelUtils.exportExcel(records, null, "sheet1", LevelStatisticsStrTZDTO.class, fileName, response, 12.8f);
+        ExcelUtils.exportExcel(records, null, "sheet1", LevelStatisticsTZDTO.class, fileName, response, 12.8f);
     }
 
     /**

+ 71 - 32
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -448,31 +448,42 @@ public class ConsoleFacade {
     public List<LevelStatisticsDTO> levelStatistics(FilterOrderVO filterOrderVO) {
         filterFacade.filterOrderVOSame(filterOrderVO);
         List<LevelStatisticsDTO> records = behospitalInfoFacade.levelStatistics(filterOrderVO);
+        //没有科室过滤时增加全院数据
+        if (StringUtil.isBlank(filterOrderVO.getName()) || filterOrderVO.getName().equals("全院")) {
+            LevelStatisticsDTO item = getGlobleTitle(records);
+            if (item != null) {
+                records.add(0, item);
+            }
+        }
+        if(ListUtil.isNotEmpty(records)){
+            for (LevelStatisticsDTO record : records) {
+                BigDecimalMethod(record);
+            }
+        }
         return records;
     }
 
     /**
-     * 各科室缺陷占比(组合)-全院-根据内外科系统统计(台州)-导出
+     * 各科室缺陷占比(组合)-导出
      *
      * @param filterOrderVO
      * @return
      */
-    public List<LevelStatisticsStrTZDTO> levelStatisticsByDeptStr_TZ(FilterOrderVO filterOrderVO) {
+    public List<LevelStatisticsDTO> levelStatisticsStr(FilterOrderVO filterOrderVO) {
         filterFacade.filterOrderVOSame(filterOrderVO);
-        List<LevelStatisticsStrTZDTO> records = behospitalInfoFacade.levelStatisticsByDeptStr_TZ(filterOrderVO);
+        List<LevelStatisticsDTO> records = behospitalInfoFacade.levelStatistics(filterOrderVO);
         //没有科室过滤时增加全院数据
         if (StringUtil.isBlank(filterOrderVO.getName()) || filterOrderVO.getName().equals("全院")) {
-            LevelStatisticsStrTZDTO item = getGlobleStrRecords(records);
+            LevelStatisticsDTO item = getGlobleTitle(records);
             if (item != null) {
                 records.add(0, item);
             }
         }
         if(ListUtil.isNotEmpty(records)){
-           for (LevelStatisticsStrTZDTO record : records) {
-               BigDecimalStrExport(record);
-           }
-       }
-
+            for (LevelStatisticsDTO record : records) {
+                BigDecimalStrExport(record);
+            }
+        }
         return records;
     }
 
@@ -482,9 +493,9 @@ public class ConsoleFacade {
      * @param records
      * @return
      */
-    public LevelStatisticsStrTZDTO getGlobleStrRecords(List<LevelStatisticsStrTZDTO> records) {
+    public LevelStatisticsDTO getGlobleTitle(List<LevelStatisticsDTO> records) {
         DecimalFormat df = new DecimalFormat("#0.00");
-        LevelStatisticsStrTZDTO item = new LevelStatisticsStrTZDTO();
+        LevelStatisticsDTO item = new LevelStatisticsDTO();
         if (ListUtil.isEmpty(records)) {
             return null;
         }
@@ -492,7 +503,7 @@ public class ConsoleFacade {
         //缺陷总数
         Integer entryNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getEntryNum)
+                .map(LevelStatisticsDTO::getEntryNum)
                 .reduce(0, Integer::sum);
         if (entryNum == null || entryNum == 0) {
             return null;
@@ -500,18 +511,18 @@ public class ConsoleFacade {
         //同比总数
         Integer sameNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getSameNum)
+                .map(LevelStatisticsDTO::getSameNum)
                 .reduce(0, Integer::sum);
 
         //质控病历数
         Integer mrNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getMrNum)
+                .map(LevelStatisticsDTO::getMrNum)
                 .reduce(0, Integer::sum);
         //同比病历数
         Integer sameMrNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getSameMrNum)
+                .map(LevelStatisticsDTO::getSameMrNum)
                 .reduce(0, Integer::sum);
 
         //质控评分
@@ -532,7 +543,7 @@ public class ConsoleFacade {
                 .divide(BigDecimal.valueOf(mrNum), 2, RoundingMode.HALF_UP)
                 .doubleValue();
 
-        Double sameAvgValue = null;
+        Double sameAvgValue = 0d;
         //同比平均分
         if(0d != sameTotleValue){
             sameAvgValue = BigDecimal.valueOf(sameTotleValue)
@@ -544,39 +555,42 @@ public class ConsoleFacade {
         //甲级病历数
         Integer firstLevelNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getFirstLevelNum)
+                .map(LevelStatisticsDTO::getFirstLevelNum)
                 .reduce(0, Integer::sum);
 
         //同比甲级病历数
         Integer sameFirstLevelNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getSameFirstLevelNum)
+                .map(LevelStatisticsDTO::getSameFirstLevelNum)
                 .reduce(0, Integer::sum);
 
+
         //乙级病历数
         Integer secondLevelNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getSecondLevelNum)
+                .map(LevelStatisticsDTO::getSecondLevelNum)
                 .reduce(0, Integer::sum);
 
         //同比乙级病历数
         Integer sameSecondLevelNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getSameSecondLevelNum)
+                .map(LevelStatisticsDTO::getSameSecondLevelNum)
                 .reduce(0, Integer::sum);
 
+
         //丙级病历数
         Integer thirdLevelNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getThirdLevelNum)
+                .map(LevelStatisticsDTO::getThirdLevelNum)
                 .reduce(0, Integer::sum);
 
         //同比丙级病历数
         Integer sameThirdLevelNum = records
                 .stream()
-                .map(LevelStatisticsStrTZDTO::getSameThirdLevelNum)
+                .map(LevelStatisticsDTO::getSameThirdLevelNum)
                 .reduce(0, Integer::sum);
 
+
         //甲级病历占比
         Double firstLevelPercent = BigDecimal.valueOf(firstLevelNum)
                 .divide(BigDecimal.valueOf(mrNum), 4, RoundingMode.HALF_UP)
@@ -585,12 +599,12 @@ public class ConsoleFacade {
                 = df.format(BigDecimal.valueOf(firstLevelPercent).multiply(BigDecimal.valueOf(100))) + "%";
         //同比甲级病历占比
         Double sameFirstLevelPercent = 0d;
-        String  sameFirstLevelPercentStr = "0.00%";
+        String sameFirstLevelPercentStr = "0.00%";
         if(0 != sameFirstLevelNum ){
-             sameFirstLevelPercent = BigDecimal.valueOf(sameFirstLevelNum)
+            sameFirstLevelPercent = BigDecimal.valueOf(sameFirstLevelNum)
                     .divide(BigDecimal.valueOf(sameMrNum), 4, RoundingMode.HALF_UP)
                     .doubleValue();
-             sameFirstLevelPercentStr
+            sameFirstLevelPercentStr
                     = df.format(BigDecimal.valueOf(sameFirstLevelPercent).multiply(BigDecimal.valueOf(100))) + "%";
         }
 
@@ -603,13 +617,13 @@ public class ConsoleFacade {
                 = df.format(BigDecimal.valueOf(secondLevelPercent).multiply(BigDecimal.valueOf(100))) + "%";
 
         //同比乙级病历占比
-        Double  sameSecondLevelPercent = 0d;;
+        Double sameSecondLevelPercent = 0d;
         String sameSecondLevelPercentStr = "0.00%";
         if(0 != sameFirstLevelNum ){
-              sameSecondLevelPercent = BigDecimal.valueOf(sameSecondLevelNum)
+            sameSecondLevelPercent = BigDecimal.valueOf(sameSecondLevelNum)
                     .divide(BigDecimal.valueOf(sameMrNum), 4, RoundingMode.HALF_UP)
                     .doubleValue();
-             sameSecondLevelPercentStr
+            sameSecondLevelPercentStr
                     = df.format(BigDecimal.valueOf(sameSecondLevelPercent).multiply(BigDecimal.valueOf(100))) + "%";
         }
         //丙级病历占比
@@ -620,13 +634,13 @@ public class ConsoleFacade {
                 = df.format(BigDecimal.valueOf(thirdLevelPercent).multiply(BigDecimal.valueOf(100))) + "%";
 
         //同比丙级病历占比
-        Double sameThirdLevelPercent = 0d;;
+        Double sameThirdLevelPercent = 0d;
         String sameThirdLevelPercentStr = "0.00%";
         if(0 != sameFirstLevelNum ) {
             sameThirdLevelPercent = BigDecimal.valueOf(sameThirdLevelNum)
                     .divide(BigDecimal.valueOf(sameMrNum), 4, RoundingMode.HALF_UP)
                     .doubleValue();
-             sameThirdLevelPercentStr
+            sameThirdLevelPercentStr
                     = df.format(BigDecimal.valueOf(sameThirdLevelPercent).multiply(BigDecimal.valueOf(100))) + "%";
         }
         item.setDeptName("全院");
@@ -659,6 +673,31 @@ public class ConsoleFacade {
         return item;
     }
 
+    /**
+     * 各科室缺陷占比(组合)-全院-根据内外科系统统计(台州)-导出
+     *
+     * @param filterOrderVO
+     * @return
+     */
+    public List<LevelStatisticsTZDTO> levelStatisticsByDeptStr_TZ(FilterOrderVO filterOrderVO) {
+        filterFacade.filterOrderVOSame(filterOrderVO);
+        List<LevelStatisticsTZDTO> records = behospitalInfoFacade.levelStatisticsByDeptClass_TZ(filterOrderVO);
+        //没有科室过滤时增加全院数据
+        if (StringUtil.isBlank(filterOrderVO.getName()) || filterOrderVO.getName().equals("全院")) {
+            LevelStatisticsTZDTO item = getGlobleRecords(records);
+            if (item != null) {
+                records.add(0, item);
+            }
+        }
+        if(ListUtil.isNotEmpty(records)){
+           for (LevelStatisticsTZDTO record : records) {
+               BigDecimalStrExport(record);
+           }
+       }
+
+        return records;
+    }
+
     /**
      * 各科室缺陷占比(组合)-全院-根据内外科系统统计(台州)
      *
@@ -871,7 +910,7 @@ public class ConsoleFacade {
     }
 
 
-    public void BigDecimalStrExport(LevelStatisticsStrTZDTO record){
+    public void BigDecimalStrExport(LevelStatisticsDTO record){
 
         BigDecimal entrySameBigDecimal = getSubtract(new BigDecimal(record.getEntryNum()), new BigDecimal(record.getSameNum()  == null? 0:record.getSameNum()));
 
@@ -938,7 +977,7 @@ public class ConsoleFacade {
         }
     };
 
-    public void BigDecimalMethod(LevelStatisticsTZDTO record){
+    public void BigDecimalMethod(LevelStatisticsDTO record){
         BigDecimal entrySameBigDecimal = getSubtract(new BigDecimal(record.getEntryNum()), new BigDecimal(record.getSameNum() == null? 0:record.getSameNum()));
 
         if(entrySameBigDecimal.compareTo(BigDecimal.ZERO)>0){

+ 0 - 10
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -179,16 +179,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public List<LevelStatisticsTZDTO> levelStatisticsByDeptClass_TZ(FilterOrderVO filterOrderVO);
 
-
-    /**
-     * 各科室缺陷占比(组合)-全院-根据内外科系统统计(台州)-导出
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    public List<LevelStatisticsStrTZDTO> levelStatisticsByDeptStr_TZ(FilterOrderVO filterOrderVO);
-
-
     List<ExportExcelDTO> exportExcel();
 
     /**

+ 0 - 10
src/main/java/com/diagbot/service/BehospitalInfoService.java

@@ -179,16 +179,6 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      */
     public List<LevelStatisticsTZDTO> levelStatisticsByDeptClass_TZ(FilterOrderVO filterOrderVO);
 
-    /**
-     * 各科室缺陷占比(组合)-全院-根据内外科系统统计(台州)-导出
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    public List<LevelStatisticsStrTZDTO> levelStatisticsByDeptStr_TZ(FilterOrderVO filterOrderVO);
-
-
-
     List<ExportExcelDTO> exportExcel();
 
     /**

+ 0 - 10
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -249,16 +249,6 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.levelStatisticsByDeptClass_TZ(filterOrderVO);
     }
 
-    /**
-     * 各科室缺陷占比(组合)-全院-根据内外科系统统计(台州)-导出
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    @Override
-    public List<LevelStatisticsStrTZDTO> levelStatisticsByDeptStr_TZ(FilterOrderVO filterOrderVO) {
-        return baseMapper.levelStatisticsByDeptStr_TZ(filterOrderVO);
-    }
 
     @Override
     public List<ExportExcelDTO> exportExcel() {

+ 18 - 487
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -1302,6 +1302,7 @@
         m1.mrNum,
         m2.sameMrNum,
         m1.totleValue,
+        m2.sameTotleValue,
         m1.averageValue,
         m2.sameAvgValue,
         m1.firstLevelNum,
@@ -1460,6 +1461,7 @@
         t1.deptName,
         t2.entryNum as sameNum,
         t1.mrNum as sameMrNum,
+        t1.totleValue as  sameTotleValue,
         t1.averageValue as sameAvgValue,
         t1.firstLevelNum as sameFirstLevelNum,
         t1.secondLevelNum as sameSecondLevelNum,
@@ -1503,19 +1505,19 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            <if test="lastStartDate != null and lastStartDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{lastStartDate}]]>
             </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            <if test="lastEndDate != null and lastEndDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{lastEndDate}]]>
             </if>
         </if>
         <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            <if test="lastStartDate != null and lastStartDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{lastStartDate}]]>
             </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            <if test="lastEndDate != null and lastEndDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{lastEndDate}]]>
             </if>
         </if>
         <if test="level != null and level != ''">
@@ -1557,19 +1559,19 @@
             AND a.hospital_id = #{hospitalId}
         </if>
         <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
+            <if test="lastStartDate != null and lastStartDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{lastStartDate}]]>
             </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
+            <if test="lastEndDate != null and lastEndDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{lastEndDate}]]>
             </if>
         </if>
         <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
+            <if test="lastStartDate != null and lastStartDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{lastStartDate}]]>
             </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
+            <if test="lastEndDate != null and lastEndDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{lastEndDate}]]>
             </if>
         </if>
         <if test="level != null and level != ''">
@@ -2358,477 +2360,6 @@
         </if>
     </select>
 
-    <!-- 各科室缺陷占比(组合)-全院-根据内外科系统统计(台州) 导出 -->
-    <select id="levelStatisticsByDeptStr_TZ" parameterType="com.diagbot.vo.FilterOrderVO" resultType="com.diagbot.dto.LevelStatisticsStrTZDTO">
-        select
-        m1.deptId,
-        m1.deptName,
-        m1.deptClassId,
-        m1.deptClass,
-        m1.entryNum,
-        m2.sameNum,
-        m1.mrNum,
-        m2.sameMrNum,
-        m1.totleValue,
-        m2.sameTotleValue,
-        m1.averageValue,
-        m2.sameAvgValue,
-        m1.firstLevelNum,
-        m2.sameFirstLevelNum,
-        m1.secondLevelNum,
-        m2.sameSecondLevelNum,
-        m1.thirdLevelNum,
-        m2.sameThirdLevelNum,
-        m1.firstLevelPercent,
-        m2.sameFirstLevelPercent,
-        m1.secondLevelPercent,
-        m2.sameSecondLevelPercent,
-        m1.thirdLevelPercent,
-        m2.sameThirdLevelPercent,
-        m1.firstLevelPercentStr,
-        m2.sameFirstLevelPercentStr,
-        m1.secondLevelPercentStr,
-        m2.sameSecondLevelPercentStr,
-        m1.thirdLevelPercentStr,
-        m2.sameThirdLevelPercentStr
-        from (
-        SELECT
-        t1.deptId,
-        t1.deptName,
-        t1.deptClassId,
-        t1.deptClass,
-        t2.entryNum,
-        t1.mrNum,
-        t1.totleValue,
-        t1.averageValue,
-        t1.firstLevelNum,
-        t1.secondLevelNum,
-        t1.thirdLevelNum,
-        t1.firstLevelPercent,
-        t1.secondLevelPercent,
-        t1.thirdLevelPercent,
-        t1.firstLevelPercentStr,
-        t1.secondLevelPercentStr,
-        t1.thirdLevelPercentStr
-        FROM
-        (
-        SELECT
-        tt1.deptId,
-        tt1.deptName,
-        e.dept_id AS deptClassId,
-        e.dept_name AS deptClass,
-        count(*) AS mrNum,
-        ROUND( sum( CAST( tt1.score AS DECIMAL ( 18, 2 )) ), 2 ) AS totleValue,
-        ROUND( avg( CAST( tt1.score AS DECIMAL ( 18, 2 )) ), 2 ) AS averageValue,
-        sum( tt1.`level` = '甲' ) AS firstLevelNum,
-        sum( tt1.`level` = '乙' ) AS secondLevelNum,
-        sum( tt1.`level` = '丙' ) AS thirdLevelNum,
-        ROUND( sum( tt1.`level` = '甲' )/ count( * ), 4 ) AS firstLevelPercent,
-        ROUND( sum( tt1.`level` = '乙' )/ count( * ), 4 ) AS secondLevelPercent,
-        ROUND( sum( tt1.`level` = '丙' )/ count( * ), 4 ) AS thirdLevelPercent,
-        concat( ROUND( sum( tt1.`level` = '甲' )/ count( * )* 100, 2 ), '%' ) AS firstLevelPercentStr,
-        concat( ROUND( sum( tt1.`level` = '乙' )/ count( * )* 100, 2 ), '%' ) AS secondLevelPercentStr,
-        concat( ROUND( sum( tt1.`level` = '丙' )/ count( * )* 100, 2 ), '%' ) AS thirdLevelPercentStr
-        FROM
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        d.parent_dept_id AS parentDeptId,
-        a.hospital_id AS hospitalId,
-        a.behospital_code AS behospitalCode,
-        c.score_res AS score,
-        c.LEVEL
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        bas_dept_info d
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = d.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.beh_dept_id = d.dept_id
-        <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        <if test="level != null and level != ''">
-            and c.level = #{level}
-        </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
-        </if>
-        ) tt1
-        LEFT JOIN bas_dept_info e ON tt1.parentDeptId = e.dept_id
-        AND e.is_deleted = 'N'
-        AND tt1.hospitalId = e.hospital_id
-        <if test="deptClass != null and deptClass != ''">
-            WHERE e.dept_name = #{deptClass}
-        </if>
-        GROUP BY
-        tt1.deptId,
-        tt1.deptName,
-        e.dept_id,
-        e.dept_name
-        ) t1,
-        (
-        SELECT
-        tt2.deptId,
-        tt2.deptName,
-        g.dept_id AS deptClassId,
-        g.dept_name AS deptClass,
-        count( * ) AS entryNum
-        FROM
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        f.parent_dept_id AS parentDeptId,
-        a.hospital_id AS hospitalId,
-        a.behospital_code AS behospitalCode
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        med_qcresult_detail d,
-        qc_cases_entry e,
-        bas_dept_info f
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND e.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = d.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.behospital_code = d.behospital_code
-        AND d.cases_id = e.cases_id
-        AND d.cases_entry_id = e.id
-        AND a.beh_dept_id = f.dept_id
-        <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        <if test="level != null and level != ''">
-            and c.level = #{level}
-        </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
-        </if>
-        ) tt2
-        LEFT JOIN bas_dept_info g ON tt2.parentDeptId = g.dept_id
-        AND g.is_deleted = 'N'
-        AND tt2.hospitalId = g.hospital_id
-        <if test="deptClass != null and deptClass != ''">
-            WHERE g.dept_name = #{deptClass}
-        </if>
-        GROUP BY
-        tt2.deptId,
-        tt2.deptName,
-        g.dept_id,
-        g.dept_name
-        ) t2
-        WHERE
-        t1.deptId = t2.deptId
-        AND t1.deptName = t2.deptName)m1 left join
-        ( SELECT
-        t1.deptId,
-        t1.deptName,
-        t1.deptClassId,
-        t1.deptClass,
-        t2.entryNum as sameNum,
-        t1.mrNum as sameMrNum,
-        t1.totleValue as sameTotleValue,
-        t1.averageValue as sameAvgValue,
-        t1.firstLevelNum as sameFirstLevelNum,
-        t1.secondLevelNum as sameSecondLevelNum,
-        t1.thirdLevelNum as sameThirdLevelNum,
-        t1.firstLevelPercent as sameFirstLevelPercent,
-        t1.secondLevelPercent as sameSecondLevelPercent,
-        t1.thirdLevelPercent as sameThirdLevelPercent,
-        t1.firstLevelPercentStr as sameFirstLevelPercentStr,
-        t1.secondLevelPercentStr as sameSecondLevelPercentStr,
-        t1.thirdLevelPercentStr as sameThirdLevelPercentStr
-        FROM
-        (
-        SELECT
-        tt1.deptId,
-        tt1.deptName,
-        e.dept_id AS deptClassId,
-        e.dept_name AS deptClass,
-        count(*) AS mrNum,
-        ROUND( sum( CAST( tt1.score AS DECIMAL ( 18, 2 )) ), 2 ) AS totleValue,
-        ROUND( avg( CAST( tt1.score AS DECIMAL ( 18, 2 )) ), 2 ) AS averageValue,
-        sum( tt1.`level` = '甲' ) AS firstLevelNum,
-        sum( tt1.`level` = '乙' ) AS secondLevelNum,
-        sum( tt1.`level` = '丙' ) AS thirdLevelNum,
-        ROUND( sum( tt1.`level` = '甲' )/ count( * ), 4 ) AS firstLevelPercent,
-        ROUND( sum( tt1.`level` = '乙' )/ count( * ), 4 ) AS secondLevelPercent,
-        ROUND( sum( tt1.`level` = '丙' )/ count( * ), 4 ) AS thirdLevelPercent,
-        concat( ROUND( sum( tt1.`level` = '甲' )/ count( * )* 100, 2 ), '%' ) AS firstLevelPercentStr,
-        concat( ROUND( sum( tt1.`level` = '乙' )/ count( * )* 100, 2 ), '%' ) AS secondLevelPercentStr,
-        concat( ROUND( sum( tt1.`level` = '丙' )/ count( * )* 100, 2 ), '%' ) AS thirdLevelPercentStr
-        FROM
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        d.parent_dept_id AS parentDeptId,
-        a.hospital_id AS hospitalId,
-        a.behospital_code AS behospitalCode,
-        c.score_res AS score,
-        c.LEVEL
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        bas_dept_info d
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = d.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.beh_dept_id = d.dept_id
-        <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="lastStartDate != null and lastStartDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{lastStartDate}]]>
-            </if>
-            <if test="lastEndDate != null and lastEndDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{lastEndDate}]]>
-            </if>
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="lastStartDate != null and lastStartDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{lastStartDate}]]>
-            </if>
-            <if test="lastEndDate != null and lastEndDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{lastEndDate}]]>
-            </if>
-        </if>
-        <if test="level != null and level != ''">
-            and c.level = #{level}
-        </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
-        </if>
-        ) tt1
-        LEFT JOIN bas_dept_info e ON tt1.parentDeptId = e.dept_id
-        AND e.is_deleted = 'N'
-        AND tt1.hospitalId = e.hospital_id
-        <if test="deptClass != null and deptClass != ''">
-            WHERE e.dept_name = #{deptClass}
-        </if>
-        GROUP BY
-        tt1.deptId,
-        tt1.deptName,
-        e.dept_id,
-        e.dept_name
-        ) t1,
-        (
-        SELECT
-        tt2.deptId,
-        tt2.deptName,
-        g.dept_id AS deptClassId,
-        g.dept_name AS deptClass,
-        count( * ) AS entryNum
-        FROM
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        f.parent_dept_id AS parentDeptId,
-        a.hospital_id AS hospitalId,
-        a.behospital_code AS behospitalCode
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        med_qcresult_detail d,
-        qc_cases_entry e,
-        bas_dept_info f
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND e.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = d.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.behospital_code = d.behospital_code
-        AND d.cases_id = e.cases_id
-        AND d.cases_entry_id = e.id
-        AND a.beh_dept_id = f.dept_id
-        <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="lastStartDate != null and lastStartDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{lastStartDate}]]>
-            </if>
-            <if test="lastEndDate != null and lastEndDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{lastEndDate}]]>
-            </if>
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="lastStartDate != null and lastStartDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{lastStartDate}]]>
-            </if>
-            <if test="lastEndDate != null and lastEndDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{lastEndDate}]]>
-            </if>
-        </if>
-        <if test="level != null and level != ''">
-            and c.level = #{level}
-        </if>
-        <if test="name != null and name != ''">
-            and a.beh_dept_name like CONCAT('%',#{name},'%')
-        </if>
-        ) tt2
-        LEFT JOIN bas_dept_info g ON tt2.parentDeptId = g.dept_id
-        AND g.is_deleted = 'N'
-        AND tt2.hospitalId = g.hospital_id
-        <if test="deptClass != null and deptClass != ''">
-            WHERE g.dept_name = #{deptClass}
-        </if>
-        GROUP BY
-        tt2.deptId,
-        tt2.deptName,
-        g.dept_id,
-        g.dept_name
-        ) t2
-        WHERE
-        t1.deptId = t2.deptId
-        AND t1.deptName = t2.deptName)m2
-        on
-        m1.deptId = m2.deptId
-        and m1.deptName = m2.deptName
-        <if test="asc != null and asc !=''">
-            order by
-            <choose>
-                <when test='asc=="deptId"'>m1.deptId asc</when>
-                <when test='asc=="deptName"'>m1.deptName asc</when>
-                <when test='asc=="deptClassId"'>m1.deptClassId asc</when>
-                <when test='asc=="deptClass"'>m1.deptClass asc</when>
-                <when test='asc=="entryNum"'>m1.entryNum asc</when>
-                <when test='asc=="sameNum"'>m2.sameNum asc</when>
-                <when test='asc=="mrNum"'>m1.mrNum asc</when>
-                <when test='asc=="sameMrNum"'>m2.sameMrNum asc</when>
-                <when test='asc=="totleValue"'>m1.totleValue asc</when>
-                <when test='asc=="averageValue"'>m1.averageValue asc</when>
-                <when test='asc=="sameAvgValue"'>m2.sameAvgValue asc</when>
-                <when test='asc=="firstLevelNum"'>m1.firstLevelNum asc</when>
-                <when test='asc=="sameFirstLevelNum"'>m2.sameFirstLevelNum asc</when>
-                <when test='asc=="secondLevelNum"'>m1.secondLevelNum asc</when>
-                <when test='asc=="sameSecondLevelNum"'>m2.sameSecondLevelNum asc</when>
-                <when test='asc=="thirdLevelNum"'>m1.thirdLevelNum asc</when>
-                <when test='asc=="sameThirdLevelNum"'>m2.sameThirdLevelNum asc</when>
-                <when test='asc=="firstLevelPercent"'>m1.firstLevelPercent asc</when>
-                <when test='asc=="sameFirstLevelPercent"'>m2.sameFirstLevelPercent asc</when>
-                <when test='asc=="secondLevelPercent"'>m1.secondLevelPercent asc</when>
-                <when test='asc=="sameSecondLevelPercent"'>m2.sameSecondLevelPercent asc</when>
-                <when test='asc=="thirdLevelPercent"'>m1.thirdLevelPercent asc</when>
-                <when test='asc=="sameThirdLevelPercent"'>m2.sameThirdLevelPercent asc</when>
-                <when test='asc=="firstLevelPercentStr"'>m1.firstLevelPercent asc</when>
-                <when test='asc=="sameFirstLevelPercentStr"'>m2.sameFirstLevelPercentStr asc</when>
-                <when test='asc=="secondLevelPercentStr"'>m1.secondLevelPercent asc</when>
-                <when test='asc=="sameSecondLevelPercentStr"'>m2.sameSecondLevelPercentStr asc</when>
-                <when test='asc=="thirdLevelPercentStr"'>m1.thirdLevelPercent asc</when>
-                <when test='asc=="sameThirdLevelPercentStr"'>m2.sameThirdLevelPercentStr asc</when>
-                <otherwise>deptName asc</otherwise>
-            </choose>
-        </if>
-        <if test="desc != null and desc!=''">
-            order by
-            <choose>
-                <when test='desc=="deptId"'>m1.deptId desc</when>
-                <when test='desc=="deptName"'>m1.deptName desc</when>
-                <when test='desc=="deptClassId"'>m1.deptClassId desc</when>
-                <when test='desc=="deptClass"'>m1.deptClass desc</when>
-                <when test='desc=="entryNum"'>m1.entryNum desc</when>
-                <when test='desc=="sameNum"'>m2.sameNum desc</when>
-                <when test='desc=="mrNum"'>m1.mrNum desc</when>
-                <when test='desc=="sameMrNum"'>m2.sameMrNum desc</when>
-                <when test='desc=="totleValue"'>m1.totleValue desc</when>
-                <when test='desc=="averageValue"'>m1.averageValue desc</when>
-                <when test='desc=="sameAvgValue"'>m2.sameAvgValue desc</when>
-                <when test='desc=="firstLevelNum"'>m1.firstLevelNum desc</when>
-                <when test='desc=="sameFirstLevelNum"'>m2.sameFirstLevelNum desc</when>
-                <when test='desc=="secondLevelNum"'>m1.secondLevelNum desc</when>
-                <when test='desc=="sameSecondLevelNum"'>m2.sameSecondLevelNum desc</when>
-                <when test='desc=="thirdLevelNum"'>m1.thirdLevelNum desc</when>
-                <when test='desc=="sameThirdLevelNum"'>m2.sameThirdLevelNum desc</when>
-                <when test='desc=="firstLevelPercent"'>m1.firstLevelPercent desc</when>
-                <when test='desc=="sameFirstLevelPercent"'>m2.sameFirstLevelPercent desc</when>
-                <when test='desc=="secondLevelPercent"'>m1.secondLevelPercent desc</when>
-                <when test='desc=="sameSecondLevelPercent"'>m2.sameSecondLevelPercent desc</when>
-                <when test='desc=="thirdLevelPercent"'>m1.thirdLevelPercent desc</when>
-                <when test='desc=="sameThirdLevelPercent"'>m2.sameThirdLevelPercent desc</when>
-                <when test='desc=="firstLevelPercentStr"'>m1.firstLevelPercent desc</when>
-                <when test='desc=="sameFirstLevelPercentStr"'>m2.sameFirstLevelPercentStr desc</when>
-                <when test='desc=="secondLevelPercentStr"'>m1.secondLevelPercent desc</when>
-                <when test='desc=="sameSecondLevelPercentStr"'>m2.sameSecondLevelPercentStr desc</when>
-                <when test='desc=="thirdLevelPercentStr"'>m1.thirdLevelPercent desc</when>
-                <when test='desc=="sameThirdLevelPercentStr"'>m2.sameThirdLevelPercentStr desc</when>
-                <otherwise>deptName desc</otherwise>
-            </choose>
-        </if>
-    </select>
-
     <!-- 病案首页合格率占比 -全院-->
     <select id="homePageLevelStatistics" parameterType="com.diagbot.vo.FilterOrderVO"
             resultType="com.diagbot.dto.HomePageNumDTO">