chengyao 3 роки тому
батько
коміт
98529c3fdb

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

@@ -265,8 +265,11 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/medCheckInfo/saveDataEdit").permitAll()
                 .antMatchers("/qc/analysis/addMedClickInfo").permitAll()
                 .antMatchers("/qc/analysis/getQcClick").permitAll()
+                .antMatchers("/qc/analysis/getQcClickByExport").permitAll()
                 .antMatchers("/qc/analysis/getQcClickInnerPage").permitAll()
+                .antMatchers("/qc/analysis/getQcClickInnerPageByExport").permitAll()
                 .antMatchers("/qc/analysis/getEntryDefectImprove").permitAll()
+                .antMatchers("/qc/analysis/getEntryDefectImproveByExport").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

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

@@ -309,8 +309,11 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/dataEdit/saveDataEdit", request)
                 || matchers("/qc/analysis/addMedClickInfo", request)
                 || matchers("/qc/analysis/getQcClick", request)
+                || matchers("/qc/analysis/getQcClickByExport", request)
                 || matchers("/qc/analysis/getQcClickInnerPage", request)
+                || matchers("/qc/analysis/getQcClickInnerPageByExport", request)
                 || matchers("/qc/analysis/getEntryDefectImprove", request)
+                || matchers("/qc/analysis/getEntryDefectImproveByExport", request)
                 || matchers("/", request)) {
             return true;
         }

+ 18 - 8
src/main/java/com/diagbot/dto/GetEntryDefectImproveDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Data;
 import lombok.Getter;
 import lombok.Setter;
@@ -23,47 +24,56 @@ public class GetEntryDefectImproveDTO{
     /**
      * 科室名称
      */
+    @Excel(name = "科室", width = 25d, orderNum = "1")
     private String deptName;
 
     /**
-     * 缺陷id
+     * 模块id
      */
-    private String entryId;
+    private String casesId;
 
     /**
-     * 缺陷名称
+     * 模块名称
      */
-    private String entryName;
+    @Excel(name = "模块名称", width = 15d, orderNum = "2")
+    private String casesName;
 
     /**
-     * 模块id
+     * 缺陷id
      */
-    private String casesId;
+    private String entryId;
 
     /**
-     * 模块名称
+     * 缺陷名称
      */
-    private String casesName;
+    @Excel(name = "缺陷名称", width = 30d, orderNum = "3")
+    private String entryName;
+
+
 
 
     /**
      * 缺陷总数
      */
+    @Excel(name = "总数量", width = 10d, orderNum = "4")
     private Integer totalNum;
 
     /**
      * 已改善数
      */
+    @Excel(name = "已改善数量", width = 13d, orderNum = "5")
     private Integer handleNum;
 
     /**
      * 待改善数
      */
+    @Excel(name = "待改善数量", width = 13d, orderNum = "6")
     private Integer improveleNum;
 
     /**
      * 改善率
      */
+    @Excel(name = "改善率", width = 10d, orderNum = "7")
     private String handleStr;
 
 }

+ 3 - 0
src/main/java/com/diagbot/dto/GetQcClickDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Setter;
@@ -25,10 +26,12 @@ public class GetQcClickDTO implements Serializable {
     /**
      * 科室名称
      */
+    @Excel(name = "科室", width = 25d, orderNum = "1")
     private String deptName;
 
     /**
      * 点击次数
      */
+    @Excel(name = "使用AI质控次数", width = 18d,orderNum = "2")
     private Integer clickNum;
 }

+ 6 - 1
src/main/java/com/diagbot/dto/GetQcClickInnerPageDTO.java

@@ -1,5 +1,6 @@
 package com.diagbot.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -22,20 +23,24 @@ public class GetQcClickInnerPageDTO implements Serializable {
     /**
      * 科室名称
      */
+    @Excel(name = "科室", width = 25d, orderNum = "1")
     private String deptName;
 
     /**
      * 医师id
      */
+    @Excel(name = "医师工号", width = 10d, orderNum = "2")
     private String doctorId;
 
     /**
-     * 医师名
+     * 医师
      */
+    @Excel(name = "医师姓名", width = 10d, orderNum = "3")
     private String doctorName;
 
     /**
      * 点击次数
      */
+    @Excel(name = "使用AI质控次数", width = 18d,orderNum = "4")
     private Integer clickNum;
 }

+ 28 - 0
src/main/java/com/diagbot/facade/DataAnalysisFacade.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.dto.GetEntryDefectImproveDTO;
 import com.diagbot.dto.GetQcClickDTO;
 import com.diagbot.dto.GetQcClickInnerPageDTO;
+import com.diagbot.dto.HomePageByDeptDTO;
 import com.diagbot.entity.MedClickInfo;
 import com.diagbot.entity.QcresultInfo;
 import com.diagbot.enums.IsDeleteEnum;
@@ -12,6 +13,7 @@ import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.MedClickInfoServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
+import com.diagbot.util.ExcelUtils;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.SysUserUtils;
@@ -23,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
+import javax.servlet.http.HttpServletResponse;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -81,18 +84,43 @@ public class DataAnalysisFacade {
         return records;
     }
 
