Quellcode durchsuchen

增加全院二级以上报表

chengyao vor 3 Jahren
Ursprung
Commit
ccb5652268
19 geänderte Dateien mit 4269 neuen und 333 gelöschten Zeilen
  1. 92 0
      dblayer-mbg/src/main/java/com/lantone/dblayermbg/mapper/report/BehospitalInfoMapper.java
  2. 10 0
      dblayer-mbg/src/main/java/com/lantone/dblayermbg/mapper/report/QcresultInfoMapper.java
  3. 3049 0
      dblayer-mbg/src/main/resources/mapper/report/BehospitalInfoMapper.xml
  4. 144 0
      dblayer-mbg/src/main/resources/mapper/report/QcresultInfoMapper.xml
  5. 30 0
      report-service/src/main/java/com/lantone/report/facade/EntryCaseManagementFacade.java
  6. 90 1
      report-service/src/main/java/com/lantone/report/facade/FilterFacade.java
  7. 0 188
      report-service/src/main/java/com/lantone/report/facade/MedicalCheckManagementFacade.java
  8. 92 0
      report-service/src/main/java/com/lantone/report/facade/MrInfoManagementFacade.java
  9. 4 32
      report-service/src/main/java/com/lantone/report/facade/MedicalControlManagementFacade.java
  10. 293 0
      report-service/src/main/java/com/lantone/report/facade/MrQcInfoManagementFacade.java
  11. 169 0
      report-service/src/main/java/com/lantone/report/facade/QcCheckManagementFacade.java
  12. 1 1
      report-service/src/main/java/com/lantone/report/facade/MrScoreManagementFacade.java
  13. 25 0
      report-service/src/main/java/com/lantone/report/web/EntryCaseManagementController.java
  14. 0 85
      report-service/src/main/java/com/lantone/report/web/MedicalCheckManagementController.java
  15. 47 0
      report-service/src/main/java/com/lantone/report/web/MrInfoManagementController.java
  16. 5 5
      report-service/src/main/java/com/lantone/report/web/MedicalControlManagementController.java
  17. 144 0
      report-service/src/main/java/com/lantone/report/web/MrQcInfoManagementController.java
  18. 55 2
      report-service/src/main/java/com/lantone/report/web/QcCheckManagementController.java
  19. 19 19
      report-service/src/main/java/com/lantone/report/web/MrScoreManagementController.java

+ 92 - 0
dblayer-mbg/src/main/java/com/lantone/dblayermbg/mapper/report/BehospitalInfoMapper.java

@@ -2,6 +2,7 @@ package com.lantone.dblayermbg.mapper.report;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.lantone.common.dto.report.BehospitalInfoDTO;
 import com.lantone.common.dto.report.CaseScoreDTO;
 import com.lantone.common.dto.report.EntryStatisticsDTO;
 import com.lantone.common.dto.report.ExportExcelDTO;
@@ -20,10 +21,12 @@ import com.lantone.common.dto.report.UnModifyMRDetailDTO;
 import com.lantone.common.vo.report.BehospitalPageVO;
 import com.lantone.common.vo.report.CaseScoreVO;
 import com.lantone.common.vo.report.EntryStatisticsVO;
+import com.lantone.common.vo.report.ExportQcresultVO;
 import com.lantone.common.vo.report.FilterMedicalCheckVO;
 import com.lantone.common.vo.report.FilterOrderVO;
 import com.lantone.common.vo.report.FilterUnModifyMRVO;
 import com.lantone.common.vo.report.FilterVO;
+import com.lantone.common.vo.report.QcResultPageVO;
 import com.lantone.common.vo.report.QcResultShortPageVO;
 import com.lantone.common.vo.report.ReBeHosPageVO;
 import com.lantone.dblayermbg.entity.report.BehospitalInfo;
