Browse Source

1、统计接口取消病案首页关联
2、归档=1
3、死亡人数按病案首页归转情况统计

zhaops 5 years ago
parent
commit
d0ad55bcd5

+ 4 - 10
src/main/java/com/diagbot/aggregate/MrStatisticsAggregate.java

@@ -7,7 +7,6 @@ import com.diagbot.facade.QcresultInfoFacade;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.vo.FilterVO;
-import com.diagbot.vo.HomePageFilterVO;
 import com.diagbot.vo.QcresultFilterVO;
 import com.google.common.collect.Lists;
 import io.github.lvyahui8.spring.annotation.DataConsumer;
@@ -89,15 +88,10 @@ public class MrStatisticsAggregate {
         retMap.put("死亡人数", 0);
         retMap.put("新生儿人数", 0);
         retMap.put("手术病人数", 0);
-        HomePageFilterVO homePageFilterVO = new HomePageFilterVO();
-        BeanUtil.copyProperties(filterVO, homePageFilterVO);
-        Integer totleNum = behospitalInfoFacade.homePageCount(homePageFilterVO);
-        homePageFilterVO.setDeath(1);
-        Integer deathNum = behospitalInfoFacade.homePageCount(homePageFilterVO);
-        homePageFilterVO.setDeath(null);
-        homePageFilterVO.setNewBorn(1);
-        Integer newBornNum = behospitalInfoFacade.homePageCount(homePageFilterVO);
-        Integer operationNum = behospitalInfoFacade.homePageCountForOperation(filterVO);
+        Integer totleNum = behospitalInfoFacade.leaveHosCount(filterVO);
+        Integer deathNum = behospitalInfoFacade.deathCount(filterVO);
+        Integer newBornNum = behospitalInfoFacade.newBornCount(filterVO);
+        Integer operationNum = behospitalInfoFacade.operationCount(filterVO);
         retMap.put("总人数", totleNum);
         retMap.put("死亡人数", deathNum);
         retMap.put("新生儿人数", newBornNum);

+ 2 - 2
src/main/java/com/diagbot/aggregate/ResultStatisticsAggregate.java

@@ -151,7 +151,7 @@ public class ResultStatisticsAggregate {
     }
 
     /**
-     * 各科室缺陷占比
+     * 各科室缺陷占比-全院-首页
      *
      * @param filterVO
      * @return
@@ -159,7 +159,7 @@ public class ResultStatisticsAggregate {
     @DataProvider("entryByDept")
     public List<NumDTO> entryByDept(@InvokeParameter("filterVO") FilterVO filterVO) {
         Integer limitCount = filterVO.getLimitCount();
-        List<NumDTO> numDTOList = behospitalInfoFacade.resultStatisticsByDept2(filterVO);
+        List<NumDTO> numDTOList = behospitalInfoFacade.entryByDept(filterVO);
         if (ListUtil.isNotEmpty(numDTOList)) {
             int totle = numDTOList
                     .stream()

+ 8 - 7
src/main/java/com/diagbot/facade/ConsoleByDeptFacade.java

@@ -15,7 +15,6 @@ import com.diagbot.util.SysUserUtils;
 import com.diagbot.vo.FilterOrderByDeptVO;
 import com.diagbot.vo.FilterPageByDeptVO;
 import com.diagbot.vo.FilterVO;
-import com.diagbot.vo.HomePageFilterVO;
 import com.diagbot.vo.QcresultFilterVO;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -68,26 +67,28 @@ public class ConsoleByDeptFacade {
         filterVO.setUserId(Long.valueOf(userId));
         filterVO.setStartDate(startDate);
         filterVO.setEndDate(endDate);
-        HomePageFilterVO homePageFilterVO = new HomePageFilterVO();
-        BeanUtil.copyProperties(filterVO, homePageFilterVO);
         //关联科室
         Map<String, Object> deptMap = getDeptByUser(filterVO);
         if (deptMap == null) {
             return retMap;
         }
         //出院总人数
-        List<NumDTO> totleNumList = behospitalInfoFacade.homePageCountByDept(homePageFilterVO);
+        List<NumDTO> totleNumList = behospitalInfoFacade.leaveHosCountByDept(filterVO);
         Map<String, NumDTO> totleMap = ListUtil.isEmpty(totleNumList)
                 ? new HashMap<>()
                 : EntityUtil.makeEntityMap(totleNumList, "name");
+        //新生儿人数
+        List<NumDTO> newBornNumList = behospitalInfoFacade.newBornCountByDept(filterVO);
+        Map<String, NumDTO> newBornMap = ListUtil.isEmpty(newBornNumList)
+                ? new HashMap<>()
+                : EntityUtil.makeEntityMap(newBornNumList, "name");
         //死亡人数
-        homePageFilterVO.setDeath(1);
-        List<NumDTO> deathNumList = behospitalInfoFacade.homePageCountByDept(homePageFilterVO);
+        List<NumDTO> deathNumList = behospitalInfoFacade.deathCountByDept(filterVO);
         Map<String, NumDTO> deathMap = ListUtil.isEmpty(deathNumList)
                 ? new HashMap<>()
                 : EntityUtil.makeEntityMap(deathNumList, "name");
         //手术人数
-        List<NumDTO> operationNumList = behospitalInfoFacade.homePageCountForOperationByDept(filterVO);
+        List<NumDTO> operationNumList = behospitalInfoFacade.operationCountByDept(filterVO);
         Map<String, NumDTO> operationMap = ListUtil.isEmpty(operationNumList)
                 ? new HashMap<>()
                 : EntityUtil.makeEntityMap(operationNumList, "name");

+ 34 - 27
src/main/java/com/diagbot/mapper/BehospitalInfoMapper.java

@@ -16,9 +16,8 @@ import com.diagbot.vo.FilterOrderVO;
 import com.diagbot.vo.FilterPageByDeptVO;
 import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterVO;
-import com.diagbot.vo.HomePageFilterVO;
-import org.apache.ibatis.annotations.Param;
 import com.diagbot.vo.TaskVO;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -39,82 +38,90 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
     public List<MsgDTO> getMsgByEntryCode(AnalyzeCodeVO analyzeCodeVO);
 
     /**
-     * 缺陷排行列表统计
+     * 各科室缺陷占比-全院-首页
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> resultStatistics(FilterVO filterVO);
+    public List<NumDTO> entryByDept(FilterVO filterVO);
 
     /**
-     * 各科室缺陷占比
+     * 质控结果缺陷总数查询
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> resultStatisticsByDept(FilterVO filterVO);
+    public int getTotleResultNum(FilterVO filterVO);
+
+    public List<BehospitalInfo> getNoGrade(TaskVO taskVO);
+
+    IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO);
+
+    IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO);
 
     /**
-     * 缺陷排行列表统计-百分比未计算
+     * 出院总人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> resultStatistics2(FilterVO filterVO);
+    public int leaveHosCount(FilterVO filterVO);
 
     /**
-     * 各科室缺陷占比-百分比未计算
+     * 新生儿出院人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> resultStatisticsByDept2(FilterVO filterVO);
+    public int newBornCount(FilterVO filterVO);
 
     /**
-     * 缺陷总数
+     * 死亡人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    public int getTotleResultNum(FilterVO filterVO);
-
-    public List<BehospitalInfo> getNoGrade(TaskVO taskVO);
-
-    IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO);
+    public int deathCount(FilterVO filterVO);
 
-    IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO);
+    /**
+     * 手术人数统计-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationCount(FilterVO filterVO);
 
     /**
-     * 病案首页相关病历数统计
+     * 出院总人数统计-科室-首页
      *
-     * @param homePageFilterVO
+     * @param filterVO
      * @return
      */
-    public int homePageCount(HomePageFilterVO homePageFilterVO);
+    public List<NumDTO> leaveHosCountByDept(FilterVO filterVO);
 
     /**
-     * 手术病历数统计
+     * 新生儿出院人数统计-科室-首页
      *
      * @param filterVO
      * @return
      */
-    public int homePageCountForOperation(FilterVO filterVO);
+    public List<NumDTO> newBornCountByDept(FilterVO filterVO);
 
     /**
-     * 按科室统计病案首页病历数
+     * 死亡人数统计-科室-首页
      *
-     * @param homePageFilterVO
+     * @param filterVO
      * @return
      */
-    public List<NumDTO> homePageCountByDept(HomePageFilterVO homePageFilterVO);
+    public List<NumDTO> deathCountByDept(FilterVO filterVO);
 
     /**
-     * 按科室统计病案首页手术病历数
+     * 手术人数统计-科室-首页
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> homePageCountForOperationByDept(FilterVO filterVO);
+    public List<NumDTO> operationCountByDept(FilterVO filterVO);
 
     /**
      * 各科室缺陷占比排行(分页)

+ 35 - 28
src/main/java/com/diagbot/service/BehospitalInfoService.java

@@ -16,9 +16,8 @@ import com.diagbot.vo.FilterOrderVO;
 import com.diagbot.vo.FilterPageByDeptVO;
 import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterVO;
-import com.diagbot.vo.HomePageFilterVO;
-import org.apache.ibatis.annotations.Param;
 import com.diagbot.vo.TaskVO;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -39,83 +38,91 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
     public List<MsgDTO> getMsgByEntryCode(AnalyzeCodeVO analyzeCodeVO);
 
     /**
-     * 缺陷排行列表统计
+     * 各科室缺陷占比-全院-首页
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> resultStatistics(FilterVO filterVO);
+    public List<NumDTO> entryByDept(FilterVO filterVO);
 
     /**
-     * 各科室缺陷占比
+     * 质控结果缺陷总数查询
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> resultStatisticsByDept(FilterVO filterVO);
+    public int getTotleResultNum(FilterVO filterVO);
+
+
+    public List<BehospitalInfo> getNoGrade(TaskVO taskVO);
+
+    IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO);
+
+    IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO);
 
     /**
-     * 缺陷排行列表统计-百分比未计算
+     * 出院总人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> resultStatistics2(FilterVO filterVO);
+    public int leaveHosCount(FilterVO filterVO);
 
     /**
-     * 各科室缺陷占比-百分比未计算
+     * 新生儿出院人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> resultStatisticsByDept2(FilterVO filterVO);
+    public int newBornCount(FilterVO filterVO);
 
     /**
-     * 缺陷总数
+     * 死亡人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    public int getTotleResultNum(FilterVO filterVO);
-
+    public int deathCount(FilterVO filterVO);
 
-    public List<BehospitalInfo> getNoGrade(TaskVO taskVO);
-
-    IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO);
-
-    IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO);
+    /**
+     * 手术人数统计-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationCount(FilterVO filterVO);
 
     /**
-     * 病案首页相关病历数统计
+     * 出院总人数统计-科室-首页
      *
-     * @param homePageFilterVO
+     * @param filterVO
      * @return
      */
-    public int homePageCount(HomePageFilterVO homePageFilterVO);
+    public List<NumDTO> leaveHosCountByDept(FilterVO filterVO);
 
     /**
-     * 手术病历数统计
+     * 新生儿出院人数统计-科室-首页
      *
      * @param filterVO
      * @return
      */
-    public int homePageCountForOperation(FilterVO filterVO);
+    public List<NumDTO> newBornCountByDept(FilterVO filterVO);
 
     /**
-     * 按科室统计病案首页病历数
+     * 死亡人数统计-科室-首页
      *
-     * @param homePageFilterVO
+     * @param filterVO
      * @return
      */
-    public List<NumDTO> homePageCountByDept(HomePageFilterVO homePageFilterVO);
+    public List<NumDTO> deathCountByDept(FilterVO filterVO);
 
     /**
-     * 按科室统计病案首页手术病历数
+     * 手术人数统计-科室-首页
      *
      * @param filterVO
      * @return
      */
-    public List<NumDTO> homePageCountForOperationByDept(FilterVO filterVO);
+    public List<NumDTO> operationCountByDept(FilterVO filterVO);
 
     /**
      * 各科室缺陷占比排行(分页)

+ 52 - 50
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -18,7 +18,6 @@ import com.diagbot.vo.FilterOrderVO;
 import com.diagbot.vo.FilterPageByDeptVO;
 import com.diagbot.vo.FilterPageVO;
 import com.diagbot.vo.FilterVO;
-import com.diagbot.vo.HomePageFilterVO;
 import com.diagbot.vo.TaskVO;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Service;
@@ -52,117 +51,120 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
     }
 
     /**
-     * 缺陷排行列表统计
+     * 各科室缺陷占比-全院-首页
      *
      * @param filterVO
      * @return
      */
     @Override
-    public List<NumDTO> resultStatistics(FilterVO filterVO) {
-        return baseMapper.resultStatistics(filterVO);
+    public List<NumDTO> entryByDept(FilterVO filterVO) {
+        return baseMapper.entryByDept(filterVO);
     }
 
     /**
-     * 各科室缺陷占比
+     * 质控结果缺陷总数查询
      *
      * @param filterVO
      * @return
      */
     @Override
-    public List<NumDTO> resultStatisticsByDept(FilterVO filterVO) {
-        return baseMapper.resultStatisticsByDept(filterVO);
+    public int getTotleResultNum(FilterVO filterVO) {
+        return baseMapper.getTotleResultNum(filterVO);
+    }
+
+    @Override
+    public List<BehospitalInfo> getNoGrade(TaskVO taskVO) {
+        return baseMapper.getNoGrade(taskVO);
+    }
+
+    @Override
+    public IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO) {
+        return baseMapper.getPageByDept(behospitalPageVO);
+    }
+
+    @Override
+    public IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO) {
+        return baseMapper.getPageByPerson(behospitalPageVO);
     }
 
     /**
-     * 缺陷排行列表统计-百分比未计算
+     * 出院总人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    @Override
-    public List<NumDTO> resultStatistics2(FilterVO filterVO) {
-        return baseMapper.resultStatistics2(filterVO);
+    public int leaveHosCount(FilterVO filterVO) {
+        return baseMapper.leaveHosCount(filterVO);
     }
 
     /**
-     * 各科室缺陷占比-百分比未计算
+     * 新生儿出院人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    @Override
-    public List<NumDTO> resultStatisticsByDept2(FilterVO filterVO) {
-        return baseMapper.resultStatisticsByDept2(filterVO);
+    public int newBornCount(FilterVO filterVO) {
+        return baseMapper.newBornCount(filterVO);
     }
 
     /**
-     * 缺陷总数
+     * 死亡人数统计-全院-首页
      *
      * @param filterVO
      * @return
      */
-    @Override
-    public int getTotleResultNum(FilterVO filterVO) {
-        return baseMapper.getTotleResultNum(filterVO);
-    }
-
-    @Override
-    public List<BehospitalInfo> getNoGrade(TaskVO taskVO) {
-        return baseMapper.getNoGrade(taskVO);
-    }
-
-    @Override
-    public IPage<BehospitalInfoDTO> getPageByDept(BehospitalPageVO behospitalPageVO) {
-        return baseMapper.getPageByDept(behospitalPageVO);
+    public int deathCount(FilterVO filterVO) {
+        return baseMapper.deathCount(filterVO);
     }
 
-    @Override
-    public IPage<BehospitalInfoDTO> getPageByPerson(BehospitalPageVO behospitalPageVO) {
-        return baseMapper.getPageByPerson(behospitalPageVO);
+    /**
+     * 手术人数统计-全院-首页
+     *
+     * @param filterVO
+     * @return
+     */
+    public int operationCount(FilterVO filterVO) {
+        return baseMapper.operationCount(filterVO);
     }
 
     /**
-     * 病案首页相关病历数统计
+     * 出院总人数统计-科室-首页
      *
-     * @param homePageFilterVO
+     * @param filterVO
      * @return
      */
-    @Override
-    public int homePageCount(HomePageFilterVO homePageFilterVO) {
-        return baseMapper.homePageCount(homePageFilterVO);
+    public List<NumDTO> leaveHosCountByDept(FilterVO filterVO) {
+        return baseMapper.leaveHosCountByDept(filterVO);
     }
 
     /**
-     * 手术病历数统计
+     * 新生儿出院人数统计-科室-首页
      *
      * @param filterVO
      * @return
      */
-    @Override
-    public int homePageCountForOperation(FilterVO filterVO) {
-        return baseMapper.homePageCountForOperation(filterVO);
+    public List<NumDTO> newBornCountByDept(FilterVO filterVO) {
+        return baseMapper.newBornCountByDept(filterVO);
     }
 
     /**
-     * 按科室统计病案首页病历数
+     * 死亡人数统计-科室-首页
      *
-     * @param homePageFilterVO
+     * @param filterVO
      * @return
      */
-    @Override
-    public List<NumDTO> homePageCountByDept(HomePageFilterVO homePageFilterVO) {
-        return baseMapper.homePageCountByDept(homePageFilterVO);
+    public List<NumDTO> deathCountByDept(FilterVO filterVO) {
+        return baseMapper.deathCountByDept(filterVO);
     }
 
     /**
-     * 按科室统计病案首页手术病历数
+     * 手术人数统计-科室-首页
      *
      * @param filterVO
      * @return
      */
-    @Override
-    public List<NumDTO> homePageCountForOperationByDept(FilterVO filterVO) {
-        return baseMapper.homePageCountForOperationByDept(filterVO);
+    public List<NumDTO> operationCountByDept(FilterVO filterVO) {
+        return baseMapper.operationCountByDept(filterVO);
     }
 
     /**

+ 0 - 23
src/main/java/com/diagbot/vo/HomePageFilterVO.java

@@ -1,23 +0,0 @@
-package com.diagbot.vo;
-
-import lombok.Getter;
-import lombok.Setter;
-
-/**
- * @Description:
- * @Author:zhaops
- * @time: 2020/5/6 11:29
- */
-@Getter
-@Setter
-public class HomePageFilterVO extends FilterVO {
-    /**
-     * 死亡
-     */
-    private Integer death;
-
-    /**
-     * 新生儿
-     */
-    private Integer newBorn;
-}

+ 157 - 295
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -125,226 +125,25 @@
         order by b.order_no, a.order_no;
     </select>
 
-    <!-- 缺陷排行列表 -->
-    <select id="resultStatistics"  parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
-        SELECT
-        t1.msg AS name,
-        t1.num AS num,
-        round( t1.num / t2.totle, 4) AS percent
-        FROM
-        (
-        (
-        SELECT
-        d.msg,
-        count(*) AS num
-        FROM
-        med_behospital_info a,
-        med_home_page b,
-        med_qcresult_info c,
-        med_qcresult_detail d
-        WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.hospital_id = c.hospital_id
-        AND a.behospital_code = d.behospital_code
-        AND a.hospital_id = d.hospital_id
-        AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        <![CDATA[AND a.qc_type_id <>0 ]]>
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
-        </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
-        </if>
-        GROUP BY
-        d.msg
-        ORDER BY
-        count(*) DESC
-        ) t1,
-        (
-        SELECT
-        count(*) AS totle
-        FROM
-        med_behospital_info a,
-        med_home_page b,
-        med_qcresult_info c,
-        med_qcresult_detail d
-        WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.hospital_id = c.hospital_id
-        AND a.behospital_code = d.behospital_code
-        AND a.hospital_id = d.hospital_id
-        AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        <![CDATA[AND a.qc_type_id <>0 ]]>
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
-        </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
-        </if>
-        ) t2
-        )
-        <if test="limitCount != null and limitCount != ''">
-            limit 0,#{limitCount}
-        </if>
-    </select>
-
-    <!-- 各科室缺陷占比 -->
-    <select id="resultStatisticsByDept"  parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
-        SELECT
-        t1.beh_dept_name AS name,
-        t1.num AS num,
-        round( t1.num / t2.totle, 4 ) AS percent
-        FROM
-        (
-        (
-        SELECT
-        a.beh_dept_id,
-        a.beh_dept_name,
-        count(*) AS num
-        FROM
-        med_behospital_info a,
-        med_home_page b,
-        med_qcresult_info c,
-        med_qcresult_detail d
-        WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.hospital_id = c.hospital_id
-        AND a.behospital_code = d.behospital_code
-        AND a.hospital_id = d.hospital_id
-        AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        <![CDATA[AND a.qc_type_id <>0 ]]>
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
-        </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        a.beh_dept_name
-        ORDER BY
-        count(*) DESC
-        ) t1,
-        (
-        SELECT
-        count(*) AS totle
-        FROM
-        med_behospital_info a,
-        med_home_page b,
-        med_qcresult_info c,
-        med_qcresult_detail d
-        WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.hospital_id = c.hospital_id
-        AND a.behospital_code = d.behospital_code
-        AND a.hospital_id = d.hospital_id
-        AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        <![CDATA[AND a.qc_type_id <>0 ]]>
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
-        </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
-        </if>
-        ) t2
-        )
-    </select>
-
-    <!-- 缺陷排行列表 -->
-    <select id="resultStatistics2"  parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
-        SELECT
-        d.msg as name,
-        count(*) AS num
-        FROM
-        FROM
-        med_behospital_info a,
-        med_home_page b,
-        med_qcresult_info c,
-        med_qcresult_detail d
-        WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.hospital_id = c.hospital_id
-        AND a.behospital_code = d.behospital_code
-        AND a.hospital_id = d.hospital_id
-        AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        <![CDATA[AND a.qc_type_id <>0 ]]>
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="startDate != null and startDate != ''">
-            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
-        </if>
-        <if test="endDate != null and endDate != ''">
-            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
-        </if>
-        GROUP BY
-        d.msg
-        ORDER BY
-        count(*) DESC
-        <if test="limitCount != null and limitCount != ''">
-            limit 0,#{limitCount}
-        </if>
-    </select>
-
-    <!-- 各科室缺陷占比 -->
-    <select id="resultStatisticsByDept2"  parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
+    <!-- 各科室缺陷占比-全院-首页 -->
+    <select id="entryByDept"  parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
         SELECT
         a.beh_dept_id as id,
         a.beh_dept_name as name,
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d
         WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
+        a.behospital_code = c.behospital_code
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = d.behospital_code
         AND a.hospital_id = d.hospital_id
         AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -362,26 +161,23 @@
         count(*) DESC
     </select>
 
-    <!-- 缺陷总数查询-->
+    <!-- 质控结果缺陷总数查询-->
     <select id="getTotleResultNum"  parameterType="com.diagbot.vo.FilterVO" resultType="int">
         SELECT
         count(*) AS totle
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d
         WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
+        a.behospital_code = c.behospital_code
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = d.behospital_code
         AND a.hospital_id = d.hospital_id
         AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -564,8 +360,29 @@
         and t.qc_type_id != 0
     </select>
 
-    <!-- 病案首页病历数统计 -->
-    <select id="homePageCount" parameterType="com.diagbot.vo.HomePageFilterVO" resultType="int">
+    <!-- 出院总人数统计-全院-首页 -->
+    <select id="leaveHosCount" parameterType="com.diagbot.vo.FilterVO" resultType="int">
+        SELECT
+        COUNT(*)
+        FROM
+        med_behospital_info a
+        WHERE
+        a.is_deleted = 'N'
+        AND a.is_placefile = '1'
+        <![CDATA[AND a.qc_type_id <>0 ]]>
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+        </if>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        </if>
+    </select>
+
+    <!-- 新生儿出院人数统计-全院-首页 -->
+    <select id="newBornCount" parameterType="com.diagbot.vo.FilterVO" resultType="int">
         SELECT
         COUNT(*)
         FROM
@@ -576,6 +393,9 @@
         AND b.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
+        AND a.is_placefile = '1'
+        AND ( b.age IS NULL OR b.age = '-' OR b.age = '' )
+        <![CDATA[AND ( b.newborn_month IS NOT NULL OR b.newborn_month <> '' OR b.newborn_day IS NOT NULL OR b.newborn_day <> '' )]]>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -586,34 +406,50 @@
         <if test="endDate != null and endDate != ''">
             <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
         </if>
-        <if test="death!=null and death==1">
-            AND b.leave_hospital_type = '死亡'
+    </select>
+
+    <!-- 死亡人数统计-全院-首页 -->
+    <select id="deathCount" parameterType="com.diagbot.vo.FilterVO" resultType="int">
+        SELECT
+        COUNT(*)
+        FROM
+        med_behospital_info a,
+        med_home_page b
+        WHERE
+        a.is_deleted = 'N'
+        AND b.is_deleted = 'N'
+        AND a.hospital_id = b.hospital_id
+        AND a.behospital_code = b.behospital_code
+        AND b.return_to_type = '死亡'
+        AND a.is_placefile = '1'
+        <![CDATA[AND a.qc_type_id <>0 ]]>
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
         </if>
-        <if test="newBorn!=null and newBorn==1">
-            AND ( b.age IS NULL OR b.age = '-' OR b.age = '' )
-            <![CDATA[AND ( b.newborn_month IS NOT NULL OR b.newborn_month <> '' OR b.newborn_day IS NOT NULL OR b.newborn_day <> '' )]]>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
         </if>
     </select>
 
-    <!-- 病案首页手术病历数统计 -->
-    <select id="homePageCountForOperation" parameterType="com.diagbot.vo.FilterVO" resultType="int">
+    <!-- 手术人数统计-全院-首页 -->
+    <select id="operationCount" parameterType="com.diagbot.vo.FilterVO" resultType="int">
         SELECT
         COUNT( DISTINCT a.behospital_code )
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_medical_record c,
         qc_mode 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 c.mode_id = d.id
+        AND a.is_placefile = '1'
         AND d.`name` = '手术记录'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
@@ -627,8 +463,41 @@
         </if>
     </select>
 
-    <!-- 按科室统计病案首页病历数 -->
-    <select id="homePageCountByDept" parameterType="com.diagbot.vo.HomePageFilterVO" resultType="com.diagbot.dto.NumDTO">
+    <!-- 出院总人数统计-科室-首页 -->
+    <select id="leaveHosCountByDept" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
+        SELECT
+        a.beh_dept_id AS id,
+        a.beh_dept_name AS NAME,
+        COUNT(*) AS num
+        FROM
+        med_behospital_info a
+        sys_user_dept c
+        WHERE
+        a.is_deleted = 'N'
+        AND c.is_deleted = 'N'
+        AND a.hospital_id = c.hospital_id
+        AND a.beh_dept_id = c.dept_id
+        AND a.is_placefile = '1'
+        <![CDATA[AND a.qc_type_id <>0 ]]>
+        <if test="userId!=null">
+            AND c.user_id = #{userId}
+        </if>
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+        </if>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        </if>
+        GROUP BY
+        a.beh_dept_id,
+        a.beh_dept_name
+    </select>
+
+    <!-- 新生儿出院人数统计-科室-首页 -->
+    <select id="newBornCountByDept" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
         SELECT
         a.beh_dept_id AS id,
         a.beh_dept_name AS NAME,
@@ -645,10 +514,48 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.beh_dept_id = c.dept_id
+        AND ( b.age IS NULL OR b.age = '-' OR b.age = '' )
+        <![CDATA[AND ( b.newborn_month IS NOT NULL OR b.newborn_month <> '' OR b.newborn_day IS NOT NULL OR b.newborn_day <> '' )]]>
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
-        <if test="death!=null and death==1">
-            AND b.leave_hospital_type = '死亡'
+        <if test="userId!=null">
+            AND c.user_id = #{userId}
         </if>
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+        <if test="startDate != null and startDate != ''">
+            <![CDATA[ and a.leave_hospital_date >= DATE(#{startDate})]]>
+        </if>
+        <if test="endDate != null and endDate != ''">
+            <![CDATA[AND a.leave_hospital_date < DATE(#{endDate})]]>
+        </if>
+        GROUP BY
+        a.beh_dept_id,
+        a.beh_dept_name
+    </select>
+
+    <!-- 死亡人数统计-科室-首页 -->
+    <select id="deathCountByDept" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
+        SELECT
+        a.beh_dept_id AS id,
+        a.beh_dept_name AS NAME,
+        COUNT(*) AS num
+        FROM
+        med_behospital_info a,
+        med_home_page 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.behospital_code = b.behospital_code
+        AND a.beh_dept_id = c.dept_id
+        AND b.return_to_type = '死亡'
+        AND a.is_placefile = '1'
+        <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND c.user_id = #{userId}
         </if>
@@ -666,32 +573,29 @@
         a.beh_dept_name
     </select>
 
-    <!-- 按科室病案首页手术病历数 -->
-    <select id="homePageCountForOperationByDept" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
+    <!-- 手术人数统计-科室-首页 -->
+    <select id="operationCountByDept" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.NumDTO">
         SELECT
         a.beh_dept_id AS id,
         a.beh_dept_name AS NAME,
         COUNT( DISTINCT a.behospital_code ) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         sys_user_dept c,
         med_medical_record d,
         qc_mode e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.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 b.behospital_code = d.behospital_code
+        AND a.behospital_code = d.behospital_code
         AND a.beh_dept_id = c.dept_id
         AND d.mode_id = e.id
         AND e.`name` = '手术记录'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND c.user_id = #{userId}
@@ -728,20 +632,17 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d
         WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
+        a.behospital_code = c.behospital_code
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = d.behospital_code
         AND a.hospital_id = d.hospital_id
         AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -766,20 +667,17 @@
         count(*) AS totle
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d
         WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
+        a.behospital_code = c.behospital_code
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = d.behospital_code
         AND a.hospital_id = d.hospital_id
         AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -816,23 +714,20 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         sys_user_dept e
         WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
+        a.behospital_code = c.behospital_code
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = d.behospital_code
         AND a.hospital_id = d.hospital_id
         AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.is_deleted = 'N'
         AND a.beh_dept_id = e.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByDeptVO.userId!=null">
             AND e.user_id = #{filterPageByDeptVO.userId}
@@ -865,23 +760,20 @@
         count(*) AS totle
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         sys_user_dept e
         WHERE
-        a.behospital_code = b.behospital_code
-        AND a.hospital_id = b.hospital_id
-        AND a.behospital_code = c.behospital_code
+        a.behospital_code = c.behospital_code
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = d.behospital_code
         AND a.hospital_id = d.hospital_id
         AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.is_deleted = 'N'
         AND a.beh_dept_id = e.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByDeptVO.userId!=null">
             AND e.user_id = #{filterPageByDeptVO.userId}
@@ -954,16 +846,13 @@
         ) AS thirdLevelPercentStr
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -991,24 +880,21 @@
         count( * ) AS entryNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases_entry e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.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.behospital_code = d.behospital_code
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1126,24 +1012,21 @@
         ) AS thirdLevelPercentStr
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         bas_dept_info d,
         bas_dept_info e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = d.dept_id
         AND d.parent_dept_id = e.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1178,7 +1061,6 @@
         count( * ) AS entryNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases_entry e,
@@ -1186,24 +1068,22 @@
         bas_dept_info g
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.is_deleted = 'N'
         AND f.is_deleted = 'N'
         AND g.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 = f.hospital_id
         AND a.hospital_id = g.hospital_id
-        AND a.behospital_code = b.behospital_code
         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
         AND f.parent_dept_id = g.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1319,17 +1199,14 @@
         ) AS secondLevelPercentStr
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_cases 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = 243
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1357,26 +1234,23 @@
         count( * ) AS entryNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_cases c,
         med_qcresult_detail d,
         qc_cases_entry e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.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.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
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1484,19 +1358,16 @@
         ) AS thirdLevelPercentStr
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         sys_user_dept e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND e.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 a.beh_dept_id = e.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1530,27 +1401,24 @@
         count( * ) AS entryNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases_entry e,
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.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 = 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.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
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1661,20 +1529,17 @@
         ) AS secondLevelPercentStr
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_cases c,
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND f.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 a.beh_dept_id = f.dept_id
         AND c.cases_id = 243
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1708,22 +1573,18 @@
         count( * ) AS entryNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_cases c,
         med_qcresult_detail d,
         qc_cases_entry e,
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.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 = 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.behospital_code = d.behospital_code
         AND a.beh_dept_id = f.dept_id
@@ -1731,6 +1592,7 @@
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
         AND c.cases_id = 243
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}

+ 8 - 0
src/main/resources/mapper/HomePageMapper.xml

@@ -154,6 +154,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -185,6 +186,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -228,6 +230,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -261,6 +264,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -294,6 +298,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -350,6 +355,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -383,6 +389,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -416,6 +423,7 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}

+ 26 - 105
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -24,15 +24,11 @@
         count(1)
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c
         WHERE
-        a.hospital_id = b.hospital_id
-        AND a.behospital_code = b.behospital_code
-        AND a.hospital_id = c.hospital_id
+        a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
@@ -58,16 +54,13 @@
         COUNT(*)
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -100,16 +93,13 @@
         concat( ROUND( sum( c.`level` = '丙' )/ count(*)* 100, 2 ), '%' ) AS thirdPercent
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -133,27 +123,24 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases e,
         qc_cases_entry f
         WHERE
         a.is_deleted = 'N'
-        AND b.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 = 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.behospital_code = d.behospital_code
         AND d.cases_id = e.id
         AND d.cases_entry_id = f.id
         AND e.id = f.cases_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -185,24 +172,21 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases_entry e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.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.behospital_code = d.behospital_code
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -222,16 +206,13 @@
         count(*) AS mrNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -265,24 +246,21 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases_entry e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.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.behospital_code = d.behospital_code
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -305,16 +283,13 @@
         count(*) AS mrNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -339,16 +314,13 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -375,24 +347,21 @@
         e.dept_name as deptClass
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         bas_dept_info d,
         bas_dept_info e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = d.dept_id
         AND d.parent_dept_id = e.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -419,20 +388,17 @@
         COUNT(*) AS num
         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.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND d.user_id = #{userId}
@@ -467,7 +433,6 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases e,
@@ -475,23 +440,21 @@
         sys_user_dept g
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.is_deleted = 'N'
         AND f.is_deleted = 'N'
         AND g.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 = g.hospital_id
-        AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
         AND d.cases_id = e.id
         AND d.cases_entry_id = f.id
         AND e.id = f.cases_id
         AND a.beh_dept_id = g.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND g.user_id = #{userId}
@@ -532,28 +495,25 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases_entry e,
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.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 = b.hospital_id
         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 = b.behospital_code
         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
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND f.user_id = #{userId}
@@ -580,20 +540,17 @@
         count(*) AS mrNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.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 = f.hospital_id
-        AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = f.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND f.user_id = #{userId}
@@ -641,28 +598,25 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases_entry e,
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.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 = b.hospital_id
         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 = b.behospital_code
         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
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByDeptVO.userId!=null">
             AND f.user_id = #{filterPageByDeptVO.userId}
@@ -695,20 +649,17 @@
         count(*) AS mrNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.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 = f.hospital_id
-        AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = f.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByDeptVO.userId!=null">
@@ -764,27 +715,24 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases e,
         qc_cases_entry f
         WHERE
         a.is_deleted = 'N'
-        AND b.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 = 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.behospital_code = d.behospital_code
         AND d.cases_id = e.id
         AND d.cases_entry_id = f.id
         AND e.id = f.cases_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -810,16 +758,13 @@
         COUNT(*) AS mrNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -883,7 +828,6 @@
         e.cases_name as casesName
         FROM
         med_behospital_info a,
-        med_home_page b,
         <if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
             med_qcresult_cases c,
         </if>
@@ -894,16 +838,14 @@
         qc_cases_entry e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         and e.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.behospital_code = d.behospital_code
+        AND a.is_placefile = '1'
         <if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
             AND c.cases_id = d.cases_id
         </if>
@@ -936,7 +878,6 @@
         count(*) AS totleNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         <if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
             med_qcresult_cases c,
         </if>
@@ -947,16 +888,14 @@
         qc_cases_entry e
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         and e.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.behospital_code = d.behospital_code
+        AND a.is_placefile = '1'
         <if test="filterPageVO.casesId != null and filterPageVO.casesId ==243">
             AND c.cases_id = d.cases_id
         </if>
@@ -1005,16 +944,13 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -1050,16 +986,13 @@
         concat( ROUND( sum( c.`level` = '丙' )/ count(*)* 100, 2 ), '%' ) AS thirdPercent
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info 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.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -1111,7 +1044,6 @@
         count(*) AS num
         FROM
         med_behospital_info a,
-        med_home_page b,
         med_qcresult_info c,
         med_qcresult_detail d,
         qc_cases e,
@@ -1119,23 +1051,21 @@
         sys_user_dept g
         WHERE
         a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
         AND e.is_deleted = 'N'
         AND f.is_deleted = 'N'
         AND g.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 = g.hospital_id
-        AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
         AND d.cases_id = e.id
         AND d.cases_entry_id = f.id
         AND e.id = f.cases_id
         AND a.beh_dept_id = g.dept_id
+        AND a.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByDeptVO.userId!=null">
             AND g.user_id = #{filterPageByDeptVO.userId}
@@ -1168,20 +1098,17 @@
         COUNT(*) AS mrNum
         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.is_placefile = '1'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByDeptVO.userId!=null">
             AND d.user_id = #{filterPageByDeptVO.userId}
@@ -1256,7 +1183,6 @@
         a.beh_dept_name AS deptName
         FROM
         med_behospital_info a,
-        med_home_page b,
         <if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId ==243">
             med_qcresult_cases c,
         </if>
@@ -1268,18 +1194,16 @@
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.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 = b.hospital_id
         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 = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
+        AND a.is_placefile = '1'
         <if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId ==243">
             AND c.cases_id = d.cases_id
         </if>
@@ -1319,7 +1243,6 @@
         count(*) AS totleNum
         FROM
         med_behospital_info a,
-        med_home_page b,
         <if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId ==243">
             med_qcresult_cases c,
         </if>
@@ -1331,18 +1254,16 @@
         sys_user_dept f
         WHERE
         a.is_deleted = 'N'
-        AND b.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 = b.hospital_id
         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 = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
+        AND a.is_placefile = '1'
         <if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId ==243">
             AND c.cases_id = d.cases_id
         </if>