+
+    public void getQcClickByExport(HttpServletResponse response, GetQcClickVO getQcClickVO) {
+        List<GetQcClickDTO> records = getQcClick(getQcClickVO);
+        String fileName = "临床质控使用统计.xls";
+        ExcelUtils.exportExcel(records, null, "sheet1", GetQcClickDTO.class, fileName, response, 12.8f);
+    }
+
     public IPage<GetQcClickInnerPageDTO> getQcClickInnerPage(GetQcClickInnerPageVO getQcClickInnerPageVO) {
         clickInnerPageSet(getQcClickInnerPageVO);
         IPage<GetQcClickInnerPageDTO> records = medClickInfoService.getBaseMapper().getQcClickInnerPage(getQcClickInnerPageVO);
         return records;
     }
 
+    public void getQcClickInnerPageByExport(HttpServletResponse response,GetQcClickInnerPageVO getQcClickInnerPageVO) {
+        getQcClickInnerPageVO.setCurrent(1L);
+        getQcClickInnerPageVO.setSize(Long.MAX_VALUE);
+        getQcClickInnerPageVO.setSearchCount(false);
+        IPage<GetQcClickInnerPageDTO> page = getQcClickInnerPage(getQcClickInnerPageVO);
+        String fileName = "临床质控使用统计内页.xls";
+        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", GetQcClickInnerPageDTO.class, fileName, response, 12.8f);
+    }
+
     public IPage<GetEntryDefectImproveDTO> getEntryDefectImprove(GetEntryDefectImproveVO getEntryDefectImproveVO) {
         entryDefectSet(getEntryDefectImproveVO);
         IPage<GetEntryDefectImproveDTO> records = medClickInfoService.getBaseMapper().getEntryDefectImprove(getEntryDefectImproveVO);
         return records;
     }
 
+    public void getEntryDefectImproveByExport(HttpServletResponse response,GetEntryDefectImproveVO getEntryDefectImproveVO) {
+        getEntryDefectImproveVO.setCurrent(1L);
+        getEntryDefectImproveVO.setSize(Long.MAX_VALUE);
+        getEntryDefectImproveVO.setSearchCount(false);
+        IPage<GetEntryDefectImproveDTO> page = getEntryDefectImprove(getEntryDefectImproveVO);
+        String fileName = "条目缺陷改善统计.xls";
+        ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", GetEntryDefectImproveDTO.class, fileName, response, 12.8f);
+    }
+
     /**
      * 增加全院记录
      *

+ 40 - 0
src/main/java/com/diagbot/web/DataAnalysisController.java

@@ -19,6 +19,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;
 
@@ -55,6 +56,20 @@ public class DataAnalysisController {
         return RespDTO.onSuc(dataAnalysisFacade.getQcClick(getQcClickVO));
     }
 
+    /**
+     * 临床质控使用统计-导出
+     *
+     * @param getQcClickVO
+     * @return
+     */
+    @ApiOperation(value = "临床质控使用统计-导出[by:cy]")
+    @PostMapping("/getQcClickByExport")
+    @SysLogger("getQcClickByExport")
+    public void getQcClickByExport(HttpServletResponse response, @RequestBody @Valid GetQcClickVO getQcClickVO) {
+         dataAnalysisFacade.getQcClickByExport(response,getQcClickVO);
+    }
+
+
     /**
      * 临床质控使用统计-内页
      *
@@ -68,6 +83,19 @@ public class DataAnalysisController {
         return RespDTO.onSuc(dataAnalysisFacade.getQcClickInnerPage(getQcClickInnerPageVO));
     }
 
+    /**
+     * 临床质控使用统计-内页导出
+     *
+     * @param getQcClickInnerPageVO
+     * @return
+     */
+    @ApiOperation(value = "临床质控使用统计-内页导出[by:cy]")
+    @PostMapping("/getQcClickInnerPageByExport")
+    @SysLogger("getQcClickInnerPageByExport")
+    public void getQcClickInnerPageByExport(HttpServletResponse response,@RequestBody @Valid GetQcClickInnerPageVO getQcClickInnerPageVO) {
+       dataAnalysisFacade.getQcClickInnerPageByExport(response,getQcClickInnerPageVO);
+    }
+
     /**
      * 条目缺陷改善统计
      *
@@ -81,5 +109,17 @@ public class DataAnalysisController {
         return RespDTO.onSuc(dataAnalysisFacade.getEntryDefectImprove(getEntryDefectImproveVO));
     }
 
+    /**
+     * 条目缺陷改善统计-导出
+     *
+     * @param getEntryDefectImproveVO
+     * @return
+     */
+    @ApiOperation(value = "条目缺陷改善统计-导出[by:cy]")
+    @PostMapping("/getEntryDefectImproveByExport")
+    @SysLogger("getEntryDefectImproveByExport")
+    public void getEntryDefectImproveByExport(HttpServletResponse response,@RequestBody @Valid GetEntryDefectImproveVO getEntryDefectImproveVO) {
+       dataAnalysisFacade.getEntryDefectImproveByExport(response,getEntryDefectImproveVO);
+    }
 
 }