@@ -230,4 +233,93 @@ public interface BehospitalInfoMapper extends BaseMapper<BehospitalInfo> {
      */
     public List<CaseScoreDTO> getQualityCaseSorce(CaseScoreVO caseScoreVO);
 
+    /**
+     * 病历分页列表
+     * @param behospitalPageVO
+     * @return
+     */
+    public IPage<BehospitalInfoDTO> getPage(BehospitalPageVO behospitalPageVO);
+
+    /**
+     * 病历列表-报表导出
+     *
+     * @param exportQcresultVO
+     * @return
+     */
+    public List<ExportExcelDTO> exportQcresult(ExportQcresultVO exportQcresultVO);
+
+    /**
+     * 条目缺陷质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> qcResultShortPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 条目缺陷病历列表-报表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public List<ExportExcelDTO> qcResultShortPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 病案首页合格|不合格病历列表-报表
+     *
+     * @param qcResultPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> badLevelPage(@Param("qcResultPageVO") QcResultPageVO qcResultPageVO);
+
+    /**
+     *  病案首页合格|不合格病历列表-报表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+
+    public List<ExportExcelDTO> badLevelPagePageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 质控核查统计病历列表-报表
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> qcCheckMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 质控核查质控评分页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public List<ExportExcelDTO> qcCheckMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 病案首页改善率质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> hmImproveMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 时效性|稽查条目病历列表-报表
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> unModifyMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
+    /**
+     * 未整改病历缺陷评分详情页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+
+    public List<ExportExcelDTO> unModifyMRPageExport(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO);
+
 }

+ 10 - 0
dblayer-mbg/src/main/java/com/lantone/dblayermbg/mapper/report/QcresultInfoMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.lantone.common.dto.report.AverageStatisticsDTO;
 import com.lantone.common.dto.report.DeptNumDTO;
 import com.lantone.common.dto.report.EntryNumDTO;
+import com.lantone.common.dto.report.EntryNumGroupDTO;
 import com.lantone.common.dto.report.NumDTO;
 import com.lantone.common.vo.report.FilterPageVO;
 import com.lantone.common.vo.report.FilterVO;
@@ -107,4 +108,13 @@ public interface QcresultInfoMapper extends BaseMapper<QcresultInfo> {
      */
     public List<EntryNumDTO> entryRejectPercent(FilterVO filterVO);
 
+    /**
+     * 缺陷详情(分页)
+     *
+     * @param filterPageVO
+     * @return
+     */
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
+
+
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 3049 - 0
dblayer-mbg/src/main/resources/mapper/report/BehospitalInfoMapper.xml


+ 144 - 0
dblayer-mbg/src/main/resources/mapper/report/QcresultInfoMapper.xml

@@ -942,4 +942,148 @@
         ORDER BY
         percent DESC
     </select>
+
+    <!-- 缺陷详情(分页) -->
+    <select id="entryCountGroupByEntryPage"  resultType="com.lantone.common.dto.report.EntryNumGroupDTO">
+        SELECT
+        t.*
+        FROM
+        (
+        SELECT
+        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
+        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
+        d.cases_id,
+        d.cases_entry_id,
+        d.is_reject,
+        count(*) AS num
+        FROM
+        med_behospital_info a,
+        med_qcresult_detail d
+        WHERE
+        a.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND a.hospital_id = d.hospital_id
+        AND a.behospital_code = d.behospital_code
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
+        AND a.qc_type_id != 0
+        <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
+            AND a.hospital_id = #{filterPageVO.hospitalId}
+        </if>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
+        </if>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
+        </if>
+        <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
+            AND a.beh_dept_name = #{filterPageVO.deptName}
+        </if>
+        <if test="filterPageVO.casesId != null and filterPageVO.casesId != 0">
+            AND d.cases_id = #{filterPageVO.casesId}
+        </if>
+        <if test="filterPageVO.isReject != null">
+            AND d.is_reject = #{filterPageVO.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="filterPageVO.casesName != null and filterPageVO.casesName != ''">
+            AND tt2.cases_name like CONCAT('%', #{filterPageVO.casesName},'%')
+        </if>
+        <if test="filterPageVO.name != null and filterPageVO.name != ''">
+            AND tt2.name like CONCAT('%', #{filterPageVO.name},'%')
+        </if>
+        <if test="filterPageVO.ruleType != null">
+            AND tt2.rule_type = #{filterPageVO.ruleType}
+        </if>
+        ) t1,(
+        SELECT
+        count(*) AS totleNum
+        FROM
+        med_behospital_info a,
+        med_qcresult_detail d,
+        qc_cases_entry e
+        WHERE
+        a.is_deleted = 'N'
+        AND d.is_deleted = 'N'
+        AND e.is_deleted = 'N'
+        AND a.hospital_id = d.hospital_id
+        AND a.behospital_code = d.behospital_code
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
+        AND e.cases_id = d.cases_id
+        AND e.id = d.cases_entry_id
+        AND a.qc_type_id != 0
+        <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
+            AND a.hospital_id = #{filterPageVO.hospitalId}
+        </if>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.behospital_date <= #{filterPageVO.endDate}]]>
+            </if>
+        </if>
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 1">
+            <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
+                <![CDATA[ AND a.leave_hospital_date >= #{filterPageVO.startDate}]]>
+            </if>
+            <if test="filterPageVO.endDate != null and filterPageVO.endDate != ''">
+                <![CDATA[ AND a.leave_hospital_date <= #{filterPageVO.endDate}]]>
+            </if>
+        </if>
+        <if test="filterPageVO.deptName != null and filterPageVO.deptName != ''">
+            AND a.beh_dept_name  =  #{filterPageVO.deptName}
+        </if>
+        <if test="filterPageVO.isReject != null">
+            AND d.is_reject = #{filterPageVO.isReject}
+        </if>
+        <if test="filterPageVO.ruleType != null">
+            AND e.rule_type = #{filterPageVO.ruleType}
+        </if>
+        ) t2
+        )t
+    </select>
+
 </mapper>

+ 30 - 0
report-service/src/main/java/com/lantone/report/facade/EntryCaseManagementFacade.java

@@ -3,6 +3,7 @@ package com.lantone.report.facade;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.google.common.collect.Lists;
 import com.lantone.common.dto.report.EntryNumDTO;
+import com.lantone.common.dto.report.EntryNumGroupDTO;
 import com.lantone.common.dto.report.EntryStatisticsDTO;
 import com.lantone.common.dto.report.NumDTO;
 import com.lantone.common.util.ExcelUtils;
@@ -184,6 +185,35 @@ public class EntryCaseManagementFacade {
         return records;
     }
 
+    /**
+     * 缺陷详情(分页)
+     * @param filterPageVO
+     * @return
+     */
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(FilterPageVO filterPageVO) {
+        filterFacade.filterPageVOSet(filterPageVO);
+        if (filterPageVO.getDeptName().equals("全院")) {
+            filterPageVO.setDeptName("");
+        }
+        IPage<EntryNumGroupDTO> page = qcresultInfoFacade.getBaseMapper().entryCountGroupByEntryPage(filterPageVO);
+        return page;
+    }
+
+    /**
+     * 关键条目缺陷占比-缺陷列表-报表导出
+     *
+     * @param filterPageVO
+     * @return
+     */
+    public void entryCountGroupByEntryExport(HttpServletResponse response, FilterPageVO filterPageVO) {
+        filterPageVO.setCurrent(1L);
+        filterPageVO.setSize(Long.MAX_VALUE);
+        filterPageVO.setSearchCount(false);
+        IPage<EntryNumGroupDTO> page = this.entryCountGroupByEntryPage(filterPageVO);
+        String fileName = "缺陷详情.xls";
+        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", EntryNumGroupDTO.class, fileName, response, 12.8f);
+    }
+
     /**
      * 关键条目缺陷占比统计
      *

+ 90 - 1
report-service/src/main/java/com/lantone/report/facade/FilterFacade.java

@@ -1,10 +1,13 @@
 package com.lantone.report.facade;
 
 import cn.hutool.core.bean.BeanUtil;
+import com.lantone.common.exception.ApiException;
 import com.lantone.common.util.DateUtil;
 import com.lantone.common.util.StringUtil;
 import com.lantone.common.util.SysUserUtils;
+import com.lantone.common.vo.report.BehospitalPageVO;
 import com.lantone.common.vo.report.EntryStatisticsVO;
+import com.lantone.common.vo.report.ExportQcresultVO;
 import com.lantone.common.vo.report.FilterMedicalCheckVO;
 import com.lantone.common.vo.report.FilterOrderByDeptVO;
 import com.lantone.common.vo.report.FilterOrderVO;
@@ -301,6 +304,92 @@ public class FilterFacade {
         return days;
     }
 
+
+    public void behospitalPageSet(BehospitalPageVO behospitalPageVO) {
+        //入参验证
+        //入院时间
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
+            behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
+            behospitalPageVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getBehosDateEnd(), 1)));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
+            if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
+                throw new ApiException("入院时间的开始时间必须小于结束时间!");
+            }
+        }
+        //出院时间
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
+            behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
+            behospitalPageVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getLeaveHosDateEnd(), 1)));
+        }
+        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
+            if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
+                throw new ApiException("出院时间的开始时间必须小于结束时间!");
+            }
+        }
+        behospitalPageVO.setHospitalId(SysUserUtils.getCurrentHospitalId());
+
+    }
+
+
+    public void exportQcresultVOSet(ExportQcresultVO exportQcresultVO) {
+        //入参验证
+        long interval_7 = 7 * 24 * 60 * 60 * 1000;
+        long interval_90 = 90 * 24 * 60 * 60 * 1000l;
+        //入院时间
+        if (null != exportQcresultVO && null != exportQcresultVO.getBehosDateStart() && null != exportQcresultVO.getBehosDateEnd()) {
+            Date startDate = exportQcresultVO.getBehosDateStart();
+            Date endDate = exportQcresultVO.getBehosDateEnd();
+            if ("1".equals(exportQcresultVO.getRadioCheck())) {
+                //时间间隔7天
+                if (endDate.getTime() < startDate.getTime()) {
+                    throw new ApiException("截止时间不能小于起始时间");
+                }
+                if (endDate.getTime() - startDate.getTime() > interval_7) {
+                    throw new ApiException("统计区间不能大于7天");
+                }
+            } else {
+                //时间间隔90天
+                if (endDate.getTime() < startDate.getTime()) {
+                    throw new ApiException( "截止时间不能小于起始时间");
+                }
+                if (endDate.getTime() - startDate.getTime() > interval_90) {
+                    throw new ApiException( "统计区间不能大于90天");
+                }
+            }
+            exportQcresultVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(exportQcresultVO.getBehosDateStart()));
+            exportQcresultVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(exportQcresultVO.getBehosDateEnd(), 1)));
+        }
+        //出院时间
+        if (null != exportQcresultVO && null != exportQcresultVO.getLeaveHosDateStart() && null != exportQcresultVO.getLeaveHosDateEnd()) {
+            Date startDate = exportQcresultVO.getLeaveHosDateStart();
+            Date endDate = exportQcresultVO.getLeaveHosDateEnd();
+            if ("1".equals(exportQcresultVO.getRadioCheck())) {
+                //时间间隔7天
+                if (endDate.getTime() < startDate.getTime()) {
+                    throw new ApiException("截止时间不能小于起始时间");
+                }
+                if (endDate.getTime() - startDate.getTime() > interval_7) {
+                    throw new ApiException("统计区间不能大于7天");
+                }
+            } else {
+                //时间间隔90天
+                if (endDate.getTime() < startDate.getTime()) {
+                    throw new ApiException("截止时间不能小于起始时间");
+                }
+                if (endDate.getTime() - startDate.getTime() > interval_90) {
+                    throw new ApiException( "统计区间不能大于90天");
+                }
+            }
+            exportQcresultVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(exportQcresultVO.getLeaveHosDateStart()));
+            exportQcresultVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(exportQcresultVO.getLeaveHosDateEnd(), 1)));
+        }
+    }
+
     /**
      * 分页入参拼接
      *
@@ -310,7 +399,7 @@ public class FilterFacade {
         String hospitalId = String.valueOf(SysUserUtils.getCurrentHospitalId());
         String userId = String.valueOf(SysUserUtils.getCurrentPrincipleId());
         filterPageVO.setHospitalId(hospitalId);
-        // filterPageVO.setUserId(Long.valueOf(userId));
+         filterPageVO.setUserId(Long.valueOf(userId));
         if (StringUtil.isBlank(filterPageVO.getStartDate())) {
             String startDate = getStartDateStr(filterPageVO.getType(), null);
             filterPageVO.setStartDate(startDate);

+ 0 - 188
report-service/src/main/java/com/lantone/report/facade/MedicalCheckManagementFacade.java

@@ -1,188 +0,0 @@
-package com.lantone.report.facade;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.google.common.collect.Lists;
-import com.lantone.common.dto.report.MedicalCheckDTO;
-import com.lantone.common.dto.report.MedicalCheckExportDTO;
-import com.lantone.common.dto.report.MedicalCheckIdNameDTO;
-import com.lantone.common.util.ExcelUtils;
-import com.lantone.common.util.StringUtil;
-import com.lantone.common.vo.report.FilterMedicalCheckVO;
-import com.lantone.dblayermbg.entity.HospitalSet;
-import com.lantone.dblayermbg.facade.HospitalSetFacade;
-import com.lantone.dblayermbg.facade.report.BehospitalInfoFacade;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.Arrays;
-import java.util.List;
-
-
-@Component
-public class MedicalCheckManagementFacade {
-
-    @Autowired
-    private FilterFacade filterFacade;
-    @Autowired
-    private BehospitalInfoFacade behospitalInfoFacade;
-    @Autowired
-    private HospitalSetFacade hospitalSetFacade;
-
-    /**
-     * 病历稽查表
-     *
-     * @param filterVO
-     * @return
-     */
-    public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO) {
-        filterFacade.getMedicalCheckVOSet(filterVO);
-        //colums
-        QueryWrapper<HospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
-        hospitalSetQueryWrapper.eq("is_deleted", 'N')
-                .eq("hospital_id", filterVO.getHospitalId())
-                .eq("code", "medical_check_form");
-        HospitalSet hospitalSet = hospitalSetFacade.getOne(hospitalSetQueryWrapper);
-
-        //表头生成
-        List<String> columnSet = Arrays.asList(hospitalSet.getVal().split(","));
-
-        //目标条目
-        List<Long> casesEntryIds = Lists.newArrayList();
-        //遍历第一个条目
-        for (String valueStr : columnSet) {
-            if (StringUtil.isBlank(valueStr)) {
-                continue;
-            }
-            String[] keyValue = valueStr.split("--");
-            if (keyValue != null || keyValue.length > 1) {
-                casesEntryIds.add(Long.valueOf(keyValue[0]));
-            }
-        }
-        IPage<MedicalCheckDTO> medicalCheck = getMedicalCheck(filterVO, casesEntryIds);
-        return medicalCheck;
-    }
-
-    /**
-     * 病历稽查表
-     *
-     * @param filterVO
-     * @return
-     */
-    public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO, @Param("casesEntryIds") List<Long> casesEntryIds) {
-        IPage<MedicalCheckDTO> medicalCheck = behospitalInfoFacade.getBaseMapper().getMedicalCheck(filterVO);
-        List<MedicalCheckIdNameDTO> medicalEntryIds = behospitalInfoFacade.getBaseMapper().getMedicalEntryIds(casesEntryIds);
-
-        List<MedicalCheckDTO> records = medicalCheck.getRecords();
-        for (MedicalCheckDTO record : records) {
-            for (MedicalCheckIdNameDTO medicalEntryId : medicalEntryIds) {
-                if ("2170".equals(medicalEntryId.getId())) {
-                    record.setEntry_2170_id(medicalEntryId.getId());
-                    record.setEntry_2170_name(medicalEntryId.getName());
-                }
-                if ("2217".equals(medicalEntryId.getId())) {
-                    record.setEntry_2217_id(medicalEntryId.getId());
-                    record.setEntry_2217_name(medicalEntryId.getName());
-                }
-                if ("2218".equals(medicalEntryId.getId())) {
-                    record.setEntry_2218_id(medicalEntryId.getId());
-                    record.setEntry_2218_name(medicalEntryId.getName());
-                }
-                if ("2220".equals(medicalEntryId.getId())) {
-                    record.setEntry_2220_id(medicalEntryId.getId());
-                    record.setEntry_2220_name(medicalEntryId.getName());
-                }
-                if ("2229".equals(medicalEntryId.getId())) {
-                    record.setEntry_2229_id(medicalEntryId.getId());
-                    record.setEntry_2229_name(medicalEntryId.getName());
-                }
-                if ("2287".equals(medicalEntryId.getId())) {
-                    record.setEntry_2287_id(medicalEntryId.getId());
-                    record.setEntry_2287_name(medicalEntryId.getName());
-                }
-                if ("2486".equals(medicalEntryId.getId())) {
-                    record.setEntry_2486_id(medicalEntryId.getId());
-                    record.setEntry_2486_name(medicalEntryId.getName());
-                }
-                if ("2495".equals(medicalEntryId.getId())) {
-                    record.setEntry_2495_id(medicalEntryId.getId());
-                    record.setEntry_2495_name(medicalEntryId.getName());
-                }
-                if ("2654".equals(medicalEntryId.getId())) {
-                    record.setEntry_2654_id(medicalEntryId.getId());
-                    record.setEntry_2654_name(medicalEntryId.getName());
-                }
-                if ("2655".equals(medicalEntryId.getId())) {
-                    record.setEntry_2655_id(medicalEntryId.getId());
-                    record.setEntry_2655_name(medicalEntryId.getName());
-                }
-                if ("2657".equals(medicalEntryId.getId())) {
-                    record.setEntry_2657_id(medicalEntryId.getId());
-                    record.setEntry_2657_name(medicalEntryId.getName());
-                }
-                if ("2658".equals(medicalEntryId.getId())) {
-                    record.setEntry_2658_id(medicalEntryId.getId());
-                    record.setEntry_2658_name(medicalEntryId.getName());
-                }
-                if ("2686".equals(medicalEntryId.getId())) {
-                    record.setEntry_2686_id(medicalEntryId.getId());
-                    record.setEntry_2686_name(medicalEntryId.getName());
-                }
-                if ("2852".equals(medicalEntryId.getId())) {
-                    record.setEntry_2852_id(medicalEntryId.getId());
-                    record.setEntry_2852_name(medicalEntryId.getName());
-                }
-                if ("2900".equals(medicalEntryId.getId())) {
-                    record.setEntry_2900_id(medicalEntryId.getId());
-                    record.setEntry_2900_name(medicalEntryId.getName());
-                }
-                if ("2930".equals(medicalEntryId.getId())) {
-                    record.setEntry_2930_id(medicalEntryId.getId());
-                    record.setEntry_2930_name(medicalEntryId.getName());
-                }
-                if ("3010".equals(medicalEntryId.getId())) {
-                    record.setEntry_3010_id(medicalEntryId.getId());
-                    record.setEntry_3010_name(medicalEntryId.getName());
-                }
-                if ("3025".equals(medicalEntryId.getId())) {
-                    record.setEntry_3025_id(medicalEntryId.getId());
-                    record.setEntry_3025_name(medicalEntryId.getName());
-                }
-                if ("3062".equals(medicalEntryId.getId())) {
-                    record.setEntry_3062_id(medicalEntryId.getId());
-                    record.setEntry_3062_name(medicalEntryId.getName());
-                }
-                if ("3063".equals(medicalEntryId.getId())) {
-                    record.setEntry_3063_id(medicalEntryId.getId());
-                    record.setEntry_3063_name(medicalEntryId.getName());
-                }
-            }
-        }
-
-        return medicalCheck;
-
-    }
-
-    /**
-     * 稽查统计导出(首页)
-     *
-     * @param filterVO
-     * @return
-     */
-    public void medicalCheckExport(HttpServletResponse response, FilterMedicalCheckVO filterVO) {
-        filterVO.setCurrent(1L);
-        filterVO.setSize(Long.MAX_VALUE);
-        filterVO.setSearchCount(false);
-        String fileName = null;
-        if ("1".equals(filterVO.getIsPlacefile())) {
-            fileName = "终末病历稽查表.xls";
-        } else {
-            fileName = "运行病历稽查表.xls";
-        }
-        filterFacade.getMedicalCheckVOSet(filterVO);
-        List<MedicalCheckExportDTO> records = behospitalInfoFacade.getBaseMapper().getMedicalCheckExport(filterVO);
-        ExcelUtils.exportExcel(records, null, "sheet1", MedicalCheckExportDTO.class, fileName, response, 15.8f);
-    }
-}

+ 92 - 0
report-service/src/main/java/com/lantone/report/facade/MrInfoManagementFacade.java

@@ -0,0 +1,92 @@
+package com.lantone.report.facade;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.lantone.common.dto.report.BehospitalInfoDTO;
+import com.lantone.common.dto.report.ExportExcelBehospitalDTO;
+import com.lantone.common.dto.report.ExportExcelDTO;
+import com.lantone.common.dto.report.ExportExcelWideBehospitalDTO;
+import com.lantone.common.dto.report.ExportWideExcelDTO;
+import com.lantone.common.util.ExcelUtils;
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.util.SysUserUtils;
+import com.lantone.common.vo.report.BehospitalPageVO;
+import com.lantone.common.vo.report.ExportQcresultVO;
+import com.lantone.dblayermbg.facade.report.BehospitalInfoFacade;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+
+
+@Component
+public class MrInfoManagementFacade {
+
+    @Autowired
+    private FilterFacade filterFacade;
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+
+    /**
+     * 病历分页列表
+     *
+     * @param behospitalPageVO
+     * @return
+     */
+    public IPage<BehospitalInfoDTO> pageFac(BehospitalPageVO behospitalPageVO) {
+        filterFacade.behospitalPageSet(behospitalPageVO);
+        IPage<BehospitalInfoDTO> res = behospitalInfoFacade.getBaseMapper().getPage(behospitalPageVO);
+        return res;
+    }
+
+    /**
+     * 病历分页导出
+     *
+     * @param response
+     * @param exportQcresultVO
+     */
+    public void exportQcresult(HttpServletResponse response, ExportQcresultVO exportQcresultVO) {
+        exportQcresultVO.setHospitalId(String.valueOf(SysUserUtils.getCurrentHospitalId()));
+        //时间设置
+        filterFacade.exportQcresultVOSet(exportQcresultVO);
+        List<ExportExcelDTO> res = behospitalInfoFacade.getBaseMapper().exportQcresult(exportQcresultVO);
+        List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
+        if ("2".equals(exportQcresultVO.getRadioCheck())) {
+            resWide = transList(res, resWide);
+        }
+        String fileName = "抽查住院病历质量情况.xls";
+        response.setContentType("text/html;charset=UTF-8");
+        if ("1".equals(exportQcresultVO.getRadioCheck())) {
+            ExcelUtils.exportExcelUser(res, null, "sheet1", ExportExcelDTO.class, fileName, response);
+        }
+        if ("2".equals(exportQcresultVO.getRadioCheck())) {
+            ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
+        }
+    }
+
+    public List<ExportWideExcelDTO> transList(List<ExportExcelDTO> res, List<ExportWideExcelDTO> resWide) {
+        if (ListUtil.isNotEmpty(res)) {
+            res.forEach(exportExcelDTO -> {
+                ExportWideExcelDTO exportWideExcelDTO = new ExportWideExcelDTO();
+                exportWideExcelDTO.setAvgScore(exportExcelDTO.getAvgScore());
+                exportWideExcelDTO.setBehDeptName(exportExcelDTO.getBehDeptName());
+                List<ExportExcelBehospitalDTO> excelBehospitalDTOS = exportExcelDTO.getExcelBehospitalDTOS();
+                List<ExportExcelWideBehospitalDTO> exportExcelWideBehospitalDTOs = new ArrayList<>();
+                excelBehospitalDTOS.forEach(exportExcelBehospitalDTO -> {
+                    ExportExcelWideBehospitalDTO exportExcelWideBehospitalDTO = new ExportExcelWideBehospitalDTO();
+                    exportExcelWideBehospitalDTO.setDoctorName(exportExcelBehospitalDTO.getDoctorName());
+                    exportExcelWideBehospitalDTO.setBehospitalCode(exportExcelBehospitalDTO.getBehospitalCode());
+                    exportExcelWideBehospitalDTO.setBehospitalDate(exportExcelBehospitalDTO.getBehospitalDate());
+                    exportExcelWideBehospitalDTO.setLeaveHospitalDate(exportExcelBehospitalDTO.getLeaveHospitalDate());
+                    exportExcelWideBehospitalDTO.setPatName(exportExcelBehospitalDTO.getPatName());
+                    exportExcelWideBehospitalDTO.setScore(exportExcelBehospitalDTO.getScore());
+                    exportExcelWideBehospitalDTO.setScoreBn(exportExcelBehospitalDTO.getScoreBn());
+                    exportExcelWideBehospitalDTOs.add(exportExcelWideBehospitalDTO);
+                });
+                exportWideExcelDTO.setExcelBehospitalDTOS(exportExcelWideBehospitalDTOs);
+                resWide.add(exportWideExcelDTO);
+            });
+        }
+        return resWide;
+    }
+}

+ 4 - 32
report-service/src/main/java/com/lantone/report/facade/MedicalControlManagementFacade.java

@@ -7,7 +7,6 @@ import com.lantone.common.dto.report.QualityControlNullDTO;
 import com.lantone.common.exception.ApiException;
 import com.lantone.common.util.BeanUtil;
 import com.lantone.common.util.BigDecimalUtil;
-import com.lantone.common.util.DateUtil;
 import com.lantone.common.util.ExcelUtils;
 import com.lantone.common.util.ListUtil;
 import com.lantone.common.util.SysUserUtils;
@@ -31,8 +30,10 @@ import java.util.Map;
 
 
 @Component
-public class MedicalControlManagementFacade {
+public class MrQcCaseManagementFacade {
 
+    @Autowired
+    private FilterFacade filterFacade;
     @Autowired
     private BehospitalInfoFacade behospitalInfoFacade;
 
@@ -43,7 +44,7 @@ public class MedicalControlManagementFacade {
      * @return
      */
     public IPage<QualityControlDTO> getQualityControl(BehospitalPageVO behospitalPageVO) {
-        behospitalPageSet(behospitalPageVO);
+        filterFacade.behospitalPageSet(behospitalPageVO);
         IPage<QualityControlDTO> records = behospitalInfoFacade.getBaseMapper().getQualityControl(behospitalPageVO);
         List<QualityControlDTO> qualityControlDTOs = records.getRecords();
         CaseScoreVO caseScoreVO = new CaseScoreVO();
@@ -112,35 +113,6 @@ public class MedicalControlManagementFacade {
     }
 
 
-    private void behospitalPageSet(BehospitalPageVO behospitalPageVO) {
-        //入参验证
-        //入院时间
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart()) {
-            behospitalPageVO.setBehosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getBehosDateStart()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateEnd()) {
-            behospitalPageVO.setBehosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getBehosDateEnd(), 1)));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getBehosDateStart() && null != behospitalPageVO.getBehosDateEnd()) {
-            if (DateUtil.after(behospitalPageVO.getBehosDateStart(), behospitalPageVO.getBehosDateEnd())) {
-                throw new ApiException("入院时间的开始时间必须小于结束时间!");
-            }
-        }
-        //出院时间
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart()) {
-            behospitalPageVO.setLeaveHosDateStart(DateUtil.getFirstTimeOfDay(behospitalPageVO.getLeaveHosDateStart()));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateEnd()) {
-            behospitalPageVO.setLeaveHosDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(behospitalPageVO.getLeaveHosDateEnd(), 1)));
-        }
-        if (null != behospitalPageVO && null != behospitalPageVO.getLeaveHosDateStart() && null != behospitalPageVO.getLeaveHosDateEnd()) {
-            if (DateUtil.after(behospitalPageVO.getLeaveHosDateStart(), behospitalPageVO.getLeaveHosDateEnd())) {
-                throw new ApiException("出院时间的开始时间必须小于结束时间!");
-            }
-        }
-        behospitalPageVO.setHospitalId(SysUserUtils.getCurrentHospitalId());
-
-    }
 
     /**
      * 评结果分数(长兴)

+ 293 - 0
report-service/src/main/java/com/lantone/report/facade/MrQcInfoManagementFacade.java

@@ -0,0 +1,293 @@
+package com.lantone.report.facade;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.lantone.common.dto.report.ExportExcelBehospitalDTO;
+import com.lantone.common.dto.report.ExportExcelDTO;
+import com.lantone.common.dto.report.ExportExcelWideBehospitalDTO;
+import com.lantone.common.dto.report.ExportWideExcelDTO;
+import com.lantone.common.dto.report.QcResultShortDTO;
+import com.lantone.common.exception.ApiException;
+import com.lantone.common.util.ExcelUtils;
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.common.util.SysUserUtils;
+import com.lantone.common.vo.report.QcResultPageVO;
+import com.lantone.common.vo.report.QcResultShortPageVO;
+import com.lantone.dblayermbg.facade.report.BehospitalInfoFacade;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@Component
+public class MrQcInfoManagementFacade {
+
+    @Autowired
+    private FilterFacade filterFacade;
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+
+    /**
+     * 条目缺陷质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> qcResultShortPage(QcResultShortPageVO qcResultShortPageVO) {
+        filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
+        IPage<QcResultShortDTO> page = behospitalInfoFacade.getBaseMapper().qcResultShortPage(qcResultShortPageVO);
+        return page;
+    }
+
+    /**
+     * 条目缺陷病历列表-报表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public void qcResultShortPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
+        String hospitalId = String.valueOf(SysUserUtils.getCurrentHospitalId());
+        qcResultShortPageVO.setHospitalId(hospitalId);
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
+        }
+        Date startDate = qcResultShortPageVO.getStartDate();
+        Date endDate = qcResultShortPageVO.getEndDate();
+        //时间间隔90天
+        long interval = 90 * 24l * 60l * 60l * 1000l;
+        if (endDate.getTime() < startDate.getTime()) {
+            throw new ApiException( "截止时间不能小于起始时间");
+        }
+        if (endDate.getTime() - startDate.getTime() > interval) {
+            throw new ApiException( "统计区间不能大于90天");
+        }
+
+        qcResultShortPageVO.setCurrent(1L);
+        qcResultShortPageVO.setSize(Long.MAX_VALUE);
+        qcResultShortPageVO.setSearchCount(false);
+        List<ExportExcelDTO> record = behospitalInfoFacade.getBaseMapper().qcResultShortPageExport(qcResultShortPageVO);
+        String fileName = "缺陷详情质控评分页.xls";
+        ExcelUtils.exportExcelUser(record, null, "sheet1", ExportExcelDTO.class, fileName, response);
+    }
+
+    /**
+     * 质控核查统计病历列表-报表
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> qcCheckMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
+        return behospitalInfoFacade.getBaseMapper().qcCheckMRPage(qcResultShortPageVO);
+    }
+
+    /**
+     * 质控核查统计病历AB列表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public void qcCheckMRPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
+        String hospitalId = String.valueOf(SysUserUtils.getCurrentHospitalId());
+        qcResultShortPageVO.setHospitalId(hospitalId);
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
+        }
+        Date startDate = qcResultShortPageVO.getStartDate();
+        Date endDate = qcResultShortPageVO.getEndDate();
+
+        //时间间隔7天
+        long interval_7 = 7 * 24 * 60 * 60 * 1000;
+        long interval_90 = 90 * 24 * 60 * 60 * 1000l;
+
+        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+            //时间间隔7天
+            if (endDate.getTime() < startDate.getTime()) {
+                throw new ApiException( "截止时间不能小于起始时间");
+            }
+            if (endDate.getTime() - startDate.getTime() > interval_7) {
+                throw new ApiException( "统计区间不能大于7天");
+            }
+        }else{
+            //时间间隔90天
+            if (endDate.getTime() < startDate.getTime()) {
+                throw new ApiException("截止时间不能小于起始时间");
+            }
+            if (endDate.getTime() - startDate.getTime() > interval_90) {
+                throw new ApiException( "统计区间不能大于90天");
+            }
+        }
+
+        qcResultShortPageVO.setCurrent(1L);
+        qcResultShortPageVO.setSize(Long.MAX_VALUE);
+        qcResultShortPageVO.setSearchCount(false);
+        List<ExportExcelDTO> records = behospitalInfoFacade.getBaseMapper().qcCheckMRPageExport(qcResultShortPageVO);
+        List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
+        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+            resWide = transList(records, resWide);
+        }
+        String fileName = "质控核查病历导出.xls";
+        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+            ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
+        }
+        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+            ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
+        }
+    }
+
+    /**
+     * 病案首页改善率质控评分页(内页)
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> hmImproveMRPage(@Param("qcResultShortPageVO") QcResultShortPageVO qcResultShortPageVO) {
+        filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
+        return behospitalInfoFacade.getBaseMapper().hmImproveMRPage(qcResultShortPageVO);
+    }
+
+
+
+    /**
+     * 病案首页合格|不合格病历列表-报表
+     *
+     * @param qcResultPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> badLevelPage(QcResultPageVO qcResultPageVO) {
+        filterFacade.badLevelPageVOSet(qcResultPageVO);
+        return behospitalInfoFacade.getBaseMapper().badLevelPage(qcResultPageVO);
+    }
+
+    /**
+     *  病案首页合格|不合格病历列表-报表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public void badLevelPagePageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
+        String hospitalId = String.valueOf(SysUserUtils.getCurrentHospitalId());
+        qcResultShortPageVO.setHospitalId(hospitalId);
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
+        }
+        Date startDate = qcResultShortPageVO.getStartDate();
+        Date endDate = qcResultShortPageVO.getEndDate();
+        //时间间隔7天
+        long interval_7 = 7 * 24 * 60 * 60 * 1000;
+        long interval_90 = 90 * 24 * 60 * 60 * 1000l;
+
+        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+            //时间间隔7天
+            if (endDate.getTime() < startDate.getTime()) {
+                throw new ApiException("截止时间不能小于起始时间");
+            }
+            if (endDate.getTime() - startDate.getTime() > interval_7) {
+                throw new ApiException("统计区间不能大于7天");
+            }
+        }else{
+            //时间间隔90天
+            if (endDate.getTime() < startDate.getTime()) {
+                throw new ApiException( "截止时间不能小于起始时间");
+            }
+            if (endDate.getTime() - startDate.getTime() > interval_90) {
+                throw new ApiException("统计区间不能大于90天");
+            }
+        }
+
+        qcResultShortPageVO.setCurrent(1L);
+        qcResultShortPageVO.setSize(Long.MAX_VALUE);
+        qcResultShortPageVO.setSearchCount(false);
+        List<ExportExcelDTO> records = behospitalInfoFacade.getBaseMapper().badLevelPagePageExport(qcResultShortPageVO);
+        List<ExportWideExcelDTO> resWide = new ArrayList<ExportWideExcelDTO>();
+        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+            resWide = transList(records, resWide);
+        }
+        String fileName = null;
+        if("不合格数".equals(qcResultShortPageVO.getTitleName())){
+            fileName = "病案首页不合格数病历详情页.xls";
+        }else{
+            fileName = "病案首页合格数病历详情页.xls";
+        }
+        if("1".equals(qcResultShortPageVO.getRadioCheck())){
+            ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
+        }
+        if("2".equals(qcResultShortPageVO.getRadioCheck())){
+            ExcelUtils.exportExcelUser(resWide, null, "sheet1", ExportWideExcelDTO.class, fileName, response);
+        }
+    }
+
+    public List<ExportWideExcelDTO> transList(List<ExportExcelDTO>res, List<ExportWideExcelDTO>resWide){
+        if(ListUtil.isNotEmpty(res)){
+            res.forEach(exportExcelDTO->{
+                ExportWideExcelDTO exportWideExcelDTO = new ExportWideExcelDTO();
+                exportWideExcelDTO.setAvgScore(exportExcelDTO.getAvgScore());
+                exportWideExcelDTO.setBehDeptName(exportExcelDTO.getBehDeptName());
+                List<ExportExcelBehospitalDTO> excelBehospitalDTOS = exportExcelDTO.getExcelBehospitalDTOS();
+                List<ExportExcelWideBehospitalDTO> exportExcelWideBehospitalDTOs = new ArrayList<>();
+                excelBehospitalDTOS.forEach(exportExcelBehospitalDTO->{
+                    ExportExcelWideBehospitalDTO exportExcelWideBehospitalDTO = new ExportExcelWideBehospitalDTO();
+                    exportExcelWideBehospitalDTO.setDoctorName(exportExcelBehospitalDTO.getDoctorName());
+                    exportExcelWideBehospitalDTO.setBehospitalCode(exportExcelBehospitalDTO.getBehospitalCode());
+                    exportExcelWideBehospitalDTO.setBehospitalDate(exportExcelBehospitalDTO.getBehospitalDate());
+                    exportExcelWideBehospitalDTO.setLeaveHospitalDate(exportExcelBehospitalDTO.getLeaveHospitalDate());
+                    exportExcelWideBehospitalDTO.setPatName(exportExcelBehospitalDTO.getPatName());
+                    exportExcelWideBehospitalDTO.setScore(exportExcelBehospitalDTO.getScore());
+                    exportExcelWideBehospitalDTO.setScoreBn(exportExcelBehospitalDTO.getScoreBn());
+                    exportExcelWideBehospitalDTOs.add(exportExcelWideBehospitalDTO);
+                });
+                exportWideExcelDTO.setExcelBehospitalDTOS(exportExcelWideBehospitalDTOs);
+                resWide.add(exportWideExcelDTO);
+            });
+        }
+        return resWide;
+    }
+
+    /**
+     * 时效性|稽查条目病历列表-报表
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public IPage<QcResultShortDTO> unModifyMRPage(QcResultShortPageVO qcResultShortPageVO) {
+        filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
+        return behospitalInfoFacade.getBaseMapper().unModifyMRPage(qcResultShortPageVO);
+    }
+
+    /**
+     * 未整改病历详情页导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    public void unModifyMRPageExport(HttpServletResponse response, QcResultShortPageVO qcResultShortPageVO) {
+        String hospitalId = String.valueOf(SysUserUtils.getCurrentHospitalId());
+        qcResultShortPageVO.setHospitalId(hospitalId);
+        if (StringUtil.isNotBlank(qcResultShortPageVO.getDeptName())
+                && qcResultShortPageVO.getDeptName().equals("全部")) {
+            qcResultShortPageVO.setDeptName("");
+        }
+        Date startDate = qcResultShortPageVO.getStartDate();
+        Date endDate = qcResultShortPageVO.getEndDate();
+        //时间间隔7天
+        long interval = 90 * 24l * 60l * 60l * 1000l;
+        if (endDate.getTime() < startDate.getTime()) {
+            throw new ApiException("截止时间不能小于起始时间");
+        }
+        if (endDate.getTime() - startDate.getTime() > interval) {
+            throw new ApiException("统计区间不能大于90天");
+        }
+
+        qcResultShortPageVO.setCurrent(1L);
+        qcResultShortPageVO.setSize(Long.MAX_VALUE);
+        qcResultShortPageVO.setSearchCount(false);
+        List<ExportExcelDTO> records = behospitalInfoFacade.getBaseMapper().unModifyMRPageExport(qcResultShortPageVO);
+        String fileName = "未整改病历详情页.xls";
+        ExcelUtils.exportExcelUser(records, null, "sheet1", ExportExcelDTO.class, fileName, response);
+    }
+}

+ 169 - 0
report-service/src/main/java/com/lantone/report/facade/QcCheckManagementFacade.java

@@ -1,11 +1,21 @@
 package com.lantone.report.facade;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.google.common.collect.Lists;
 import com.lantone.common.dto.report.HomePageImproveDTO;
+import com.lantone.common.dto.report.MedicalCheckDTO;
+import com.lantone.common.dto.report.MedicalCheckExportDTO;
+import com.lantone.common.dto.report.MedicalCheckIdNameDTO;
 import com.lantone.common.util.ExcelUtils;
 import com.lantone.common.util.ListUtil;
 import com.lantone.common.util.StringUtil;
+import com.lantone.common.vo.report.FilterMedicalCheckVO;
 import com.lantone.common.vo.report.FilterOrderVO;
+import com.lantone.dblayermbg.entity.HospitalSet;
+import com.lantone.dblayermbg.facade.HospitalSetFacade;
 import com.lantone.dblayermbg.facade.report.BehospitalInfoFacade;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -13,6 +23,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.text.DecimalFormat;
+import java.util.Arrays;
 import java.util.List;
 
 
@@ -23,6 +34,163 @@ public class QcCheckManagementFacade {
     private FilterFacade filterFacade;
     @Autowired
     private BehospitalInfoFacade behospitalInfoFacade;
+    @Autowired
+    private HospitalSetFacade hospitalSetFacade;
+
+    /**
+     * 病历稽查表
+     *
+     * @param filterVO
+     * @return
+     */
+    public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO) {
+        filterFacade.getMedicalCheckVOSet(filterVO);
+        //colums
+        QueryWrapper<HospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
+        hospitalSetQueryWrapper.eq("is_deleted", 'N')
+                .eq("hospital_id", filterVO.getHospitalId())
+                .eq("code", "medical_check_form");
+        HospitalSet hospitalSet = hospitalSetFacade.getOne(hospitalSetQueryWrapper);
+
+        //表头生成
+        List<String> columnSet = Arrays.asList(hospitalSet.getVal().split(","));
+
+        //目标条目
+        List<Long> casesEntryIds = Lists.newArrayList();
+        //遍历第一个条目
+        for (String valueStr : columnSet) {
+            if (StringUtil.isBlank(valueStr)) {
+                continue;
+            }
+            String[] keyValue = valueStr.split("--");
+            if (keyValue != null || keyValue.length > 1) {
+                casesEntryIds.add(Long.valueOf(keyValue[0]));
+            }
+        }
+        IPage<MedicalCheckDTO> medicalCheck = getMedicalCheck(filterVO, casesEntryIds);
+        return medicalCheck;
+    }
+
+    /**
+     * 病历稽查表
+     *
+     * @param filterVO
+     * @return
+     */
+    public IPage<MedicalCheckDTO> getMedicalCheck(@Param("filterVO") FilterMedicalCheckVO filterVO, @Param("casesEntryIds") List<Long> casesEntryIds) {
+        IPage<MedicalCheckDTO> medicalCheck = behospitalInfoFacade.getBaseMapper().getMedicalCheck(filterVO);
+        List<MedicalCheckIdNameDTO> medicalEntryIds = behospitalInfoFacade.getBaseMapper().getMedicalEntryIds(casesEntryIds);
+
+        List<MedicalCheckDTO> records = medicalCheck.getRecords();
+        for (MedicalCheckDTO record : records) {
+            for (MedicalCheckIdNameDTO medicalEntryId : medicalEntryIds) {
+                if ("2170".equals(medicalEntryId.getId())) {
+                    record.setEntry_2170_id(medicalEntryId.getId());
+                    record.setEntry_2170_name(medicalEntryId.getName());
+                }
+                if ("2217".equals(medicalEntryId.getId())) {
+                    record.setEntry_2217_id(medicalEntryId.getId());
+                    record.setEntry_2217_name(medicalEntryId.getName());
+                }
+                if ("2218".equals(medicalEntryId.getId())) {
+                    record.setEntry_2218_id(medicalEntryId.getId());
+                    record.setEntry_2218_name(medicalEntryId.getName());
+                }
+                if ("2220".equals(medicalEntryId.getId())) {
+                    record.setEntry_2220_id(medicalEntryId.getId());
+                    record.setEntry_2220_name(medicalEntryId.getName());
+                }
+                if ("2229".equals(medicalEntryId.getId())) {
+                    record.setEntry_2229_id(medicalEntryId.getId());
+                    record.setEntry_2229_name(medicalEntryId.getName());
+                }
+                if ("2287".equals(medicalEntryId.getId())) {
+                    record.setEntry_2287_id(medicalEntryId.getId());
+                    record.setEntry_2287_name(medicalEntryId.getName());
+                }
+                if ("2486".equals(medicalEntryId.getId())) {
+                    record.setEntry_2486_id(medicalEntryId.getId());
+                    record.setEntry_2486_name(medicalEntryId.getName());
+                }
+                if ("2495".equals(medicalEntryId.getId())) {
+                    record.setEntry_2495_id(medicalEntryId.getId());
+                    record.setEntry_2495_name(medicalEntryId.getName());
+                }
+                if ("2654".equals(medicalEntryId.getId())) {
+                    record.setEntry_2654_id(medicalEntryId.getId());
+                    record.setEntry_2654_name(medicalEntryId.getName());
+                }
+                if ("2655".equals(medicalEntryId.getId())) {
+                    record.setEntry_2655_id(medicalEntryId.getId());
+                    record.setEntry_2655_name(medicalEntryId.getName());
+                }
+                if ("2657".equals(medicalEntryId.getId())) {
+                    record.setEntry_2657_id(medicalEntryId.getId());
+                    record.setEntry_2657_name(medicalEntryId.getName());
+                }
+                if ("2658".equals(medicalEntryId.getId())) {
+                    record.setEntry_2658_id(medicalEntryId.getId());
+                    record.setEntry_2658_name(medicalEntryId.getName());
+                }
+                if ("2686".equals(medicalEntryId.getId())) {
+                    record.setEntry_2686_id(medicalEntryId.getId());
+                    record.setEntry_2686_name(medicalEntryId.getName());
+                }
+                if ("2852".equals(medicalEntryId.getId())) {
+                    record.setEntry_2852_id(medicalEntryId.getId());
+                    record.setEntry_2852_name(medicalEntryId.getName());
+                }
+                if ("2900".equals(medicalEntryId.getId())) {
+                    record.setEntry_2900_id(medicalEntryId.getId());
+                    record.setEntry_2900_name(medicalEntryId.getName());
+                }
+                if ("2930".equals(medicalEntryId.getId())) {
+                    record.setEntry_2930_id(medicalEntryId.getId());
+                    record.setEntry_2930_name(medicalEntryId.getName());
+                }
+                if ("3010".equals(medicalEntryId.getId())) {
+                    record.setEntry_3010_id(medicalEntryId.getId());
+                    record.setEntry_3010_name(medicalEntryId.getName());
+                }
+                if ("3025".equals(medicalEntryId.getId())) {
+                    record.setEntry_3025_id(medicalEntryId.getId());
+                    record.setEntry_3025_name(medicalEntryId.getName());
+                }
+                if ("3062".equals(medicalEntryId.getId())) {
+                    record.setEntry_3062_id(medicalEntryId.getId());
+                    record.setEntry_3062_name(medicalEntryId.getName());
+                }
+                if ("3063".equals(medicalEntryId.getId())) {
+                    record.setEntry_3063_id(medicalEntryId.getId());
+                    record.setEntry_3063_name(medicalEntryId.getName());
+                }
+            }
+        }
+
+        return medicalCheck;
+
+    }
+
+    /**
+     * 稽查统计导出(首页)
+     *
+     * @param filterVO
+     * @return
+     */
+    public void medicalCheckExport(HttpServletResponse response, FilterMedicalCheckVO filterVO) {
+        filterVO.setCurrent(1L);
+        filterVO.setSize(Long.MAX_VALUE);
+        filterVO.setSearchCount(false);
+        String fileName = null;
+        if ("1".equals(filterVO.getIsPlacefile())) {
+            fileName = "终末病历稽查表.xls";
+        } else {
+            fileName = "运行病历稽查表.xls";
+        }
+        filterFacade.getMedicalCheckVOSet(filterVO);
+        List<MedicalCheckExportDTO> records = behospitalInfoFacade.getBaseMapper().getMedicalCheckExport(filterVO);
+        ExcelUtils.exportExcel(records, null, "sheet1", MedicalCheckExportDTO.class, fileName, response, 15.8f);
+    }
 
     /**
      * 质控核查统计(内页)
@@ -55,6 +223,7 @@ public class QcCheckManagementFacade {
         ExcelUtils.exportExcel(records, null, "sheet1", HomePageImproveDTO.class, fileName, response, 12.8f);
     }
 
+
     /**
      * 增加全院记录
      *

+ 1 - 1
report-service/src/main/java/com/lantone/report/facade/MrScoreManagementFacade.java

@@ -29,7 +29,7 @@ import java.util.Map;
 
 
 @Component
-public class MrScoreManagementFacade {
+public class QcScoreManagementFacade {
 
     @Autowired
     private FilterFacade filterFacade;

+ 25 - 0
report-service/src/main/java/com/lantone/report/web/EntryCaseManagementController.java

@@ -3,6 +3,7 @@ package com.lantone.report.web;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.lantone.common.api.CommonResult;
 import com.lantone.common.dto.report.EntryNumDTO;
+import com.lantone.common.dto.report.EntryNumGroupDTO;
 import com.lantone.common.dto.report.EntryStatisticsDTO;
 import com.lantone.common.dto.report.NumDTO;
 import com.lantone.common.vo.report.EntryStatisticsVO;
@@ -195,4 +196,28 @@ public class EntryCaseManagementController {
     public void runEntryStatisticsExport(HttpServletResponse response, @RequestBody @Valid EntryStatisticsVO entryStatisticsVO) {
         entryCaseManagementFacade.entryStatisticsExport(response, entryStatisticsVO);
     }
+
+    /**
+     * 关键条目缺陷占比-缺陷列表-报表
+     *
+     * @param filterPageVO
+     * @return
+     */
+    @ApiOperation(value = "关键条目缺陷占比-缺陷列表-报表[by:zhaops]")
+    @PostMapping("/entryCountGroupByEntryPage")
+    public CommonResult<IPage<EntryNumGroupDTO>> entryCountGroupByEntryPage(@RequestBody @Valid FilterPageVO filterPageVO) {
+        return CommonResult.success(entryCaseManagementFacade.entryCountGroupByEntryPage(filterPageVO));
+    }
+
+    /**
+     * 关键条目缺陷占比-缺陷列表-报表导出
+     *
+     * @param filterPageVO
+     * @return
+     */
+    @ApiOperation(value = "关键条目缺陷占比-缺陷列表-报表导出[by:gaodm]")
+    @PostMapping("/entryCountGroupByEntryExport")
+    public void entryCountGroupByEntryExport(HttpServletResponse response, @RequestBody @Valid FilterPageVO filterPageVO) {
+        entryCaseManagementFacade.entryCountGroupByEntryExport(response, filterPageVO);
+    }
 }

