Przeglądaj źródła

无用代码删除-2

wanghn 3 miesięcy temu
rodzic
commit
49ae2f74eb

+ 0 - 98
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -103,26 +103,6 @@ public class ConsoleExportFacade {
         ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", EntryNumDTO.class, fileName, response, 12.8f);
     }
 
-    /**
-     * 稽查统计导出(首页)
-     *
-     * @param filterVO
-     * @return
-     */
-    public void medicalCheckExport(HttpServletResponse response, FilterMedicalCheckVO filterVO) {
-        filterVO.setCurrent(1L);
-        filterVO.setSize(Long.MAX_VALUE);
-        filterVO.setSearchCount(false);
-        String fileName = null;
-        if ( "1".equals(filterVO.getIsPlacefile())) {
-            fileName = "终末病历稽查表.xls";
-        } else {
-            fileName = "运行病历稽查表.xls";
-        }
-        List<MedicalCheckExportDTO> records = consoleFacade.medicalCheckExport(filterVO);
-        ExcelUtils.exportExcel(records, null, "sheet1", MedicalCheckExportDTO.class, fileName, response, 15.8f);
-    }
-
     /**
      * 各科室缺陷占比(组合)
      *
@@ -471,50 +451,6 @@ public class ConsoleExportFacade {
         }
    }
 
-    /**
-     * 未整改病历统计导出
-     *
-     * @param response
-     * @param filterUnModifyMRVO
-     */
-    public void unModifyMRStatisticsExport(HttpServletResponse response, FilterUnModifyMRVO filterUnModifyMRVO) {
-        filterFacade.filterUnModifyMRVOSet(filterUnModifyMRVO);
-        List<ExcelExportEntity> colList = Lists.newLinkedList();
-        ExcelExportEntity deptNameCol = new ExcelExportEntity("科室", "deptName");
-        deptNameCol.setWidth(50);
-        colList.add(deptNameCol);
-
-        QueryWrapper<SysHospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
-        hospitalSetQueryWrapper.eq("is_deleted", 'N')
-                .eq("hospital_id", filterUnModifyMRVO.getHospitalId())
-                .eq("code", "unmodify_mr_entry");
-        SysHospitalSet hospitalSet = sysHospitalSetFacade.getOne(hospitalSetQueryWrapper);
-        //缺陷条目未维护
-        if (hospitalSet == null || StringUtil.isBlank(hospitalSet.getValue())) {
-            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "未整改病历条目未设置");
-        }
-
-        List<String> columnSet = Arrays.asList(hospitalSet.getValue().split(","));
-        for (String valueStr : columnSet) {
-            if (StringUtil.isBlank(valueStr)) {
-                continue;
-            }
-            String[] keyValue = valueStr.split("--");
-            if (keyValue != null && keyValue.length > 1) {
-                ExcelExportEntity entryCol = new ExcelExportEntity(keyValue[1], "entry_" + keyValue[0] + "_num");
-                entryCol.setWidth(20);
-                colList.add(entryCol);
-            }
-        }
-        UnModifyMRDTO unModifyMRDTO = consoleFacade.unModifyMRStatistics(filterUnModifyMRVO);
-        List<Object> data = Lists.newLinkedList();
-        if (unModifyMRDTO != null && ListUtil.isNotEmpty(unModifyMRDTO.getData())) {
-            data = unModifyMRDTO.getData();
-        }
-        String fileName = "未整改病历统计.xls";
-        ExcelUtils.exportExcelDynamicCol(colList, data, null, "sheet1", fileName, response);
-    }
-
     /**
      * 31天再入院统计导出
      *
@@ -639,40 +575,6 @@ public class ConsoleExportFacade {
         }
     }
 
-
-    /**
-     * 病历质控报表分页导出
-     *
-     * @param behospitalPageVO
-     * @return
-     */
-    public void qualityControlExport(HttpServletResponse response, BehospitalPageVO behospitalPageVO) {
-        String hospitalId = SysUserUtils.getCurrentHospitalID();
-        behospitalPageVO.setHospitalId(Long.valueOf(hospitalId));
-
-    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天");
-    }
-
-        behospitalPageVO.setCurrent(1L);
-        behospitalPageVO.setSize(Long.MAX_VALUE);
-        behospitalPageVO.setSearchCount(false);
-      //  orderMethod(behospitalPageVO);
-
-        IPage<QualityControlDTO> page = consoleFacade.getQualityControlExport(behospitalPageVO);
-        List<QualityControlDTO> records = page.getRecords();
-
-        String fileName = "病历质控报表详情页.xls";
-        ExcelUtils.exportExcel(records, "病历质控报表", "sheet1", QualityControlDTO.class, fileName, response, 26.8f);
-    }
-
    static void orderMethod(BehospitalPageVO behospitalPageVO){
        List<?> orders = behospitalPageVO.getOrders();
        Boolean flag= false;

+ 0 - 80
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -2228,52 +2228,6 @@ public class ConsoleFacade {
         return records;
     }
 
-    /**
-     * 病历质控报表
-     *
-     * @param behospitalPageVO
-     * @return
-     */
-    public IPage<QualityControlDTO> getQualityControl(BehospitalPageVO behospitalPageVO) {
-        behospitalPageSet(behospitalPageVO);
-        IPage<QualityControlDTO> records = behospitalInfoFacade.getQualityControl(behospitalPageVO);
-        List<QualityControlDTO> qualityControlDTOs = records.getRecords();
-        CaseScoreVO caseScoreVO = new CaseScoreVO();
-        BeanUtil.copyProperties(behospitalPageVO, caseScoreVO);
-        List<CaseScoreDTO> caseScoreDTOS = behospitalInfoFacade.getQualityCaseSorce(caseScoreVO);
-        if (ListUtil.isNotEmpty(qualityControlDTOs)) {
-            qualityControlDTOs.forEach(qualityControlDTO -> {
-                if (ListUtil.isNotEmpty(caseScoreDTOS)) {
-                    AlgorithmVO algorithmVO = new AlgorithmVO();
-                    BeanUtil.copyProperties(behospitalPageVO, algorithmVO);
-                    algorithmVO.setType(0);
-                    List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<QcResultAlgVO>();
-                    for (CaseScoreDTO caseScoreDTO : caseScoreDTOS) {
-                        if (StringUtils.isNotEmpty(qualityControlDTO.getBehospitalCode()) &&
-                                StringUtils.isNotEmpty(caseScoreDTO.getBehospitalCode()) &&
-                                qualityControlDTO.getBehospitalCode().equals(caseScoreDTO.getBehospitalCode())) {
-                            QcResultAlgVO qcResultAlgVO = new QcResultAlgVO();
-                            BeanUtil.copyProperties(caseScoreDTO, qcResultAlgVO);
-                            qcResultAlgVO.setIsReject(Integer.valueOf(caseScoreDTO.getIsReject()));
-                            qcResultAlgVO.setScore(new BigDecimal(caseScoreDTO.getScore()));
-                            qcResultAlgVO.setCasesScore(new BigDecimal(caseScoreDTO.getCasesScore()));
-                            qcResultAlgVOList.add(qcResultAlgVO);
-                        }
-                    }
-                    algorithmVO.setType(0);
-                    algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
-                    getScoreForCx(algorithmVO, qualityControlDTO);
-                }
-                if (qualityControlDTO.getLevel().equals("未评分")) {
-                    QualityControlNullDTO qualityControlNullDTO = new QualityControlNullDTO();
-                    BeanUtil.copyProperties(qualityControlNullDTO, qualityControlDTO);
-                }
-            });
-        }
-        ;
-        return records;
-    }
-
     /**
      * 病历质控报表-科室
      *
@@ -3935,40 +3889,6 @@ public class ConsoleFacade {
     }
 
 
-    /**
-     * 病历稽查表
-     *
-     * @param filterVO
-     * @return
-     */
-    public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO) {
-        filterFacade.getMedicalCheckVOSet(filterVO);
-        //colums
-        QueryWrapper<SysHospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
-        hospitalSetQueryWrapper.eq("is_deleted", 'N')
-                .eq("hospital_id", filterVO.getHospitalId())
-                .eq("code", "medical_check_form");
-        SysHospitalSet hospitalSet = sysHospitalSetFacade.getOne(hospitalSetQueryWrapper);
-
-        //表头生成
-        List<String> columnSet = Arrays.asList(hospitalSet.getValue().split(","));
-
-        //目标条目
-        List<Long> casesEntryIds = Lists.newArrayList();
-        //遍历第一个条目
-        for (String valueStr : columnSet) {
-            if (StringUtil.isBlank(valueStr)) {
-                continue;
-            }
-            String[] keyValue = valueStr.split("--");
-            if (keyValue != null && keyValue.length > 1) {
-                casesEntryIds.add(Long.valueOf(keyValue[0]));
-            }
-        }
-        IPage<MedicalCheckDTO> medicalCheck = behospitalInfoFacade.getMedicalCheck(filterVO, casesEntryIds);
-        return medicalCheck;
-    }
-
     /**
      * 病历稽查表(title)
      *

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

@@ -145,14 +145,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public List<LevelStatisticsDTO> levelStatistics(FilterOrderVO filterOrderVO);
 
-    /**
-     * 病案首页合格率占比
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    public List<HomePageNumDTO> homePageLevelStatistics(FilterOrderVO filterOrderVO);
-
     /**
      * 病历质控报表--扣分项
      *

+ 1 - 7
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -183,15 +183,9 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.levelStatistics(filterOrderVO);
     }
 
-    /**
-     * 病案首页合格率占比
-     *
-     * @param filterOrderVO
-     * @return
-     */
     @Override
     public List<HomePageNumDTO> homePageLevelStatistics(FilterOrderVO filterOrderVO) {
-        return baseMapper.homePageLevelStatistics(filterOrderVO);
+        return Collections.emptyList();
     }
 
     /**

+ 0 - 74
src/main/java/com/diagbot/web/ConsoleController.java

@@ -486,44 +486,6 @@ public class ConsoleController {
         return RespDTO.onSuc(consoleFacade.levelStatisticsByDeptClass_TZ(filterOrderVO));
     }
 
-    /**
-     * 病案首页合格率占比
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    @ApiOperation(value = "病案首页合格率占比[by:zhaops]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
-                    "level: 病历等级 <br>" +
-                    "deptName: 科室名称 <br>" +
-                    "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
-    @PostMapping("/homePageLevelStatistics")
-    @SysLogger("homePageLevelStatistics")
-    public RespDTO<List<HomePageNumDTO>> homePageLevelStatistics(@RequestBody @Valid FilterOrderVO filterOrderVO) {
-        return RespDTO.onSuc(consoleFacade.homePageLevelStatistics(filterOrderVO));
-    }
-
-    /**
-     * 病历质控报表
-     *
-     * @param behospitalPageVO
-     * @return
-     */
-    @ApiOperation(value = "病历质控报表[by:cy]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
-                    "level: 病历等级 <br>" +
-                    "name: 科室名称 <br>" +
-                    "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
-    @PostMapping("/qualityControl")
-    @SysLogger("qualityControl")
-    public RespDTO<IPage<QualityControlDTO>> getQualityControl(@RequestBody BehospitalPageVO behospitalPageVO) {
-        return RespDTO.onSuc(consoleFacade.getQualityControl(behospitalPageVO));
-    }
-
     /**
      * 病案首页不合格数病历详情(内页)
      * @param qcResultPageVO
@@ -723,24 +685,6 @@ public class ConsoleController {
         return RespDTO.onSuc(consoleFacade.qcCheckStatistics(filterOrderVO));
     }
 
-    /**
-     * 未整改病历统计
-     *
-     * @param filterUnModifyMRVO
-     * @return
-     */
-    @ApiOperation(value = "未整改病历统计[by:zhaops]",
-            notes = "name: 科室名称 <br>" +
-                    "asc: 排序(升序) <br>" +
-                    "desc:排序(降序) <br>" +
-                    "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
-    @PostMapping("/unModifyMRStatistics")
-    @SysLogger("unModifyMRStatistics")
-    public RespDTO<UnModifyMRDTO> unModifyMRStatistics(@RequestBody @Valid FilterUnModifyMRVO filterUnModifyMRVO) {
-        return RespDTO.onSuc(consoleFacade.unModifyMRStatistics(filterUnModifyMRVO));
-    }
 
     /**
      * 未整改病历质控评分页(内页)
@@ -886,24 +830,6 @@ public class ConsoleController {
         return RespDTO.onSuc(consoleFacade.qcCheckMRPage(qcResultShortPageVO));
     }
 
-
-    /**
-     * 病历稽查表
-     * @param filterVO
-     * @return
-     */
-    @ApiOperation(value = "病历稽查统计[by:cy]",
-            notes = "name: 科室名称 <br>" +
-                    "asc: 排序(升序) <br>" +
-                    "desc:排序(降序) <br>" +
-                    "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
-    @PostMapping("/medicalCheckForm")
-    @SysLogger("medicalCheckForm")
-    public RespDTO<IPage<MedicalCheckDTO> > getMedicalCheck(@RequestBody @Valid FilterMedicalCheckVO filterVO) {
-        return RespDTO.onSuc(consoleFacade.getMedicalCheck(filterVO));
-    }
     /**
      * 病历稽查表(title)
      * @param

+ 0 - 73
src/main/java/com/diagbot/web/ConsoleExportController.java

@@ -37,25 +37,6 @@ public class ConsoleExportController {
     @Autowired
     private ConsoleExportFacade consoleExportFacade;
 
-    /**
-     * 病案首页合格率占比导出
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    @ApiOperation(value = "病案首页合格率占比导出[by:gaodm]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
-                    "level: 病历等级 <br>" +
-                    "name: 科室名称 <br>" +
-                    "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
-    @PostMapping("/homePageLevelExport")
-    @SysLogger("homePageLevelExport")
-    public void homePageLevelExport(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
-        consoleExportFacade.homePageLevelExport(response, filterOrderVO);
-    }
-
 
     /**
      * 条目缺陷占比(内页)
@@ -72,22 +53,6 @@ public class ConsoleExportController {
         consoleExportFacade.entryGroupByEntryExport(response, filterPageVO);
     }
 
-    /**
-     * 病历稽查统计(首页)
-     * @param filterVO
-     * @return
-     */
-    @ApiOperation(value = "病历稽查导出[by:cy]",
-            notes =  "name: 科室名称 <br>" +
-                    "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
-    @PostMapping("/medicalCheckExport")
-    @SysLogger("medicalCheckExport")
-    public void medicalCheckExport(HttpServletResponse response, @RequestBody @Valid FilterMedicalCheckVO filterVO) {
-        consoleExportFacade.medicalCheckExport(response, filterVO);
-    }
-
     /**
      * 各科室缺陷占比(组合)
      *
@@ -425,25 +390,6 @@ public class ConsoleExportController {
         consoleExportFacade.unModifyMRPageExport(response, qcResultShortPageVO);
     }
 
-    /**
-     * 未整改病历统计导出
-     *
-     * @param filterUnModifyMRVO
-     * @return
-     */
-    @ApiOperation(value = "未整改病历统计导出[by:zhaops]",
-            notes = "name: 科室名称 <br>" +
-                    "asc: 排序(升序) <br>" +
-                    "desc:排序(降序) <br>" +
-                    "startDate: 起始时间 <br>" +
-                    "endDate: 截止时间 <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
-    @PostMapping("/unModifyMRStatisticsExport")
-    @SysLogger("unModifyMRStatisticsExport")
-    public void unModifyMRStatisticsExport(HttpServletResponse response, @RequestBody @Valid FilterUnModifyMRVO filterUnModifyMRVO) {
-        consoleExportFacade.unModifyMRStatisticsExport(response, filterUnModifyMRVO);
-    }
-
     /**
      * 未整改病历统计导出
      * 31天再入院统计导出
@@ -524,23 +470,4 @@ public class ConsoleExportController {
         consoleExportFacade.qcCheckMRPageExport(response, qcResultShortPageVO);
     }
 
-
-    /**
-     * 病历质控报表分页导出
-     *
-     * @param behospitalPageVO
-     * @return
-     */
-    @ApiOperation(value = "病历质控报表导出[by:cy]",
-            notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
-                    "level: 病历等级 <br>" +
-                    "name: 科室名称 <br>" +
-                    "asc: 排序(升序) <br>" +
-                    "desc: 排序(降序) <br>" +
-                    "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")
-    @PostMapping("/qualityControlExport")
-    @SysLogger("qualityControlExport")
-    public void qualityControlExport(HttpServletResponse response, @RequestBody BehospitalPageVO behospitalPageVO) {
-        consoleExportFacade.qualityControlExport(response, behospitalPageVO);
-    }
 }

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

@@ -2471,278 +2471,6 @@
         </if>
     </select>
 
-    <!-- 病案首页合格率占比 -全院-->
-    <select id="homePageLevelStatistics" parameterType="com.diagbot.vo.FilterOrderVO"
-            resultType="com.diagbot.dto.HomePageNumDTO">
-        SELECT
-        t1.deptId,
-        t1.deptName,
-        t2.entryNum,
-        t1.mrNum,
-        t1.totleValue,
-        t1.averageValue,
-        t1.firstLevelNum,
-        t1.secondLevelNum,
-        t1.firstLevelPercent,
-        t1.secondLevelPercent,
-        t1.firstLevelPercentStr,
-        t1.secondLevelPercentStr,
-        t3.emptyNum,
-        t3.errorNum,
-        t3.entryTotleNum,
-        t3.emptyPercent,
-        t3.errorPercent,
-        t3.emptyPercentStr,
-        t3.errorPercentStr
-        FROM
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        count( * ) AS mrNum,
-        ROUND( sum( CAST( c.score_res AS DECIMAL ( 18, 2 )) ), 2 ) AS totleValue,
-        ROUND( avg( CAST( c.score_res AS DECIMAL ( 18, 2 )) ), 2 ) AS averageValue,
-        SUM( c.`level` = '合格' ) AS firstLevelNum,
-        SUM( c.`level` = '不合格' ) AS secondLevelNum,
-        ROUND( SUM( c.`level` = '合格' )/ count( * ), 4 ) AS firstLevelPercent,
-        ROUND( SUM( c.`level` = '不合格' )/ count( * ), 4 ) AS secondLevelPercent,
-        concat( ROUND( SUM( c.`level` = '合格' )/ count( * )* 100, 2 ),'%' ) AS firstLevelPercentStr,
-        concat( ROUND( SUM( c.`level` = '不合格' )/ count( * )* 100, 2 ),'%' ) AS secondLevelPercentStr
-        FROM
-        med_behospital_info a,
-        med_qcresult_cases c
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND c.cases_id = 243
-        <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="deptName != null and deptName != ''">
-            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) t1,
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        count( * ) AS entryNum
-        FROM
-        med_behospital_info a,
-        med_qcresult_cases c,
-        med_qcresult_detail d,
-        qc_cases_entry e
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND e.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.behospital_code = d.behospital_code
-        AND c.cases_id = d.cases_id
-        AND d.cases_id = e.cases_id
-        AND d.cases_entry_id = e.id
-        AND d.cases_id = 243
-        <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="deptName != null and deptName != ''">
-            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) t2,(
-        SELECT
-        h1.deptId,
-        h1.deptName,
-        h1.emptyNum,
-        h1.errorNum,
-        h1.mrNum,
-        h2.entryNum,
-        h1.mrNum * h2.entryNum AS entryTotleNum,
-        ROUND( ( h1.mrNum * h2.entryNum  - h1.emptyNum ) / ( h1.mrNum * h2.entryNum ), 4 ) AS emptyPercent,
-        ROUND( ( h1.mrNum * h2.entryNum  - h1.errorNum ) / ( h1.mrNum * h2.entryNum ), 4 ) AS errorPercent,
-        CONCAT( ROUND( ( h1.mrNum * h2.entryNum - h1.emptyNum ) / ( h1.mrNum * h2.entryNum )* 100, 2 ), '%' ) AS emptyPercentStr,
-        CONCAT( ROUND( ( h1.mrNum * h2.entryNum - h1.errorNum ) / ( h1.mrNum * h2.entryNum )* 100, 2 ), '%' ) AS errorPercentStr
-        FROM
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        sum( d.rule_type = 1 ) AS emptyNum,
-        sum( d.rule_type = 2 ) AS errorNum,
-        count( DISTINCT a.behospital_code ) AS mrNum
-        FROM
-        med_behospital_info a,
-        med_qcresult_cases b,
-        med_qcresult_detail c,
-        qc_cases_entry 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.behospital_code = b.behospital_code
-        AND a.behospital_code = c.behospital_code
-        AND b.cases_id = c.cases_id
-        AND c.cases_id = d.cases_id
-        AND c.cases_entry_id = d.id
-        <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
-        </if>
-        AND d.cases_id = 243
-        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 b.level = #{level}
-        </if>
-        <if test="deptName != null and deptName != ''">
-            and a.beh_dept_name like CONCAT('%',#{deptName},'%')
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) h1,(
-        SELECT
-        count(*) AS entryNum
-        FROM
-        qc_cases_entry
-        WHERE
-        is_deleted = 'N'
-        AND cases_id = 243
-        ) h2
-        ) t3
-        WHERE
-        t1.deptId = t2.deptId
-        AND t1.deptId = t3.deptId
-        AND t1.deptName = t2.deptName
-        AND t1.deptName = t3.deptName
-        <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=="entryNum"'>entryNum asc</when>
-                <when test='asc=="mrNum"'>mrNum asc</when>
-                <when test='asc=="totleValue"'>totleValue asc</when>
-                <when test='asc=="averageValue"'>averageValue asc</when>
-                <when test='asc=="firstLevelNum"'>firstLevelNum asc</when>
-                <when test='asc=="secondLevelNum"'>secondLevelNum asc</when>
-                <when test='asc=="firstLevelPercent"'>firstLevelPercent asc</when>
-                <when test='asc=="secondLevelPercent"'>secondLevelPercent asc</when>
-                <when test='asc=="firstLevelPercentStr"'>firstLevelPercent asc</when>
-                <when test='asc=="secondLevelPercentStr"'>secondLevelPercent asc</when>
-                <when test='asc=="emptyNum"'>emptyNum asc</when>
-                <when test='asc=="errorNum"'>errorNum asc</when>
-                <when test='asc=="entryTotleNum"'>entryTotleNum asc</when>
-                <when test='asc=="emptyPercent"'>emptyPercent asc</when>
-                <when test='asc=="errorPercent"'>errorPercent asc</when>
-                <when test='asc=="emptyPercentStr"'>emptyPercent asc</when>
-                <when test='asc=="errorPercentStr"'>errorPercent asc</when>
-                <otherwise>deptName 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=="entryNum"'>entryNum desc</when>
-                <when test='desc=="mrNum"'>mrNum desc</when>
-                <when test='desc=="totleValue"'>totleValue desc</when>
-                <when test='desc=="averageValue"'>averageValue desc</when>
-                <when test='desc=="firstLevelNum"'>firstLevelNum desc</when>
-                <when test='desc=="secondLevelNum"'>secondLevelNum desc</when>
-                <when test='desc=="firstLevelPercent"'>firstLevelPercent desc</when>
-                <when test='desc=="secondLevelPercent"'>secondLevelPercent desc</when>
-                <when test='desc=="firstLevelPercentStr"'>firstLevelPercent desc</when>
-                <when test='desc=="secondLevelPercentStr"'>secondLevelPercent desc</when>
-                <when test='desc=="emptyNum"'>emptyNum desc</when>
-                <when test='desc=="errorNum"'>errorNum desc</when>
-                <when test='desc=="entryTotleNum"'>entryTotleNum desc</when>
-                <when test='desc=="emptyPercent"'>emptyPercent desc</when>
-                <when test='desc=="errorPercent"'>errorPercent desc</when>
-                <when test='desc=="emptyPercentStr"'>emptyPercent desc</when>
-                <when test='desc=="errorPercentStr"'>errorPercent desc</when>
-                <otherwise>deptName desc</otherwise>
-            </choose>
-        </if>
-    </select>
-
     <!-- 各科室缺陷占比-科室 -->
     <select id="levelStatisticsByDept" parameterType="com.diagbot.vo.FilterOrderByDeptVO"
             resultType="com.diagbot.dto.LevelStsByDeptDTO">