Преглед на файлове

质控核查统计一级页面查询一级导出

chengyao преди 4 години
родител
ревизия
4025f7d6d7

+ 2 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -192,6 +192,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/print/export/entryStatisticsExportByDept").permitAll()
                 .antMatchers("/consoleByDept/leaveHosMRPageByDept").permitAll()
                 .antMatchers("/print/export/leaveHosMrPageExportByDept").permitAll()
+                .antMatchers("/consoleByDept/qcCheckStatisticsByDept").permitAll()
+                .antMatchers("/print/export/qcCheckStaExportByDept").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

+ 2 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -236,6 +236,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/print/export/entryStatisticsExportByDept", request)
                 || matchers("/consoleByDept/leaveHosMRPageByDept", request)
                 || matchers("/print/export/leaveHosMrPageExportByDept", request)
+                || matchers("/consoleByDept/qcCheckStatisticsByDept", request)
+                || matchers("/print/export/qcCheckStaExportByDept", request)
                 || matchers("/", request)) {
             return true;
         }

+ 89 - 0
src/main/java/com/diagbot/dto/ImproveByDeptDTO.java

@@ -0,0 +1,89 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/7/6 20:03
+ */
+@Getter
+@Setter
+public class ImproveByDeptDTO {
+    /**
+     * 科室编码
+     */
+    private String deptId;
+
+    /**
+     * 主治医生
+     */
+    @Excel(name = "主治医生", width = 30)
+    private String doctorName;
+    /**
+     * 质控总数(总病历数)
+     */
+    @Excel(name = "质控总数", width = 10)
+    private Integer mrNum = 0;
+    /**
+     * 核查数量
+     */
+    @Excel(name = "核查数量", width = 10)
+    private Integer checkedNum = 0;
+    /**
+     * 核查占比
+     */
+    private Double checkedPercent = 0d;
+    /**
+     * 核查占比(百分比)
+     */
+    private String checkedPercentStr = "0.00%";
+    /**
+     * 有病案首页的病历数
+     */
+    private Integer homePageMRNum = 0;
+    /**
+     * 已改善数量
+     */
+    @Excel(name = "已改善数量", width = 10)
+    private Integer improveNum = 0;
+    /**
+     * 改善率
+     */
+    private Double improvePercent = 0d;
+    /**
+     * 改善率(百分比)
+     */
+    @Excel(name = "改善率", width = 10)
+    private String improvePercentStr = "0.00%";
+    /**
+     * 改善至合格数量
+     */
+    @Excel(name = "改善至合格数量", width = 15)
+    private Integer improveToPassNum = 0;
+    /**
+     * 改善至合格率
+     */
+    private Double improveToPassPercent = 0d;
+    /**
+     * 改善至合格率(百分比)
+     */
+    @Excel(name = "改善至合格率", width = 15)
+    private String improveToPassPercentStr = "0.00%";
+    /**
+     * 改善至满分数量
+     */
+    @Excel(name = "改善至满分数量", width = 15)
+    private Integer improveToFullNum = 0;
+    /**
+     * 改善至满分率
+     */
+    private Double improveToFullPercent = 0d;
+    /**
+     * 改善至满分率(百分比)
+     */
+    @Excel(name = "改善至满分率", width = 15)
+    private String improveToFullPercentStr = "0.00%";
+}

+ 26 - 0
src/main/java/com/diagbot/dto/ImproveExportByDeptDTO.java

@@ -0,0 +1,26 @@
+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:zhaops
+ * @time: 2020/7/6 20:03
+ */
+@Getter
+@Setter
+public class ImproveExportByDeptDTO {
+
+    /**
+     * 科室
+     */
+    @Excel(name = "科室", width = 30,needMerge = true)
+    private String deptName;
+    @ExcelCollection(name = "")
+    private List<ImproveByDeptDTO> improveByDeptDTOS;
+}

+ 20 - 0
src/main/java/com/diagbot/facade/ConsoleByDeptExportFacade.java

@@ -233,6 +233,26 @@ public class ConsoleByDeptExportFacade {
             ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportNinetyByDeptDTO.class, fileName, response);
         }
     }