+ 0 - 85
report-service/src/main/java/com/lantone/report/web/MedicalCheckManagementController.java

@@ -1,85 +0,0 @@
-package com.lantone.report.web;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.lantone.common.api.CommonResult;
-import com.lantone.common.dto.report.MedicalCheckDTO;
-import com.lantone.common.vo.report.FilterMedicalCheckVO;
-import com.lantone.report.facade.MedicalCheckManagementFacade;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-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;
-
-
-/**
- * <p>
- * 病历稽查管理统计相关API
- * </p>
- *
- * @author zhaops
- * @since 2020-04-27
- */
-
-@RestController
-@RequestMapping("/console")
-@Api(value = "病历稽查管理统计相关API", tags = { "病历稽查管理统计相关API" })
-@SuppressWarnings("unchecked")
-public class MedicalCheckManagementController {
-    @Autowired
-    private MedicalCheckManagementFacade medicalCheckManagementFacade;
-
-
-    /**
-     * 病历稽查表-报表
-     *
-     * @param filterVO
-     * @return
-     */
-    @ApiOperation(value = "病历稽查统计[by:cy]")
-    @PostMapping("/medicalCheckForm")
-    public CommonResult<IPage<MedicalCheckDTO>> medicalCheckForm(@RequestBody @Valid FilterMedicalCheckVO filterVO) {
-        return CommonResult.success((medicalCheckManagementFacade.getMedicalCheck(filterVO)));
-    }
-
-    /**
-     * 病历稽查表-报表-运行质控
-     *
-     * @param filterVO
-     * @return
-     */
-    @ApiOperation(value = "病历稽查统计-运行质控[by:cy]")
-    @PostMapping("/run/medicalCheckForm")
-    public CommonResult<IPage<MedicalCheckDTO>> runMedicalCheckForm(@RequestBody @Valid FilterMedicalCheckVO filterVO) {
-        return CommonResult.success((medicalCheckManagementFacade.getMedicalCheck(filterVO)));
-    }
-
-    /**
-     * 病历稽查表-报表导出
-     *
-     * @param filterVO
-     * @return
-     */
-    @ApiOperation(value = "病历稽查表-报表导出[by:cy]")
-    @PostMapping("/medicalCheckExport")
-    public void medicalCheckExport(HttpServletResponse response, @RequestBody @Valid FilterMedicalCheckVO filterVO) {
-        medicalCheckManagementFacade.medicalCheckExport(response, filterVO);
-    }
-
-    /**
-     * 病历稽查表-报表导出-运行质控
-     *
-     * @param filterVO
-     * @return
-     */
-    @ApiOperation(value = "病历稽查表-报表导出-运行质控[by:cy]")
-    @PostMapping("/run/medicalCheckExport")
-    public void runMedicalCheckExport(HttpServletResponse response, @RequestBody @Valid FilterMedicalCheckVO filterVO) {
-        medicalCheckManagementFacade.medicalCheckExport(response, filterVO);
-    }
-}

