2 İşlemeler 0be3bd0c5b ... c5c83372d1

Yazar SHA1 Mesaj Tarih
  wanghn c5c83372d1 无用代码删除 2 ay önce
  wanghn f4910790b9 系统管理-规则管理、规则修改(导出功能未完成) 2 ay önce

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

@@ -72,6 +72,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/cases/getQcCases").permitAll()
                 .antMatchers("/qc/behospitalInfo/page").permitAll()
                 .antMatchers("/qc/casesEntryHospital/getQcCasesEntryAll").permitAll()
+                .antMatchers("/qc/casesEntryHospital/exportAllRules").permitAll()
                 .antMatchers("/qc/casesEntryHospital/getQcCasesAll").permitAll()
                 .antMatchers("/qc/behospitalInfo/getByBehospitalCode").permitAll()
                 .antMatchers("/bas/dept/getList").permitAll()

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

@@ -155,6 +155,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/behospitalInfo/page_person", request)
                 || matchers("/qc/behospitalInfo/page_group", request)
                 || matchers("/qc/casesEntryHospital/findQcCasesEntry", request)
+                || matchers("/qc/casesEntryHospital/exportAllRules", request)
                 || matchers("/qc/behospitalInfo/exportExcel", request)
                 || matchers("/qc/dataimport/import", request)
                 || matchers("/qc/dataimport/test", request)

+ 4 - 0
src/main/java/com/diagbot/dto/QcCasesEntryHospitalDTO.java

@@ -20,4 +20,8 @@ public class QcCasesEntryHospitalDTO {
     private Integer isReject;
     private Integer isUsed;
     private Integer ruleType;
+    private String remark;
+    private Short syRuleType;
+    private Short remindType;
+    private Integer remindLevel;
 }

+ 13 - 0
src/main/java/com/diagbot/entity/QcCasesEntry.java

@@ -106,4 +106,17 @@ public class QcCasesEntry implements Serializable {
      * 修改人,如果为0则表示纪录未修改
      */
     private String modifier;
+    /**
+     * 沙雅规则类型
+     */
+    private Short syRuleType;
+    /**
+     * 提醒类型
+     */
+    private Short remindType;
+    /**
+     * 提醒等级
+     */
+    private Integer remindLevel;
+
 }

+ 21 - 0
src/main/java/com/diagbot/facade/QcCasesEntryHospitalFacade.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.QcCasesAllDTO;
 import com.diagbot.dto.QcCasesEntryFindDTO;
 import com.diagbot.dto.QcCasesEntryHospitalDTO;
+import com.diagbot.entity.QcCasesEntry;
 import com.diagbot.entity.QcCasesEntryHospital;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.exception.CommonErrorCode;