+    /**
+     * 质控核查统计导出-科室
+     *
+     * @param filterOrderVO
+     * @return
+     */
+    public void qcCheckStaExportByDept(HttpServletResponse response, FilterOrderVO filterOrderVO) {
+        List<ImproveByDeptDTO> record =consoleByDeptFacade.qcCheckStatisticsByDept(filterOrderVO);
+        ArrayList<ImproveExportByDeptDTO> records = new ArrayList<>();
+        ImproveExportByDeptDTO improveExportByDeptDTO = new ImproveExportByDeptDTO();
+        if(ListUtil.isNotEmpty(record)){
+            improveExportByDeptDTO.setDeptName(filterOrderVO.getDeptName());
+            improveExportByDeptDTO.setImproveByDeptDTOS(record);
+            records.add(improveExportByDeptDTO);
+        }
+
+        String fileName = "质控核查统计.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", ImproveExportByDeptDTO.class, fileName, response, 12.8f);
+    }
+
 
 
 

+ 12 - 0
src/main/java/com/diagbot/facade/ConsoleByDeptFacade.java

@@ -740,4 +740,16 @@ public class ConsoleByDeptFacade {
         IPage<QcResultShortDTO> page = behospitalInfoFacade.leaveHosMRPageByDept(qcResultShortPageVO);
         return page;
     }
+
+    /**
+     * 质控核查统计-科室(内页)
+     *
+     * @param filterOrderVO
+     * @return
+     */
+    public List<ImproveByDeptDTO> qcCheckStatisticsByDept(FilterOrderVO filterOrderVO) {
+        filterFacade.filterOrderVOSet(filterOrderVO);
+        List<ImproveByDeptDTO> records = behospitalInfoFacade.qcCheckStatisticsByDept(filterOrderVO);
+        return records;
+    }
 }

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

@@ -349,6 +349,15 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @return
      */
     public List<HomePageImproveDTO> qcCheckStatistics(FilterOrderVO filterOrderVO);
+    /**
+     * 质控核查统计-科室(内页)
+     *
+     * @param filterOrderVO
+     * @return
+     */
+    public List<ImproveByDeptDTO> qcCheckStatisticsByDept(FilterOrderVO filterOrderVO);
+
+
 
     /**
      * 离院病人质控评分详情页导出到excel

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

@@ -329,6 +329,14 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      */
     public List<HomePageImproveDTO> qcCheckStatistics(FilterOrderVO filterOrderVO);
 
+    /**
+     * 质控核查统计-科室(内页)
+     *
+     * @param filterOrderVO
+     * @return
+     */
+    public List<ImproveByDeptDTO> qcCheckStatisticsByDept(FilterOrderVO filterOrderVO);
+
     /**
      * 离院病人质控评分详情页导出到excel
      *

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

@@ -461,6 +461,17 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.qcCheckStatistics(filterOrderVO);
     }
 
+    /**
+     * 质控核查统计-科室(内页)
+     *
+     * @param filterOrderVO
+     * @return
+     */
+    @Override
+    public List<ImproveByDeptDTO> qcCheckStatisticsByDept(FilterOrderVO filterOrderVO) {
+        return baseMapper.qcCheckStatisticsByDept(filterOrderVO);
+    }
+
     /**
      * 离院病人质控评分详情页导出到excel
      *

+ 19 - 0
src/main/java/com/diagbot/web/ConsoleByDeptController.java

@@ -331,5 +331,24 @@ public class ConsoleByDeptController {
     public RespDTO<IPage<QcResultShortDTO>> leaveHosMRPageByDept(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
         return RespDTO.onSuc(consoleByDeptFacade.leaveHosMRPageByDept(qcResultShortPageVO));
     }
+
+    /**
+     * 质控核查统计-科室
+     *
+     * @param filterOrderVO
+     * @return
+     */
+    @ApiOperation(value = "质控核查统计-科室[by:cy]",
+            notes = "name: 科室名称 <br>" +
+                    "asc: 排序(升序) <br>" +
+                    "desc:排序(降序) <br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/qcCheckStatisticsByDept")
+    @SysLogger("qcCheckStatisticsByDept")
+    public RespDTO<List<ImproveByDeptDTO>> qcCheckStatisticsByDept(@RequestBody @Valid FilterOrderVO filterOrderVO) {
+        return RespDTO.onSuc(consoleByDeptFacade.qcCheckStatisticsByDept(filterOrderVO));
+    }
     //endregion -----------------------内页接口结束------------------------------
 }