+ 47 - 0
report-service/src/main/java/com/lantone/report/web/MrInfoManagementController.java

@@ -0,0 +1,47 @@
+package com.lantone.report.web;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.lantone.common.api.CommonResult;
+import com.lantone.common.dto.report.BehospitalInfoDTO;
+import com.lantone.common.vo.report.BehospitalPageVO;
+import com.lantone.common.vo.report.ExportQcresultVO;
+import com.lantone.report.facade.MrInfoManagementFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+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;
+
+/**
+ * <p>
+ * 病历列表相关API
+ * </p>
+ * @author zhaops
+ * @since 2020-04-27
+ */
+
+@RestController
+@RequestMapping("/qc/behospitalInfo")
+@Api(value = "病历列表相关API", tags = { "病历列表相关API" })
+@SuppressWarnings("unchecked")
+public class MrInfoManagementController {
+    @Autowired
+    private MrInfoManagementFacade mrInfoManagementFacade;
+
+    @ApiOperation(value = "病历列表-报表[by:zhoutg]")
+    @PostMapping("/page")
+    public CommonResult<IPage<BehospitalInfoDTO>> page(@RequestBody BehospitalPageVO behospitalPageVO) {
+        IPage<BehospitalInfoDTO> data = mrInfoManagementFacade.pageFac(behospitalPageVO);
+        return CommonResult.success(data);
+    }
+
+    @ApiOperation(value = "病历列表-报表导出[by:zhaops]")
+    @PostMapping("/exportQcresult")
+    public void exportQcresult(HttpServletResponse response, @RequestBody ExportQcresultVO exportQcresultVO) {
+        mrInfoManagementFacade.exportQcresult(response, exportQcresultVO);
+    }
+}

