瀏覽代碼

导出报表

gaodm 5 年之前
父節點
當前提交
adbeb8a30b

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

@@ -164,7 +164,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/console/export/getAverageDayNumExport", request)
                 || matchers("/console/export/getAverageFeeExport", request)
                 || matchers("/console/export/levelPercentGroupByDeptExport", request)
-                || matchers("/console/export/levelPercentGroupByDeptExport", request)
+                || matchers("/console/export/entryCountGroupByEntryExport", request)
                 || matchers("/qc/data/sendDoctorInfos", request)
                 || matchers("/qc/data/sendDeptInfos", request)
                 || matchers("/qc/data/sendRecordTypes", request)

+ 63 - 0
src/main/java/com/diagbot/dto/EntryNumGroupDTO.java

@@ -0,0 +1,63 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:条目缺陷占比返回结构
+ * @Author:zhaops
+ * @time: 2020/6/5 13:20
+ */
+@Getter
+@Setter
+public class EntryNumGroupDTO {
+    /**
+     * 条目缺陷id
+     */
+    private Long id;
+    /**
+     * 条目缺陷名称
+     */
+    @Excel(name = "缺陷名称", width = 40, orderNum = "2")
+    private String name;
+    /**
+     * 模块id
+     */
+    private Long casesId;
+    /**
+     * 模块名称
+     */
+    @Excel(name = "所属模块", width = 20, orderNum = "1")
+    private String casesName;
+    /**
+     * 条目缺陷总数
+     */
+    private Integer totleNum = 0;
+    /**
+     * 条目缺陷数
+     */
+    @Excel(name = "数量", orderNum = "3")
+    private Integer num = 0;
+    /**
+     * 条目缺陷占比
+     */
+    private Double percent = 0.00d;
+    /**
+     * 条目缺陷占比(百分比)
+     */
+    @Excel(name = "缺陷占比", orderNum = "4")
+    private String percentStr = "0.00%";
+    /**
+     * 条目缺陷分值
+     */
+    private Double score = 0d;
+    /**
+     * 单项否决标识
+     */
+    private Integer isReject;
+    /**
+     * 规则类型(0:无,1:空项,2:错误)
+     */
+    private Integer ruleType;
+}

+ 3 - 2
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.AverageStatisticsFeeDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.HomePageNumDTO;
 import com.diagbot.dto.LevelStatisticsDTO;
 import com.diagbot.dto.LevelStatisticsTZDTO;
@@ -137,8 +138,8 @@ public class ConsoleExportFacade {
         filterPageVO.setCurrent(1L);
         filterPageVO.setSize(Long.MAX_VALUE);
         filterPageVO.setSearchCount(false);
-        IPage<EntryNumDTO> page = consoleFacade.entryCountGroupByEntryPage(filterPageVO);
+        IPage<EntryNumGroupDTO> page = consoleFacade.entryCountGroupByEntryPage(filterPageVO);
         String fileName = "缺陷详情.xls";
-        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", EntryNumDTO.class, fileName, response, 12.8f);
+        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", EntryNumGroupDTO.class, fileName, response, 12.8f);
     }
 }

+ 3 - 2
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -8,6 +8,7 @@ import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.AverageStatisticsFeeDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.EntryStatisticsDTO;
 import com.diagbot.dto.HomePageNumDTO;
 import com.diagbot.dto.LevelStatisticsDTO;
@@ -359,12 +360,12 @@ public class ConsoleFacade {
      * @param filterPageVO
      * @return
      */
-    public IPage<EntryNumDTO> entryCountGroupByEntryPage(FilterPageVO filterPageVO) {
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(FilterPageVO filterPageVO) {
         filterFacade.filterPageVOSet(filterPageVO);
         if (filterPageVO.getDeptName().equals("全院")) {
             filterPageVO.setDeptName("");
         }
-        IPage<EntryNumDTO> page = qcresultInfoFacade.entryCountGroupByEntryPage(filterPageVO);
+        IPage<EntryNumGroupDTO> page = qcresultInfoFacade.entryCountGroupByEntryPage(filterPageVO);
         return page;
     }
 

+ 2 - 1
src/main/java/com/diagbot/mapper/QcresultInfoMapper.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.DeptEntryNumDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultPercentDTO;
 import com.diagbot.entity.QcresultInfo;
@@ -114,7 +115,7 @@ public interface QcresultInfoMapper extends BaseMapper<QcresultInfo> {
      * @param filterPageVO
      * @return
      */
-    public IPage<EntryNumDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
 
     /**
      * 各科室质控平均分(分页)

+ 2 - 1
src/main/java/com/diagbot/service/QcresultInfoService.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.DeptEntryNumDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultPercentDTO;
 import com.diagbot.entity.QcresultInfo;
@@ -115,7 +116,7 @@ public interface QcresultInfoService extends IService<QcresultInfo> {
      * @param filterPageVO
      * @return
      */
-    public IPage<EntryNumDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO);
 
     /**
      * 各科室质控平均分(分页)

+ 2 - 1
src/main/java/com/diagbot/service/impl/QcresultInfoServiceImpl.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.DeptEntryNumDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.NumDTO;
 import com.diagbot.dto.QcResultPercentDTO;
 import com.diagbot.entity.QcresultInfo;
@@ -150,7 +151,7 @@ public class QcresultInfoServiceImpl extends ServiceImpl<QcresultInfoMapper, Qcr
      * @return
      */
     @Override
-    public IPage<EntryNumDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO) {
+    public IPage<EntryNumGroupDTO> entryCountGroupByEntryPage(@Param("filterPageVO") FilterPageVO filterPageVO) {
         return baseMapper.entryCountGroupByEntryPage(filterPageVO);
     }
 

+ 2 - 1
src/main/java/com/diagbot/web/ConsoleController.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.AverageStatisticsDTO;
 import com.diagbot.dto.AverageStatisticsFeeDTO;
 import com.diagbot.dto.DeptNumDTO;
 import com.diagbot.dto.EntryNumDTO;
+import com.diagbot.dto.EntryNumGroupDTO;
 import com.diagbot.dto.EntryStatisticsDTO;
 import com.diagbot.dto.HomePageNumDTO;
 import com.diagbot.dto.LevelStatisticsDTO;
@@ -285,7 +286,7 @@ public class ConsoleController {
                     "ruleType: 规则类型 0:无,1:空项,2:错误<br>")
     @PostMapping("/entryCountGroupByEntryPage")
     @SysLogger("entryCountGroupByEntryPage")
-    public RespDTO<IPage<EntryNumDTO>> entryCountGroupByEntryPage(@RequestBody @Valid FilterPageVO filterPageVO) {
+    public RespDTO<IPage<EntryNumGroupDTO>> entryCountGroupByEntryPage(@RequestBody @Valid FilterPageVO filterPageVO) {
         return RespDTO.onSuc(consoleFacade.entryCountGroupByEntryPage(filterPageVO));
     }
 

+ 1 - 1
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -1087,7 +1087,7 @@
     </select>
 
     <!-- 缺陷详情(分页) -->
-    <select id="entryCountGroupByEntryPage"  resultType="com.diagbot.dto.EntryNumDTO">
+    <select id="entryCountGroupByEntryPage"  resultType="com.diagbot.dto.EntryNumGroupDTO">
         SELECT
         t.*
         FROM