+ 19 - 0
src/main/java/com/diagbot/web/ConsoleByDeptExportController.java

@@ -232,6 +232,25 @@ public class ConsoleByDeptExportController {
         consoleByDeptExportFacade.leaveHosMrPageExportByDept(response, qcResultShortPageVO);
     }
 
+    /**
+     * 质控核查统计导出
+     *
+     * @param filterOrderVO
+     * @return
+     */
+    @ApiOperation(value = "质控核查统计导出[by:cy]",
+            notes = "name: 科室名称 <br>" +
+                    "asc: 排序(升序) <br>" +
+                    "desc:排序(降序) <br>" +
+                    "startDate: 起始时间 <br>" +
+                    "endDate: 截止时间 <br>" +
+                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
+    @PostMapping("/qcCheckStaExportByDept")
+    @SysLogger("qcCheckStaExportByDept")
+    public void qcCheckStaExportByDept(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
+        consoleByDeptExportFacade.qcCheckStaExportByDept(response, filterOrderVO);
+    }
+
 /**
      * 病历稽查统计(首页)
      * @param filterVO

+ 359 - 0
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -7208,6 +7208,365 @@
         </if>
     </select>
 
+    <!-- 质控核查统计-科室(内页)-->
+    <select id="qcCheckStatisticsByDept" parameterType="com.diagbot.vo.FilterOrderVO" resultType="com.diagbot.dto.ImproveByDeptDTO">
+        SELECT
+        t.*
+        FROM
+        (SELECT
+        mr.beh_dept_id AS deptId,
+        mr.beh_dept_name AS deptName,
+        mr.doctorId,
+        mr.doctorName,
+        IFNULL( mr.mrNum, 0 ) AS mrNum,
+        ck.checkedNum AS checkedNum,
+        ROUND( ck.checkedNum / mr.mrNum, 4 ) AS checkedPercent,
+        CONCAT( ROUND( ck.checkedNum / mr.mrNum * 100, 2 ), '%' ) AS checkedPercentStr,
+        hmmr_t.homePageMRNum,
+        improve_t.improveNum,
+        round( improve_t.improveNum / hmmr_t.homePageMRNum, 4 ) AS improvePercent,
+        Concat( round( improve_t.improveNum / hmmr_t.homePageMRNum * 100, 2 ), '%' ) AS improvePercentStr,
+        improve_t.improveToPassNum,
+        round( improve_t.improveToPassNum / hmmr_t.homePageMRNum, 4 ) AS improveToPassPercent,
+        Concat( round( improve_t.improveToPassNum / hmmr_t.homePageMRNum * 100, 2 ), '%' ) AS improveToPassPercentStr,
+        improve_t.improveToFullNum,
+        round( improve_t.improveToFullNum / hmmr_t.homePageMRNum, 4 ) AS improveToFullPercent,
+        Concat( round( improve_t.improveToFullNum / hmmr_t.homePageMRNum * 100, 2 ), '%' ) AS improveToFullPercentStr
+        FROM
+        (
+        SELECT
+        a.beh_dept_id,
+        a.beh_dept_name,
+        a.doctor_id as doctorId,
+        a.doctor_name as doctorName,
+        count(*) AS mrNum
+        FROM
+        med_behospital_info a,
+        med_qcresult_info b,
+        sys_user_dept c
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND a.hospital_id = b.hospital_id
+        AND a.hospital_id = c.hospital_id
+        AND a.beh_dept_id = c.dept_id
+        AND a.behospital_code = b.behospital_code
+        AND a.qc_type_id != 0
+        <if test="userId!=null">
+            AND c.user_id = #{userId}
+        </if>
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        <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="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+        </if>
+        GROUP BY
+        a.doctor_id,
+        a.doctor_name
+        ) mr
+        LEFT JOIN (
+        SELECT
+        a.beh_dept_id,
+        a.beh_dept_name,
+        a.doctor_id as doctorId,
+        a.doctor_name as doctorName,
+        count(*) AS checkedNum
+        FROM
+        med_behospital_info a,
+        med_qcresult_info b,
+        med_check_info c,
+        sys_user_dept d
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.hospital_id = b.hospital_id
+        AND a.hospital_id = c.hospital_id
+        AND a.hospital_id = d.hospital_id
+        AND a.behospital_code = b.behospital_code
+        AND a.behospital_code = c.behospital_code
+        AND a.beh_dept_id = d.dept_id
+        AND a.qc_type_id != 0
+        AND ifnull(c.`status`,0) = 1
+        AND c.check_type = 0
+        <if test="userId!=null">
+            AND d.user_id = #{userId}
+        </if>
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        <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="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+        </if>
+        GROUP BY
+        a.doctor_id,
+        a.doctor_name
+        ) ck ON mr.doctorId = ck.doctorId
+        AND mr.doctorName = ck.doctorName
+        LEFT JOIN (
+        SELECT
+        a.beh_dept_id,
+        a.beh_dept_name,
+        a.doctor_id as doctorId,
+        a.doctor_name as doctorName,
+        count( DISTINCT a.behospital_code ) AS homePageMRNum
+        FROM
+        med_behospital_info a,
+        med_home_page b,
+        med_qcresult_info c,
+        sys_user_dept d
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.hospital_id = b.hospital_id
+        AND a.hospital_id = c.hospital_id
+        AND a.hospital_id = d.hospital_id
+        AND a.behospital_code = b.behospital_code
+        AND a.behospital_code = c.behospital_code
+        AND a.beh_dept_id = d.dept_id
+        AND a.qc_type_id != 0
+        <if test="userId!=null">
+            AND d.user_id = #{userId}
+        </if>
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
+        <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="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+        </if>
+        GROUP BY
+        a.doctor_id,
+        a.doctor_name
+        ) hmmr_t ON mr.doctorId = hmmr_t.doctorId
+        AND mr.doctorName = hmmr_t.doctorName
+        LEFT JOIN (
+        SELECT
+        a.beh_dept_id,
+        a.beh_dept_name,
+        a.doctor_id as doctorId,
+        a.doctor_name as doctorName,
+        <![CDATA[sum( e.`level` = '不合格' AND d.`level` = '合格' AND d.score_res < 20 ) AS improveToPassNum,]]>
+        sum( d.score_res = 20 ) AS improveToFullNum,
+        count(*) AS improveNum
+        FROM
+        med_behospital_info a,
+        med_home_page b,
+        med_qcresult_info c,
+        med_qcresult_cases d,
+        sys_user_dept f,
+        (
+        SELECT
+        m4.*
+        FROM
+        med_behospital_info m1,
+        med_home_page m2,
+        med_qcresult_info m3,
+        med_qcresult_cases m4
+        WHERE
+        m1.is_deleted = 'N'
+        AND m2.is_deleted = 'N'
+        AND m3.is_deleted = 'Y'
+        AND m4.is_deleted = 'Y'
+        AND m1.hospital_id = m2.hospital_id
+        AND m1.hospital_id = m3.hospital_id
+        AND m1.hospital_id = m4.hospital_id
+        AND m1.behospital_code = m2.behospital_code
+        AND m1.behospital_code = m3.behospital_code
+        AND m1.behospital_code = m4.behospital_code
+        AND m3.gmt_create = m4.gmt_create
+        AND m3.have_home_page = 1
+        AND m4.cases_id = 243
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and m1.is_placefile = #{isPlacefile}
+        </if>
+        AND m1.qc_type_id != 0
+        <if test="hospitalId != null and hospitalId != ''">
+            AND m1.hospital_id = #{hospitalId}
+        </if>
+        <if test="isPlacefile != null and isPlacefile == 0">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND m1.behospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND m1.behospital_date <= #{endDate}]]>
+            </if>
+        </if>
+        <if test="isPlacefile != null and isPlacefile == 1">
+            <if test="startDate != null and startDate != ''">
+                <![CDATA[ AND m1.leave_hospital_date >= #{startDate}]]>
+            </if>
+            <if test="endDate != null and endDate != ''">
+                <![CDATA[ AND m1.leave_hospital_date <= #{endDate}]]>
+            </if>
+        </if>
+        <if test="deptName != null and deptName != ''">
+            and m1.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+        </if>
+        GROUP BY
+        m1.behospital_code
+        ORDER BY
+        m1.behospital_code,
+        m4.gmt_create
+        ) e
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND f.is_deleted = 'N'
+        AND a.hospital_id = b.hospital_id
+        AND a.hospital_id = c.hospital_id
+        AND a.hospital_id = d.hospital_id
+        AND a.hospital_id = e.hospital_id
+        AND a.hospital_id = f.hospital_id
+        AND a.behospital_code = b.behospital_code
+        AND a.behospital_code = c.behospital_code
+        AND a.behospital_code = d.behospital_code
+        AND a.behospital_code = e.behospital_code
+        AND a.beh_dept_id = f.dept_id
+        <if test="userId!=null">
+            AND f.user_id = #{userId}
+        </if>
+        AND d.cases_id = 243
+        AND d.score_res > e.score_res
+        <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="deptName != null and deptName != ''">
+            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+        </if>
+        GROUP BY
+        a.doctor_id,
+        a.doctor_name
+        ) improve_t ON mr.doctorId = improve_t.doctorId
+        AND mr.doctorName = improve_t.doctorName
+        ) t
+        <if test="asc != null and asc !=''">
+            order by
+            <choose>
+                <when test='asc=="deptId"'>deptId asc</when>
+                <when test='asc=="deptName"'>deptName asc</when>
+                <when test='asc=="doctorName"'>doctorName asc</when>
+                <when test='asc=="mrNum"'>mrNum asc</when>
+                <when test='asc=="checkedNum"'>checkedNum asc</when>
+                <when test='asc=="checkedPercent"'>checkedPercent asc</when>
+                <when test='asc=="checkedPercentStr"'>checkedPercent asc</when>
+                <when test='asc=="homePageMRNum"'>homePageMRNum asc</when>
+                <when test='asc=="improveNum"'>improveNum asc</when>
+                <when test='asc=="improvePercent"'>improvePercent asc</when>
+                <when test='asc=="improvePercentStr"'>improvePercent asc</when>
+                <when test='asc=="improveToPassNum"'>improveToPassNum asc</when>
+                <when test='asc=="improveToPassPercent"'>improveToPassPercent asc</when>
+                <when test='asc=="improveToPassPercentStr"'>improveToPassPercent asc</when>
+                <when test='asc=="improveToFullNum"'>improveToFullNum asc</when>
+                <when test='asc=="improveToFullPercent"'>improveToFullPercent asc</when>
+                <when test='asc=="improveToFullPercentStr"'>improveToFullPercent asc</when>
+                <otherwise>doctorName asc</otherwise>
+            </choose>
+        </if>
+        <if test="desc != null and desc!=''">
+            order by
+            <choose>
+                <when test='desc=="deptId"'>deptId desc</when>
+                <when test='desc=="deptName"'>deptName desc</when>
+                <when test='desc=="doctorName"'>doctorName desc</when>
+                <when test='desc=="mrNum"'>mrNum desc</when>
+                <when test='desc=="checkedNum"'>checkedNum desc</when>
+                <when test='desc=="checkedPercent"'>checkedPercent desc</when>
+                <when test='desc=="checkedPercentStr"'>checkedPercent desc</when>
+                <when test='desc=="homePageMRNum"'>homePageMRNum desc</when>
+                <when test='desc=="improveNum"'>improveNum desc</when>
+                <when test='desc=="improvePercent"'>improvePercent desc</when>
+                <when test='desc=="improvePercentStr"'>improvePercent desc</when>
+                <when test='desc=="improveToPassNum"'>improveToPassNum desc</when>
+                <when test='desc=="improveToPassPercent"'>improveToPassPercent desc</when>
+                <when test='desc=="improveToPassPercentStr"'>improveToPassPercent desc</when>
+                <when test='desc=="improveToFullNum"'>improveToFullNum desc</when>
+                <when test='desc=="improveToFullPercent"'>improveToFullPercent desc</when>
+                <when test='desc=="improveToFullPercentStr"'>improveToFullPercent desc</when>
+                <otherwise>deptName desc</otherwise>
+            </choose>
+        </if>
+    </select>
+
     <!-- 离院病人评分详情页导出-->
     <select id="leaveHosMRPageExport" resultMap="ExportExcelMap">
         SELECT