+ 5 - 5
report-service/src/main/java/com/lantone/report/web/MedicalControlManagementController.java

@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.lantone.common.api.CommonResult;
 import com.lantone.common.dto.report.QualityControlDTO;
 import com.lantone.common.vo.report.BehospitalPageVO;
-import com.lantone.report.facade.MedicalControlManagementFacade;
+import com.lantone.report.facade.MrQcCaseManagementFacade;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,9 +29,9 @@ import javax.servlet.http.HttpServletResponse;
 @RequestMapping("/console")
 @Api(value = "病历质控报表管理统计相关API", tags = { "病历质控报表管理统计相关API" })
 @SuppressWarnings("unchecked")
-public class MedicalControlManagementController {
+public class MrQcCaseManagementController {
     @Autowired
-    private MedicalControlManagementFacade medicalControlManagementFacade;
+    private MrQcCaseManagementFacade mrQcCaseManagementFacade;
 
     /**
      * 病历质控报表-报表
@@ -42,7 +42,7 @@ public class MedicalControlManagementController {
     @ApiOperation(value = "病历质控报表-报表[by:cy]")
     @PostMapping("/qualityControl")
     public CommonResult<IPage<QualityControlDTO>> getQualityControl(@RequestBody BehospitalPageVO behospitalPageVO) {
-        return CommonResult.success(medicalControlManagementFacade.getQualityControl(behospitalPageVO));
+        return CommonResult.success(mrQcCaseManagementFacade.getQualityControl(behospitalPageVO));
     }
 
     /**
@@ -54,6 +54,6 @@ public class MedicalControlManagementController {
     @ApiOperation(value = "病历质控报表-报表导出[by:cy]")
     @PostMapping("/qualityControlExport")
     public void qualityControlExport(HttpServletResponse response, @RequestBody BehospitalPageVO behospitalPageVO) {
-        medicalControlManagementFacade.qualityControlExport(response, behospitalPageVO);
+        mrQcCaseManagementFacade.qualityControlExport(response, behospitalPageVO);
     }
 }

+ 144 - 0
report-service/src/main/java/com/lantone/report/web/MrQcInfoManagementController.java

@@ -0,0 +1,144 @@
+package com.lantone.report.web;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.lantone.common.api.CommonResult;
+import com.lantone.common.dto.report.QcResultShortDTO;
+import com.lantone.common.vo.report.QcResultPageVO;
+import com.lantone.common.vo.report.QcResultShortPageVO;
+import com.lantone.report.facade.MrQcInfoManagementFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+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;
+
+
+/**
+ * <p>
+ * 病历质控列表相关API
+ * </p>
+ * @author zhaops
+ * @since 2020-04-27
+ */
+
+@RestController
+@RequestMapping("/console")
+@Api(value = "病历质控列表相关API", tags = { "病历质控列表相关API" })
+@SuppressWarnings("unchecked")
+public class MrQcInfoManagementController {
+    @Autowired
+    private MrQcInfoManagementFacade mrQcInfoManagementFacade;
+
+    /**
+     * 条目缺陷病历列表-报表
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "条目缺陷病历列表-报表[by:zhaops]")
+    @PostMapping("/qcResultShortPage")
+    public CommonResult<IPage<QcResultShortDTO>> qcResultShortPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        return CommonResult.success(mrQcInfoManagementFacade.qcResultShortPage(qcResultShortPageVO));
+    }
+
+    /**
+     * 条目缺陷病历列表-报表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "条目缺陷病历列表-报表[by:zhaops]")
+    @PostMapping("/qcResultShortPageExport")
+    public void qcResultShortPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        mrQcInfoManagementFacade.qcResultShortPageExport(response, qcResultShortPageVO);
+    }
+
+    /**
+     * 病案首页合格|不合格病历列表-报表
+     * @param qcResultPageVO
+     * @return
+     */
+    @ApiOperation(value = "病案首页合格|不合格病历列表-报表[by:cy]")
+    @PostMapping("/badLevelPage")
+    public CommonResult<IPage<QcResultShortDTO>> badLevelPage(@RequestBody @Valid QcResultPageVO qcResultPageVO) {
+        return CommonResult.success(mrQcInfoManagementFacade.badLevelPage(qcResultPageVO));
+    }
+
+    /**
+     * 病案首页合格|不合格病历列表-报表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = " 病案首页合格|不合格病历列表-报表导出[by:cy]")
+    @PostMapping("/badLevelPagePageExport")
+    public void badLevelPagePageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        mrQcInfoManagementFacade.badLevelPagePageExport(response, qcResultShortPageVO);
+    }
+
+    /**
+     * 质控核查统计A病历列表-报表
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "质控核查统计病历列表-报表[by:zhaops]")
+    @PostMapping("/qcCheckMRPage")
+    public CommonResult<IPage<QcResultShortDTO>> qcCheckMRPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        return CommonResult.success(mrQcInfoManagementFacade.qcCheckMRPage(qcResultShortPageVO));
+    }
+
+    /**
+     * 质控核查改善相关统计B病历列表-报表
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "质控核查改善相关统计病历列表-报表[by:zhaops]")
+    @PostMapping("/hmImproveMRPage")
+    public CommonResult<IPage<QcResultShortDTO>> hmImproveMRPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        return CommonResult.success(mrQcInfoManagementFacade.hmImproveMRPage(qcResultShortPageVO));
+    }
+
+    /**
+     * 质控核查统计病历AB列表-报表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "质控核查统计病历AB列表-报表导出[by:zhaops]")
+    @PostMapping("/qcCheckMRPageExport")
+    public void qcCheckMRPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        mrQcInfoManagementFacade.qcCheckMRPageExport(response, qcResultShortPageVO);
+    }
+
+    /**
+     * 时效性|稽查条目病历列表-报表
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "时效性|稽查条目病历列表-报表[by:zhaops]")
+    @PostMapping("/unModifyMRPage")
+    public CommonResult<IPage<QcResultShortDTO>> unModifyMRPage(@RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        return CommonResult.success(mrQcInfoManagementFacade.unModifyMRPage(qcResultShortPageVO));
+    }
+
+    /**
+     * 时效性|稽查条目病历列表-报表导出
+     *
+     * @param qcResultShortPageVO
+     * @return
+     */
+    @ApiOperation(value = "时效性|稽查条目病历列表-报表导出[by:zhaops]")
+    @PostMapping("/unModifyMRPageExport")
+    public void unModifyMRPageExport(HttpServletResponse response, @RequestBody @Valid QcResultShortPageVO qcResultShortPageVO) {
+        mrQcInfoManagementFacade.unModifyMRPageExport(response, qcResultShortPageVO);
+    }
+
+}

+ 55 - 2
report-service/src/main/java/com/lantone/report/web/QcCheckManagementController.java

@@ -1,7 +1,10 @@
 package com.lantone.report.web;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.lantone.common.api.CommonResult;
 import com.lantone.common.dto.report.HomePageImproveDTO;
+import com.lantone.common.dto.report.MedicalCheckDTO;
+import com.lantone.common.vo.report.FilterMedicalCheckVO;
 import com.lantone.common.vo.report.FilterOrderVO;
 import com.lantone.report.facade.QcCheckManagementFacade;
 import io.swagger.annotations.Api;
@@ -19,7 +22,7 @@ import java.util.List;
 
 /**
  * <p>
- * 质控核查管理统计相关API
+ * 病历稽查|核查管理统计相关API
  * </p>
  *
  * @author zhaops
@@ -28,12 +31,62 @@ import java.util.List;
 
 @RestController
 @RequestMapping("/console")
-@Api(value = "质控核查管理统计相关API", tags = { "质控核查管理统计相关API" })
+@Api(value = "病历稽查|核查管理统计相关API", tags = { "病历稽查|核查管理统计相关API" })
 @SuppressWarnings("unchecked")
 public class QcCheckManagementController {
     @Autowired
     private QcCheckManagementFacade qcCheckManagementFacade;
 
+
+    /**
+     * 病历稽查表-报表
+     *
+     * @param filterVO
+     * @return
+     */
+    @ApiOperation(value = "病历稽查统计[by:cy]")
+    @PostMapping("/medicalCheckForm")
+    public CommonResult<IPage<MedicalCheckDTO>> medicalCheckForm(@RequestBody @Valid FilterMedicalCheckVO filterVO) {
+        return CommonResult.success((qcCheckManagementFacade.getMedicalCheck(filterVO)));
+    }
+
+    /**
+     * 病历稽查表-报表-运行质控
+     *
+     * @param filterVO
+     * @return
+     */
+    @ApiOperation(value = "病历稽查统计-运行质控[by:cy]")
+    @PostMapping("/run/medicalCheckForm")
+    public CommonResult<IPage<MedicalCheckDTO>> runMedicalCheckForm(@RequestBody @Valid FilterMedicalCheckVO filterVO) {
+        return CommonResult.success((qcCheckManagementFacade.getMedicalCheck(filterVO)));
+    }
+
+    /**
+     * 病历稽查表-报表导出
+     *
+     * @param filterVO
+     * @return
+     */
+    @ApiOperation(value = "病历稽查表-报表导出[by:cy]")
+    @PostMapping("/medicalCheckExport")
+    public void medicalCheckExport(HttpServletResponse response, @RequestBody @Valid FilterMedicalCheckVO filterVO) {
+        qcCheckManagementFacade.medicalCheckExport(response, filterVO);
+    }
+
+    /**
+     * 病历稽查表-报表导出-运行质控
+     *
+     * @param filterVO
+     * @return
+     */
+    @ApiOperation(value = "病历稽查表-报表导出-运行质控[by:cy]")
+    @PostMapping("/run/medicalCheckExport")
+    public void runMedicalCheckExport(HttpServletResponse response, @RequestBody @Valid FilterMedicalCheckVO filterVO) {
+        qcCheckManagementFacade.medicalCheckExport(response, filterVO);
+    }
+
+
     /**
      * 质控核查统计-报表
      *

+ 19 - 19
report-service/src/main/java/com/lantone/report/web/MrScoreManagementController.java

@@ -8,7 +8,7 @@ import com.lantone.common.dto.report.LevelStatisticsTZDTO;
 import com.lantone.common.vo.report.FilterOrderVO;
 import com.lantone.common.vo.report.FilterVO;
 
-import com.lantone.report.facade.MrScoreManagementFacade;
+import com.lantone.report.facade.QcScoreManagementFacade;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -36,9 +36,9 @@ import java.util.Map;
 @RequestMapping("/console")
 @Api(value = "质控病历分数|等级管理统计相关API", tags = { "质控病历分数|等级管理统计相关API" })
 @SuppressWarnings("unchecked")
-public class MrScoreManagementController {
+public class QcScoreManagementController {
     @Autowired
-    private MrScoreManagementFacade mrScoreManagementFacade;
+    private QcScoreManagementFacade qcScoreManagementFacade;
 
     /**
      * 病历评分等级占比-控制台
@@ -49,7 +49,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "病历评分等级占比-控制台[by:zhaops]")
     @PostMapping("/mrCount")
     public CommonResult<Map<String, Object>> mrCount(@RequestBody @Valid FilterVO filterVO) {
-        return CommonResult.success(mrScoreManagementFacade.mrCount(filterVO));
+        return CommonResult.success(qcScoreManagementFacade.mrCount(filterVO));
     }
 
     /**
@@ -61,7 +61,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "病历评分等级占比-控制台-运行质控[by:zhaops]")
     @PostMapping("/run/mrCount")
     public CommonResult<Map<String, Object>> runMrCount(@RequestBody @Valid FilterVO filterVO) {
-        return CommonResult.success(mrScoreManagementFacade.mrCount(filterVO));
+        return CommonResult.success(qcScoreManagementFacade.mrCount(filterVO));
     }
 
     /**
@@ -73,7 +73,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室病历等级占比-控制台[by:zhaops]")
     @PostMapping("/qcResultLevelPercent")
     public CommonResult<List<DeptNumDTO>> qcResultLevelPercent(@RequestBody @Valid FilterVO filterVO) {
-        return CommonResult.success(mrScoreManagementFacade.qcResultLevelPercent(filterVO));
+        return CommonResult.success(qcScoreManagementFacade.qcResultLevelPercent(filterVO));
     }
 
     /**
@@ -85,7 +85,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室病历等级占比-控制台-运行质控[by:zhaops]")
     @PostMapping("/run/qcResultLevelPercent")
     public CommonResult<List<DeptNumDTO>> runQcResultLevelPercent(@RequestBody @Valid FilterVO filterVO) {
-        return CommonResult.success(mrScoreManagementFacade.qcResultLevelPercent(filterVO));
+        return CommonResult.success(qcScoreManagementFacade.qcResultLevelPercent(filterVO));
     }
 
     /**
@@ -97,7 +97,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室缺陷占比-报表[by:zhaops]")
     @PostMapping("/levelStatistics")
     public CommonResult<List<LevelStatisticsDTO>> levelStatistics(@RequestBody @Valid FilterOrderVO filterOrderVO) {
-        return CommonResult.success(mrScoreManagementFacade.levelStatistics(filterOrderVO));
+        return CommonResult.success(qcScoreManagementFacade.levelStatistics(filterOrderVO));
     }
 
     /**
@@ -109,7 +109,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室缺陷占比-报表-运行质控[by:zhaops]")
     @PostMapping("/run/levelStatistics")
     public CommonResult<List<LevelStatisticsDTO>> runLevelStatistics(@RequestBody @Valid FilterOrderVO filterOrderVO) {
-        return CommonResult.success(mrScoreManagementFacade.levelStatistics(filterOrderVO));
+        return CommonResult.success(qcScoreManagementFacade.levelStatistics(filterOrderVO));
     }
 
     /**
@@ -121,7 +121,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室缺陷占比-报表导出[by:gaodm]")
     @PostMapping("/levelExport")
     public void levelExport(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
-        mrScoreManagementFacade.levelExport(response, filterOrderVO);
+        qcScoreManagementFacade.levelExport(response, filterOrderVO);
     }
 
     /**
@@ -133,7 +133,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室缺陷占比-报表导出-运行质控[by:gaodm]")
     @PostMapping("/run/levelExport")
     public void runLevelExport(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
-        mrScoreManagementFacade.levelExport(response, filterOrderVO);
+        qcScoreManagementFacade.levelExport(response, filterOrderVO);
     }
 
 
@@ -146,7 +146,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室缺陷占比(台州)-报表[by:zhaops]")
     @PostMapping("/levelStatisticsByDeptClass")
     public CommonResult<List<LevelStatisticsTZDTO>> levelStatisticsByDeptClass(@RequestBody @Valid FilterOrderVO filterOrderVO) {
-        return CommonResult.success(mrScoreManagementFacade.levelStatisticsByDeptClass_TZ(filterOrderVO));
+        return CommonResult.success(qcScoreManagementFacade.levelStatisticsByDeptClass_TZ(filterOrderVO));
     }
 
     /**
@@ -158,7 +158,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室缺陷占比(台州)-报表-运行质控[by:zhaops]")
     @PostMapping("/run/levelStatisticsByDeptClass")
     public CommonResult<List<LevelStatisticsTZDTO>> runLevelStatisticsByDeptClass(@RequestBody @Valid FilterOrderVO filterOrderVO) {
-        return CommonResult.success(mrScoreManagementFacade.levelStatisticsByDeptClass_TZ(filterOrderVO));
+        return CommonResult.success(qcScoreManagementFacade.levelStatisticsByDeptClass_TZ(filterOrderVO));
     }
 
     /**
@@ -170,7 +170,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室缺陷占比(台州)-报表导出[by:gaodm]")
     @PostMapping("/levelExport_TZ")
     public void levelExport_TZ(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
-        mrScoreManagementFacade.levelExport_TZ(response, filterOrderVO);
+        qcScoreManagementFacade.levelExport_TZ(response, filterOrderVO);
     }
 
     /**
@@ -182,7 +182,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室缺陷占比(台州)-报表导出-运行质控[by:gaodm]")
     @PostMapping("/run/levelExport_TZ")
     public void runLevelExport_TZ(HttpServletResponse response, @RequestBody @Valid FilterOrderVO filterOrderVO) {
-        mrScoreManagementFacade.levelExport_TZ(response, filterOrderVO);
+        qcScoreManagementFacade.levelExport_TZ(response, filterOrderVO);
     }
 
     /**
@@ -194,7 +194,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室质控平均分柱状图-控制台[by:zhaops]")
     @PostMapping("/getAverageScore")
     public CommonResult<Map<String, Object>> getAverageScore(@RequestBody @Valid FilterVO filterVO) {
-        return CommonResult.success(mrScoreManagementFacade.getAverageScore(filterVO));
+        return CommonResult.success(qcScoreManagementFacade.getAverageScore(filterVO));
     }
 
     /**
@@ -206,7 +206,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室质控平均分柱状图-控制台-运行质控[by:zhaops]")
     @PostMapping("/run/getAverageScore")
     public CommonResult<Map<String, Object>> runGetAverageScore(@RequestBody @Valid FilterVO filterVO) {
-        return CommonResult.success(mrScoreManagementFacade.getAverageScore(filterVO));
+        return CommonResult.success(qcScoreManagementFacade.getAverageScore(filterVO));
     }
 
     /**
@@ -218,7 +218,7 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室质控平均分柱状图(台州)-控制台[by:zhaops]")
     @PostMapping("/getAverageScoreByDeptClass")
     public CommonResult<List<AverageStatisticsDTO>> getAverageScoreByDeptClass(@RequestBody @Valid FilterVO filterVO) {
-        return CommonResult.success(mrScoreManagementFacade.getAverageScoreByDeptClass(filterVO));
+        return CommonResult.success(qcScoreManagementFacade.getAverageScoreByDeptClass(filterVO));
     }
 
     /**
@@ -230,6 +230,6 @@ public class MrScoreManagementController {
     @ApiOperation(value = "各科室质控平均分柱状图(台州)-控制台-运行质控[by:zhaops]")
     @PostMapping("/run/getAverageScoreByDeptClass")
     public CommonResult<List<AverageStatisticsDTO>> runGetAverageScoreByDeptClass(@RequestBody @Valid FilterVO filterVO) {
-        return CommonResult.success(mrScoreManagementFacade.getAverageScoreByDeptClass(filterVO));
+        return CommonResult.success(qcScoreManagementFacade.getAverageScoreByDeptClass(filterVO));
     }
 }