@@ -31,6 +32,8 @@ import java.util.List;
 public class QcCasesEntryHospitalFacade extends QcCasesEntryHospitalServiceImpl {
     @Autowired
     private QcCasesFacade qcCasesFacade;
+    @Autowired
+    private QcCasesEntryFacade qcCasesEntryFacade;
 
     /**
      *
@@ -57,6 +60,24 @@ public class QcCasesEntryHospitalFacade extends QcCasesEntryHospitalServiceImpl
         if (sum == 0) {
             throw new CommonException(CommonErrorCode.NOT_EXISTS, "该条目不存在");
         }
+        QcCasesEntryHospital entryHospital = this.lambdaQuery()
+                .eq(QcCasesEntryHospital::getId, qcCasesEntryUpdataVO.getId())
+                .one();
+        if (entryHospital != null) {
+            QcCasesEntry one = qcCasesEntryFacade.lambdaQuery()
+                    .eq(QcCasesEntry::getId, entryHospital.getCasesEntryId())
+                    .one();
+            if (one != null) {
+                one.setName(qcCasesEntryUpdataVO.getName());
+                one.setSyRuleType(qcCasesEntryUpdataVO.getSyRuleType());
+                one.setRemark(qcCasesEntryUpdataVO.getRemark());
+                one.setCasesId(qcCasesEntryUpdataVO.getCasesId());
+                one.setRemindType(qcCasesEntryUpdataVO.getRemindType());
+                one.setRemindLevel(qcCasesEntryUpdataVO.getRemindLevel());
+                qcCasesEntryFacade.saveOrUpdate(one);
+            }
+        }
+
         UpdateWrapper<QcCasesEntryHospital> qcCasesEntry = new UpdateWrapper<>();
         qcCasesEntry.eq("id", qcCasesEntryUpdataVO.getId())
                 .eq("is_deleted", IsDeleteEnum.N.getKey())

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

@@ -96,13 +96,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public int operationCount(FilterVO filterVO);
 
-    /**
-     * 出院总人数统计-科室-首页
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<NumDTO> leaveHosCountByDept(FilterVO filterVO);
 
     /**
      * 入院总人数统计-科室-首页
@@ -218,15 +211,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public List<LevelStsByDeptDTO> levelStatisticsByDept(FilterOrderVO filterOrderVO);
 
-    /**
-     * 病案首页合格率占比(主任医生)
-     *
-     * @param filterOrderByDeptVO
-     * @return
-     */
-    public List<HomePageByDeptDTO> homePageLevelStatisticsByDept(FilterOrderByDeptVO filterOrderByDeptVO);
-
-
     /**
      * 各科室缺陷占比科室导出
      *
@@ -235,13 +219,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public List<ExportExcelByDeptDTO> levelStatisticsExportByDept(ExportQcresultVO exportQcresultVO);
 
-    /**
-     * 单条条目缺陷统计-首页
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<AdmissionCountDTO> casesEntryStatisticsByDept(FilterVO filterVO);
 
     /**
      * 科室缺陷占比-科室(分页)
@@ -374,14 +351,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public IPage<QcResultShortDTO> leaveHosMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
 
-    /**
-     * 离院病人质控评分详情页-科室
-     *
-     * @param qcResultShortPageVO
-     * @return
-     */
-    public IPage<QcResultShortDeptDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
-
 
     /**
  * 离院病人质控评分年龄单独查询详情页
@@ -405,14 +374,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      * @return
      */
     public List<HomePageImproveDTO> qcCheckStatistics(FilterOrderVO filterOrderVO);
-    /**
-     * 质控核查统计-科室(内页)
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    public List<ImproveByDeptDTO> qcCheckStatisticsByDept(FilterOrderVO filterOrderVO);
-
 
 
     /**
@@ -448,23 +409,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public List<UnModifyMRDetailDTO> unModifyMRStatistics(FilterUnModifyMRVO filterUnModifyMRVO);
 
-    /**
-     * 未整改病历统计-科室
-     *
-     * @param filterUnModifyMRVO
-     * @return
-     */
-    public List<UnModifyMRDetailDTO> unModifyMRSByDept(FilterUnModifyMRVO filterUnModifyMRVO);
-
-    /**
-     * 病历质控报表-科室
-     *
-     * @param behospitalPageVO
-     * @return
-     */
-    public IPage<QualityControlDeptDTO> qualityControlByDept(BehospitalPageVO behospitalPageVO);
-
-
 
     /**
      * 病历稽查表
@@ -492,14 +436,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public List<MedicalCheckExportDTO>  getMedicalCheckExport(@Param("filterVO")FilterMedicalCheckVO filterVO);
 
-    /**
-     * 病历稽查表导出-科室
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<MedicalDeptDTO>  medicalCheckExportByDept(@Param("filterVO")FilterMedicalCheckVO filterVO);
-
 
     /**
      * 未整改病历质控评分页(内页)
@@ -581,15 +517,6 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public IPage<ReBeHosMergeDTO> reHos31DaysPage(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO);
 
-    /**
-     * 31天再入院详情页-科室
-     *
-     * @param reBeHosPageVO
-     * @return
-     */
-    public IPage<ReBeHosMergeDTO> reHos31DaysPageByDept(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO);
-
-
     /**
      * 入院人数统计-首页
      *

+ 1 - 0
src/main/java/com/diagbot/mapper/QcCasesEntryHospitalMapper.java

@@ -1,6 +1,7 @@
 package com.diagbot.mapper;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.ExportExcelDTO;
 import com.diagbot.dto.QcCasesEntryFindDTO;
 import com.diagbot.dto.QcCasesEntryHospitalDTO;
 import com.diagbot.entity.QcCasesEntryHospital;

+ 0 - 36
src/main/java/com/diagbot/mapper/QcresultInfoMapper.java

@@ -88,21 +88,6 @@ public interface QcresultInfoMapper extends BaseMapper<QcresultInfo> {
      */
     public List<NumDTO> resultCountByDept(QcresultFilterVO qcresultFilterVO);
 
-    /**
-     * 各模块缺陷占比-按科室
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<DeptNumDTO> entryCountGroupByCaseAndDept(FilterVO filterVO);
-
-    /**
-     * 条目缺陷占比-按科室
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<DeptNumDTO> entryCountGroupByEntryAndDept(FilterVO filterVO);
 
     /**
      * 各模块缺陷占比(分页)
@@ -136,21 +121,7 @@ public interface QcresultInfoMapper extends BaseMapper<QcresultInfo> {
      */
     public IPage<QcResultPercentDTO> levelPercentGroupByDeptPage(@Param("filterPageVO") FilterPageVO filterPageVO);
 
-    /**
-     * 各模块缺陷占比-科室(分页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    public IPage<NumDTO> entryCountGroupByCaseAndDeptPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO);
 
-    /**
-     * 缺陷详情-科室(分页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    public IPage<EntryNumGroupDTO> entryCountGroupByEntryAndDeptPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO);
     /**
      * 条目缺陷占比基础数据(内页)
      *
@@ -172,13 +143,6 @@ public interface QcresultInfoMapper extends BaseMapper<QcresultInfo> {
      */
     public List<EntryNumDTO> entryGroupByEntryScore(@Param("hospitalId") String hospitalId,@Param("isPlacefile") String isPlacefile, @Param("ids")Set<Long> ids);
 
-    /**
-     * 条目缺陷占比-科室(内页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    public IPage<DeptEntryNumDTO> entryGroupByEntryAndDeptInnerPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO);
 
     /**
      * 各科室质控平均分(首页)-根据内外科系统统计

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

@@ -102,57 +102,6 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
     public List<MedManageParamsDTO> getMedManageParams( FilterVO filterVO);
 
 
-
-
-    /**
-     * 出院总人数统计-科室-首页
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<NumDTO> leaveHosCountByDept(FilterVO filterVO);
-
-    /**
-     * 病历质控报表-科室
-     *
-     * @param behospitalPageVO
-     * @return
-     */
-    public IPage<QualityControlDeptDTO> qualityControlByDept(BehospitalPageVO behospitalPageVO);
-
-    /**
-     * 入院总人数统计-科室-首页
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<AdmissionCountDTO> admissionHosCountByDept(FilterVO filterVO);
-
-
-    /**
-     * 新生儿出院人数统计-科室-首页
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<NumDTO> newBornCountByDept(FilterVO filterVO);
-
-    /**
-     * 死亡人数统计-科室-首页
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<NumDTO> deathCountByDept(FilterVO filterVO);
-
-    /**
-     * 手术人数统计-科室-首页
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<NumDTO> operationCountByDept(FilterVO filterVO);
-
     /**
      * 各科室缺陷占比排行(分页)
      *
@@ -246,14 +195,6 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      */
     public List<AdmissionCountDTO> casesEntryStatisticsByDept(FilterVO filterVO);
 
-    /**
-     * 病案首页合格率占比(主任医生)
-     *
-     * @param filterOrderByDeptVO
-     * @return
-     */
-    public List<HomePageByDeptDTO> homePageLevelStatisticsByDept(FilterOrderByDeptVO filterOrderByDeptVO);
-
     /**
      * 缺陷明细-科室(分页)
      *
@@ -363,14 +304,6 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      */
     public IPage<QcResultShortDTO> leaveHosMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
 
-    /**
-     * 离院病人质控评分详情页-科室
-     *
-     * @param qcResultShortPageVO
-     * @return
-     */
-    public IPage<QcResultShortDeptDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
-
     /**
      * 改善率统计-全院(首页)
      *
@@ -387,13 +320,6 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      */
     public List<HomePageImproveDTO> qcCheckStatistics(FilterOrderVO filterOrderVO);
 
-    /**
-     * 质控核查统计-科室(内页)
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    public List<ImproveByDeptDTO> qcCheckStatisticsByDept(FilterOrderVO filterOrderVO);
 
     /**
      * 离院病人质控评分详情页导出到excel
@@ -436,13 +362,6 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      */
     public List<UnModifyMRDetailDTO> unModifyMRStatistics(FilterUnModifyMRVO filterUnModifyMRVO);
 
-    /**
-     * 未整改病历统计-科室
-     *
-     * @param filterUnModifyMRVO
-     * @return
-     */
-    public List<UnModifyMRDetailDTO> unModifyMRSByDept(FilterUnModifyMRVO filterUnModifyMRVO);
 
     /**
      * 病历稽查表
@@ -462,13 +381,6 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      */
     List<MedicalCheckExportDTO>  getMedicalCheckExport(FilterMedicalCheckVO filterVO);
 
-    /**
-     * 病历稽查表导出-科室
-     * @return
-     */
-    List<MedicalDeptDTO>  medicalCheckExportByDept(FilterMedicalCheckVO filterVO);
-
-
 
     /**
      * 未整改病历质控评分页(内页)
@@ -536,14 +448,6 @@ public interface BehospitalInfoService extends IService<BehospitalInfo> {
      */
     public IPage<ReBeHosMergeDTO> reHos31DaysPage(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO);
 
-    /**
-     * 31天再入院详情页
-     *
-     * @param reBeHosPageVO
-     * @return
-     */
-    public IPage<ReBeHosMergeDTO> reHos31DaysPageByDept(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO);
-
     /**
      * 入院人数统计-首页
      *

+ 0 - 38
src/main/java/com/diagbot/service/QcresultInfoService.java

@@ -86,21 +86,6 @@ public interface QcresultInfoService extends IService<QcresultInfo> {
      */
     public List<NumDTO> resultCountByDept(QcresultFilterVO qcresultFilterVO);
 
-    /**
-     * 各模块缺陷占比-按科室
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<DeptNumDTO> entryCountGroupByCaseAndDept(FilterVO filterVO);
-
-    /**
-     * 条目缺陷占比-按科室
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<DeptNumDTO> entryCountGroupByEntryAndDept(FilterVO filterVO);
 
     /**
      * 各模块缺陷占比(分页)
@@ -134,21 +119,6 @@ public interface QcresultInfoService extends IService<QcresultInfo> {
      */
     public IPage<QcResultPercentDTO> levelPercentGroupByDeptPage(@Param("filterPageVO") FilterPageVO filterPageVO);
 
-    /**
-     * 各模块缺陷占比-科室(分页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    public IPage<NumDTO> entryCountGroupByCaseAndDeptPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO);
-
-    /**
-     * 缺陷详情-科室(分页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    public IPage<EntryNumGroupDTO> entryCountGroupByEntryAndDeptPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO);
 
     /**
      * 条目缺陷占比(内页)
@@ -157,14 +127,6 @@ public interface QcresultInfoService extends IService<QcresultInfo> {
      */
     public IPage<EntryNumDTO> entryGroupByEntryInnerPage(@Param("filterPageVO") FilterPageVO filterPageVO);
 
-    /**
-     * 条目缺陷占比-科室(内页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    public IPage<DeptEntryNumDTO> entryGroupByEntryAndDeptInnerPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO);
-
     /**
      * 各科室质控平均分(首页)-根据内外科系统统计
      *

+ 2 - 98
src/main/java/com/diagbot/service/impl/BehospitalInfoServiceImpl.java

@@ -111,16 +111,6 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.operationCount(filterVO);
     }
 
-    /**
-     * 出院总人数统计-科室-首页
-     *
-     * @param filterVO
-     * @return
-     */
-    public List<NumDTO> leaveHosCountByDept(FilterVO filterVO) {
-        return baseMapper.leaveHosCountByDept(filterVO);
-    }
-
     /**
      * 入院总人数统计-科室-首页
      *
@@ -281,28 +271,12 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.levelStatisticsByDept(filterOrderVO);
     }
 
-    /**
-     * 病案首页合格率占比(主任医生)
-     *
-     * @param filterOrderByDeptVO
-     * @return
-     */
-    @Override
-    public List<HomePageByDeptDTO> homePageLevelStatisticsByDept(FilterOrderByDeptVO filterOrderByDeptVO) {
-        return baseMapper.homePageLevelStatisticsByDept(filterOrderByDeptVO);
-    }
-
-    /**
-     * 单条条目缺陷统计-首页
-     *
-     * @param filterVO
-     * @return
-     */
     @Override
     public List<AdmissionCountDTO> casesEntryStatisticsByDept(FilterVO filterVO) {
-        return baseMapper.casesEntryStatisticsByDept(filterVO);
+        return Collections.emptyList();
     }
 
+
     /**
      * 缺陷明细-科室(分页)
      *
@@ -462,18 +436,6 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         IPage<QcResultShortDTO> qcResultShortDTOIPage = baseMapper.leaveHosMRPage(qcResultShortPageVO);
         return qcResultShortDTOIPage;
     }
-    /**
-     * 离院病人质控评分详情页-科室
-     *
-     * @param qcResultShortPageVO
-     * @return
-     */
-    @Override
-    public IPage<QcResultShortDeptDTO> leaveHosMRPageByDept(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
-        IPage<QcResultShortDeptDTO> qcResultShortDTOIPage = baseMapper.leaveHosMRPageByDept(qcResultShortPageVO);
-        return qcResultShortDTOIPage;
-    }
-
 
     /**
      * 改善率统计-全院(首页)
@@ -497,17 +459,6 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.qcCheckStatistics(filterOrderVO);
     }
 
-    /**
-     * 质控核查统计-科室(内页)
-     *
-     * @param filterOrderVO
-     * @return
-     */
-    @Override
-    public List<ImproveByDeptDTO> qcCheckStatisticsByDept(FilterOrderVO filterOrderVO) {
-        return baseMapper.qcCheckStatisticsByDept(filterOrderVO);
-    }
-
     /**
      * 离院病人质控评分详情页导出到excel
      *
@@ -565,29 +516,6 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return baseMapper.unModifyMRStatistics(filterUnModifyMRVO);
     }
 
-    /**
-     * 未整改病历统计-科室
-     *
-     * @param filterUnModifyMRVO
-     * @return
-     */
-    @Override
-    public List<UnModifyMRDetailDTO> unModifyMRSByDept(FilterUnModifyMRVO filterUnModifyMRVO) {
-        return baseMapper.unModifyMRSByDept(filterUnModifyMRVO);
-    }
-
-    /**
-     * 病历质控报表-科室
-     *
-     * @param behospitalPageVO
-     * @return
-     */
-    @Override
-    public IPage<QualityControlDeptDTO> qualityControlByDept(BehospitalPageVO behospitalPageVO) {
-        return baseMapper.qualityControlByDept(behospitalPageVO);
-    }
-
-
     /**
      * 病历稽查表
      *
@@ -802,19 +730,6 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
         return medicalCheckExport;
 
     }
-    /**
-     * 病历稽查表导出-科室
-     *
-     * @param filterVO
-     * @return
-     */
-    @Override
-    public List<MedicalDeptDTO> medicalCheckExportByDept(@Param("filterVO") FilterMedicalCheckVO filterVO) {
-        List<MedicalDeptDTO> medicalCheckExport = baseMapper.medicalCheckExportByDept(filterVO);
-        return medicalCheckExport;
-
-    }
-
 
     /**
      * 未整改病历质控评分页(内页)
@@ -906,17 +821,6 @@ public class BehospitalInfoServiceImpl extends ServiceImpl<BehospitalInfoMapper,
     public IPage<ReBeHosMergeDTO> reHos31DaysPage(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO) {
         return baseMapper.reHos31DaysPage(reBeHosPageVO);
     }
-    /**
-     * 31天再入院详情页-科室
-     *
-     * @param reBeHosPageVO
-     * @return
-     */
-    @Override
-    public IPage<ReBeHosMergeDTO> reHos31DaysPageByDept(@Param("reBeHosPageVO") ReBeHosPageVO reBeHosPageVO) {
-        return baseMapper.reHos31DaysPageByDept(reBeHosPageVO);
-    }
-
 
     /**
      * 入院人数统计-首页

+ 2 - 0
src/main/java/com/diagbot/service/impl/QcCasesEntryHospitalServiceImpl.java

@@ -1,12 +1,14 @@
 package com.diagbot.service.impl;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.ExportExcelDTO;
 import com.diagbot.dto.QcCasesEntryFindDTO;
 import com.diagbot.dto.QcCasesEntryHospitalDTO;
 import com.diagbot.entity.QcCasesEntryHospital;
 import com.diagbot.mapper.QcCasesEntryHospitalMapper;
 import com.diagbot.service.QcCasesEntryHospitalService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.ExportQcresultVO;
 import com.diagbot.vo.QcCasesEntryFindVO;
 import com.diagbot.vo.QcCasesEntryHospitalVO;
 import org.springframework.stereotype.Service;

+ 0 - 55
src/main/java/com/diagbot/service/impl/QcresultInfoServiceImpl.java

@@ -114,28 +114,6 @@ public class QcresultInfoServiceImpl extends ServiceImpl<QcresultInfoMapper, Qcr
         return baseMapper.resultCountByDept(qcresultFilterVO);
     }
 
-    /**
-     * 各模块缺陷占比-按科室
-     *
-     * @param filterVO
-     * @return
-     */
-    @Override
-    public List<DeptNumDTO> entryCountGroupByCaseAndDept(FilterVO filterVO) {
-        return baseMapper.entryCountGroupByCaseAndDept(filterVO);
-    }
-
-    /**
-     * 条目缺陷占比-按科室
-     *
-     * @param filterVO
-     * @return
-     */
-    @Override
-    public List<DeptNumDTO> entryCountGroupByEntryAndDept(FilterVO filterVO) {
-        return baseMapper.entryCountGroupByEntryAndDept(filterVO);
-    }
-
     /**
      * 各模块缺陷占比(分页)
      *
@@ -180,28 +158,6 @@ public class QcresultInfoServiceImpl extends ServiceImpl<QcresultInfoMapper, Qcr
         return baseMapper.levelPercentGroupByDeptPage(filterPageVO);
     }
 
-    /**
-     * 各模块缺陷占比-科室(分页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    @Override
-    public IPage<NumDTO> entryCountGroupByCaseAndDeptPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO) {
-        return baseMapper.entryCountGroupByCaseAndDeptPage(filterPageByDeptVO);
-    }
-
-    /**
-     * 缺陷详情-科室(分页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    @Override
-    public IPage<EntryNumGroupDTO> entryCountGroupByEntryAndDeptPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO) {
-        return baseMapper.entryCountGroupByEntryAndDeptPage(filterPageByDeptVO);
-    }
-
     /**
      * 条目缺陷占比(内页)
      *
@@ -247,17 +203,6 @@ public class QcresultInfoServiceImpl extends ServiceImpl<QcresultInfoMapper, Qcr
         return entryNumDTOIPage;
     }
 
-    /**
-     * 条目缺陷占比-科室(内页)
-     *
-     * @param filterPageByDeptVO
-     * @return
-     */
-    @Override
-    public IPage<DeptEntryNumDTO> entryGroupByEntryAndDeptInnerPage(@Param("filterPageByDeptVO") FilterPageByDeptVO filterPageByDeptVO) {
-        return baseMapper.entryGroupByEntryAndDeptInnerPage(filterPageByDeptVO);
-    }
-
     /**
      * 各科室质控平均分(首页)-根据内外科系统统计
      *

+ 4 - 0
src/main/java/com/diagbot/vo/QcCasesEntryHospitalVO.java

@@ -23,4 +23,8 @@ public class QcCasesEntryHospitalVO extends Page {
     private String isPlacefile = "1";
     private Integer isUsed;
     private Integer ruleType;
+    private String remark;
+    private Short syRuleType;
+    private Short remindType;
+    private Integer remindLevel;
 }

+ 6 - 0
src/main/java/com/diagbot/vo/QcCasesEntryUpdataVO.java

@@ -27,4 +27,10 @@ public class QcCasesEntryUpdataVO {
     private Integer isReject;
     @NotNull(message = "请输启用标志")
     private Integer isUsed;
+    private String remark;
+    private Short syRuleType;
+    private Short remindType;
+    private Integer remindLevel;
+    private Long casesId;
+    private String name;
 }

+ 2 - 4
src/main/java/com/diagbot/web/QcCasesEntryHospitalController.java

@@ -8,10 +8,7 @@ import com.diagbot.dto.QcCasesEntryFindDTO;
 import com.diagbot.dto.QcCasesEntryHospitalDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.QcCasesEntryHospitalFacade;
-import com.diagbot.vo.QcCasesEntryFindVO;
-import com.diagbot.vo.QcCasesEntryHospitalVO;
-import com.diagbot.vo.QcCasesEntryUpdataVO;
-import com.diagbot.vo.QcCasesEntryVO;
+import com.diagbot.vo.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.util.List;
 

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2988 - 4928
src/main/resources/mapper/BehospitalInfoMapper.xml


+ 14 - 3
src/main/resources/mapper/QcCasesEntryHospitalMapper.xml

@@ -19,7 +19,7 @@
         <result column="remark" property="remark"/>
     </resultMap>
 
-    <select id="getQcCasesEntryAlls" resultType="com.diagbot.dto.QcCasesEntryHospitalDTO">
+        <select id="getQcCasesEntryAlls" resultType="com.diagbot.dto.QcCasesEntryHospitalDTO">
         select
         b.id as id,
         a.cases_id as casesId,
@@ -43,7 +43,11 @@
             </otherwise>
         </choose>
         b.is_reject As isReject,
-        a.rule_type
+        a.rule_type,
+        a.remark,
+        a.sy_rule_type,
+        a.remind_type,
+        a.remind_level
         from
         qc_cases_entry a
         join qc_cases_entry_hospital b
@@ -56,8 +60,15 @@
         <if test="casesId != null and casesId != ''">
             AND a.cases_id = #{casesId}
         </if>
-        <if test="name != null and name != ''">
+        <if test="syRuleType != null and casesId != ''">
+            AND a.sy_rule_type = #{syRuleType}
+        </if>
+        <if test="remindType != null and casesId != ''">
+            AND a.remind_type = #{remindType}
+        </if>
+         <if test="name != null and name != ''">
             AND UPPER(a.name) LIKE CONCAT('%', UPPER(trim(#{name})), '%')
+            OR UPPER(a.remark) LIKE CONCAT('%', UPPER(trim(#{name})), '%')
         </if>
         <choose>
             <when test='isUsed != null and isPlacefile == "0"'>

+ 0 - 733
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -1090,388 +1090,6 @@
         a.beh_dept_name
     </select>
 
-    <!-- 按模块统计质控缺陷数 -->
-    <select id="entryCountGroupByCaseAndDept" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.DeptNumDTO">
-        SELECT
-        f.id,
-        g.NAME AS NAME,
-        f.deptId,
-        f.deptName,
-        f.num
-        FROM
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        c.cases_id AS id,
-        count(*) AS num
-        FROM
-        med_behospital_info a,
-        med_qcresult_info b,
-        med_qcresult_detail c,
-        qc_cases_entry d,
-        sys_user_dept 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 = e.hospital_id
-        AND a.behospital_code = b.behospital_code
-        AND a.behospital_code = c.behospital_code
-        AND c.cases_entry_id = d.id
-        AND a.beh_dept_id = e.dept_id
-        <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="userId!=null">
-            AND e.user_id = #{userId}
-        </if>
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        GROUP BY
-        d.cases_id,
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) f,
-        qc_cases g
-        WHERE
-        g.is_deleted = 'N'
-        AND f.id = g.id
-    </select>
-
-    <!-- 条目缺陷占比-科室(首页) -->
-    <select id="entryCountGroupByEntryAndDept" parameterType="com.diagbot.vo.FilterVO" resultType="com.diagbot.dto.DeptNumDTO">
-        SELECT
-        t1.deptId AS deptId,
-        t1.deptName AS deptName,
-        t1.NAME AS NAME,
-        t1.num AS num,
-        t2.mrNum AS totleNum,
-        Round( t1.num / t2.mrNum, 4 ) AS percent,
-        CONCAT( Round( t1.num / t2.mrNum * 100, 2 ), '%' ) AS percentStr
-        FROM
-        (
-        SELECT
-        tt2.id,
-        tt2.NAME,
-        tt1.beh_dept_id AS deptId,
-        tt1.beh_dept_name AS deptName,
-        tt1.num
-        FROM
-        (
-        SELECT
-        a.beh_dept_id,
-        a.beh_dept_name,
-        count(*) AS num,
-        d.cases_entry_id
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        med_qcresult_detail d,
-        sys_user_dept f
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = d.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.behospital_code = d.behospital_code
-        AND a.beh_dept_id = f.dept_id
-        <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="userId!=null">
-            AND f.user_id = #{userId}
-        </if>
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        GROUP BY
-        d.cases_entry_id,
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) tt1,
-        qc_cases_entry tt2
-        WHERE
-        tt2.is_deleted = 'N'
-        AND tt1.cases_entry_id = tt2.id
-        ) t1,
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        count(*) AS mrNum
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        sys_user_dept f
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.beh_dept_id = f.dept_id
-        <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="userId!=null">
-            AND f.user_id = #{userId}
-        </if>
-        <if test="hospitalId != null and hospitalId != ''">
-            AND a.hospital_id = #{hospitalId}
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 0">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        <if test="isPlacefile != null and isPlacefile == 1">
-            <if test="startDate != null and startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{startDate}]]>
-            </if>
-            <if test="endDate != null and endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{endDate}]]>
-            </if>
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) t2
-        WHERE
-        t1.deptId = t2.deptId
-        AND t1.deptName = t2.deptName
-        ORDER BY
-        percent DESC,
-        num DESC
-    </select>
-
-    <!-- 条目缺陷占比-科室(内页) -->
-    <select id="entryGroupByEntryAndDeptInnerPage" resultType="com.diagbot.dto.DeptEntryNumDTO">
-        SELECT
-        t.*
-        FROM
-        (
-        SELECT
-        t1.deptId AS deptId,
-        t1.deptName AS deptName,
-        t1.id AS id,
-        t1.NAME AS NAME,
-        t1.casesId AS casesId,
-        t1.casesName AS casesName,
-        t1.num AS num,
-        t2.mrNum AS totleNum,
-        t1.score AS score,
-        t1.isReject AS isReject,
-        Round( t1.num / t2.mrNum, 4 ) AS percent,
-        CONCAT( Round( t1.num / t2.mrNum * 100, 2 ), '%' ) AS percentStr
-        FROM
-        (
-        SELECT
-        tt2.id,
-        tt2.NAME,
-        tt1.beh_dept_id AS deptId,
-        tt1.beh_dept_name AS deptName,
-        tt2.cases_id AS casesId,
-        tt2.cases_name AS casesName,
-        tt1.num,
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
-            tt3.score_run as score,
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
-            tt3.score,
-        </if>
-        tt1.is_reject AS isReject
-        FROM
-        (
-        SELECT
-        a.hospital_id,
-        a.beh_dept_id,
-        a.beh_dept_name,
-        count(*) AS num,
-        d.cases_id,
-        d.cases_entry_id,
-        d.is_reject
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        med_qcresult_detail d,
-        sys_user_dept f
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = d.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.behospital_code = d.behospital_code
-        AND a.beh_dept_id = f.dept_id
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
-            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="filterPageByDeptVO.userId!=null">
-            AND f.user_id = #{filterPageByDeptVO.userId}
-        </if>
-        <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
-            AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
-            AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
-        </if>
-        <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
-            AND a.doctor_name like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
-        </if>
-        <if test="filterPageByDeptVO.isReject != null">
-            AND d.is_reject = #{filterPageByDeptVO.isReject}
-        </if>
-        GROUP BY
-        d.cases_entry_id,
-        a.beh_dept_id,
-        a.beh_dept_name,
-        d.is_reject,
-        d.cases_id
-        ) tt1,
-        qc_cases_entry tt2,
-        qc_cases_entry_hospital tt3
-        WHERE
-        tt2.is_deleted = 'N'
-        AND tt3.is_deleted = 'N'
-        AND tt1.hospital_id = tt3.hospital_id
-        AND tt1.cases_id = tt2.cases_id
-        AND tt1.cases_entry_id = tt2.id
-        AND tt2.id = tt3.cases_entry_id
-        <if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
-            AND tt2.name like CONCAT('%', #{filterPageByDeptVO.name},'%')
-        </if>
-        <if test="filterPageByDeptVO.casesName != null and filterPageByDeptVO.casesName != ''">
-            AND tt2.cases_name like CONCAT('%', #{filterPageByDeptVO.casesName},'%')
-        </if>
-        ) t1,
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        count(*) AS mrNum
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        sys_user_dept f
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.beh_dept_id = f.dept_id
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
-            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="filterPageByDeptVO.userId!=null">
-            AND f.user_id = #{filterPageByDeptVO.userId}
-        </if>
-        <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
-            AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
-            AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
-        </if>
-        <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
-            AND a.doctor_name like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) t2
-        WHERE
-        t1.deptId = t2.deptId
-        AND t1.deptName = t2.deptName
-        )t
-    </select>
-
     <!-- 按模块统计质控缺陷数(分页) -->
     <select id="entryCountGroupByCasePage"  resultType="com.diagbot.dto.NumDTO">
         SELECT
@@ -1864,355 +1482,4 @@
         ROUND( sum( c.`level` = '丙' )/ count(*)* 100, 2 ) DESC) t
     </select>
 
-    <!-- 按模块统计质控缺陷数-科室(分页) -->
-    <select id="entryCountGroupByCaseAndDeptPage" resultType="com.diagbot.dto.NumDTO">
-        SELECT
-        t.id,
-        t.`NAME`,
-        t.deptId,
-        t.deptName,
-        t.num,
-        t.totleNum,
-        t.percent,
-        t.percentStr
-        FROM
-        (
-        SELECT
-        t1.caseId AS id,
-        t1.caseName AS NAME,
-        t1.deptId,
-        t1.deptName,
-        t1.num AS num,
-        t2.mrNum,
-        t3.originalNum,
-        t2.mrNum * t3.originalNum AS totleNum,
-        ROUND( t1.num /( t2.mrNum * t3.originalNum ), 4 ) AS percent,
-        CONCAT( ROUND( t1.num /( t2.mrNum * t3.originalNum )* 100, 2 ), '%' ) AS percentStr
-        FROM
-        (
-        SELECT
-        f.caseId,
-        e.NAME AS caseName,
-        f.deptId,
-        f.deptName,
-        f.num
-        FROM
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        d.cases_id AS caseId,
-        count(*) AS num
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        med_qcresult_detail d,
-        sys_user_dept g
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND g.is_deleted = 'N'
-        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 = c.behospital_code
-        AND a.behospital_code = d.behospital_code
-        AND a.beh_dept_id = g.dept_id
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
-            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="filterPageByDeptVO.userId!=null">
-            AND g.user_id = #{filterPageByDeptVO.userId}
-        </if>
-        <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
-            AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
-            AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
-        </if>
-        <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
-            and a.doctor_name like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
-        </if>
-        GROUP BY
-        d.cases_id,
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) f,
-        qc_cases e
-        WHERE
-        e.is_deleted = 'N'
-        AND f.caseId = e.id
-        <if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
-            AND e.name like CONCAT('%', #{filterPageByDeptVO.name},'%')
-        </if>
-        ) t1,
-        (
-        SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        COUNT(*) AS mrNum
-        FROM
-        med_behospital_info a,
-        med_qcresult_info c,
-        sys_user_dept d
-        WHERE
-        a.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = d.hospital_id
-        AND a.behospital_code = c.behospital_code
-        AND a.beh_dept_id = d.dept_id
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
-            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="filterPageByDeptVO.userId!=null">
-            AND d.user_id = #{filterPageByDeptVO.userId}
-        </if>
-        <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
-            AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
-            AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
-        </if>
-        <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
-            and a.doctor_name like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        a.beh_dept_name
-        ) t2,
-        (
-        SELECT
-        a.id AS caseId,
-        a.NAME AS caseName,
-        count(*) AS originalNum
-        FROM
-        qc_cases a,
-        qc_cases_entry b
-        WHERE
-        a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND a.id = b.cases_id
-        GROUP BY
-        a.id,
-        a.`name`
-        ) t3
-        WHERE
-        t1.caseId = t3.caseId
-        AND t1.caseName = t3.caseName
-        AND t1.deptId = t2.deptId
-        AND t1.deptName = t2.deptName
-        ) t
-    </select>
-
-    <!-- 缺陷详情-科室(分页) -->
-    <select id="entryCountGroupByEntryAndDeptPage"  resultType="com.diagbot.dto.EntryNumGroupDTO">
-        SELECT
-        t.*
-        FROM
-        (
-        SELECT
-        t1.deptId,
-        t1.deptName,
-        t1.id,
-        t1.NAME,
-        t1.casesId,
-        t1.casesName,
-        t1.ruleType,
-        t1.isReject,
-        t1.num,
-        t2.totleNum,
-        ROUND( t1.num / t2.totleNum, 4 ) AS percent,
-        CONCAT( ROUND( t1.num / t2.totleNum * 100, 2 ), '%' ) AS percentStr
-        FROM
-        (
-        SELECT
-        tt1.beh_dept_id AS deptId,
-        tt1.beh_dept_name AS deptName,
-        tt2.id AS id,
-        tt2.NAME AS NAME,
-        tt2.cases_id AS casesId,
-        tt2.cases_name AS casesName,
-        tt1.num,
-        tt2.rule_type AS ruleType,
-        tt1.is_reject AS isReject
-        FROM
-        (
-        SELECT
-        a.beh_dept_id,
-        a.beh_dept_name,
-        d.cases_id,
-        d.cases_entry_id,
-        d.is_reject,
-        count(*) AS num
-        FROM
-        med_behospital_info a,
-        med_qcresult_detail d,
-        sys_user_dept f
-        WHERE
-        a.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = d.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = d.behospital_code
-        AND a.beh_dept_id = f.dept_id
-        <if test="filterPageByDeptVO.userId!=null">
-            AND f.user_id = #{filterPageByDeptVO.userId}
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
-            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
-        </if>
-        AND a.qc_type_id != 0
-        <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
-            AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
-            AND a.beh_dept_name = #{filterPageByDeptVO.deptName}
-        </if>
-        <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
-            AND a.doctor_name  like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
-        </if>
-        <if test="filterPageByDeptVO.doctorId != null and filterPageByDeptVO.doctorId != ''">
-            AND a.doctor_id = #{filterPageByDeptVO.doctorId}
-        </if>
-        <if test="filterPageByDeptVO.casesId != null and filterPageByDeptVO.casesId != 0">
-            AND d.cases_id = #{filterPageByDeptVO.casesId}
-        </if>
-        <if test="filterPageByDeptVO.isReject != null">
-            AND d.is_reject = #{filterPageByDeptVO.isReject}
-        </if>
-        GROUP BY
-        d.cases_entry_id,
-        d.cases_id
-        ) tt1,
-        qc_cases_entry tt2
-        WHERE
-        tt2.is_deleted = 'N'
-        AND tt1.cases_id = tt2.cases_id
-        AND tt1.cases_entry_id = tt2.id
-        <if test="filterPageByDeptVO.casesName != null and filterPageByDeptVO.casesName != ''">
-            AND tt2.cases_name like CONCAT('%', #{filterPageByDeptVO.casesName},'%')
-        </if>
-        <if test="filterPageByDeptVO.name != null and filterPageByDeptVO.name != ''">
-            AND tt2.name like CONCAT('%', #{filterPageByDeptVO.name},'%')
-        </if>
-        <if test="filterPageByDeptVO.ruleType != null">
-            AND tt2.rule_type = #{filterPageByDeptVO.ruleType}
-        </if>
-        ) t1,(
-        SELECT
-        count(*) AS totleNum
-        FROM
-        med_behospital_info a,
-        med_qcresult_detail d,
-        qc_cases_entry e,
-        sys_user_dept f
-        WHERE
-        a.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND e.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = d.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = d.behospital_code
-        AND a.beh_dept_id = f.dept_id
-        <if test="filterPageByDeptVO.userId!=null">
-            AND f.user_id = #{filterPageByDeptVO.userId}
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
-            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
-        </if>
-        AND e.cases_id = d.cases_id
-        AND e.id = d.cases_entry_id
-        AND a.qc_type_id != 0
-        <if test="filterPageByDeptVO.hospitalId != null and filterPageByDeptVO.hospitalId != ''">
-            AND a.hospital_id = #{filterPageByDeptVO.hospitalId}
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 0">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.behospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.behospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile == 1">
-            <if test="filterPageByDeptVO.startDate != null and filterPageByDeptVO.startDate != ''">
-                <![CDATA[ AND a.leave_hospital_date >= #{filterPageByDeptVO.startDate}]]>
-            </if>
-            <if test="filterPageByDeptVO.endDate != null and filterPageByDeptVO.endDate != ''">
-                <![CDATA[ AND a.leave_hospital_date <= #{filterPageByDeptVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterPageByDeptVO.deptName != null and filterPageByDeptVO.deptName != ''">
-            AND a.beh_dept_name  =  #{filterPageByDeptVO.deptName}
-        </if>
-        <if test="filterPageByDeptVO.doctorName != null and filterPageByDeptVO.doctorName != ''">
-            AND a.doctor_name  like CONCAT('%', #{filterPageByDeptVO.doctorName}, '%')
-        </if>
-        <if test="filterPageByDeptVO.doctorId != null and filterPageByDeptVO.doctorId != ''">
-            AND a.doctor_id = #{filterPageByDeptVO.doctorId}
-        </if>
-        <if test="filterPageByDeptVO.isReject != null">
-            AND d.is_reject = #{filterPageByDeptVO.isReject}
-        </if>
-        <if test="filterPageByDeptVO.ruleType != null">
-            AND e.rule_type = #{filterPageByDeptVO.ruleType}
-        </if>
-        ) t2
-        )t
-    </select>
 </mapper>