java
    @ApiOperation(value = "导出编目质控历史")
    @PostMapping("/exportQcCatalogRecord")
    public void exportQcCatalogRecordList(HttpServletResponse response, @RequestBody QcCatalogRecordRequest request){
        request.setPage(-1);
        request.setRows(-1);
        IPage<QcCatalogV> ipage=iRecCatalogQcService.getQcCatalogRecordList(request);
        List<QcCatalogV> list=ipage.getRecords();
        try {
            response.setHeader("content-Type", "application/vnd.ms-excel");
            response.setHeader("Content-Disposition",
                    "attachment;filename=" + URLEncoder.encode("编目质控历史" + ".xls", "utf-8"));
            ExportParams exportParams=new ExportParams();
            // 生成workbook 并导出
            Workbook workbook = ExcelExportUtil.exportBigExcel(exportParams, QcCatalogV.class, list);
            ExcelExportUtil.closeExportBigExcel();
            workbook.write(response.getOutputStream());
            workbook.close();
        } catch (IOException e) {
            e.printStackTrace();
            throw new BusinessException(ResultCodeEnum.ERR_0x1000.getCode(),e.getMessage());
        }
    }
java
    @Excel(name = "质控状态",width = 15,orderNum = "1")
    private Integer qcStatus;
    @Excel(name = "姓名",width = 15,orderNum = "2")
    private String fullName;
    @Excel(name = "年龄",width = 15,orderNum = "3")
    private String nage;
    @Excel(name = "住院号",width = 15,orderNum = "4")
    private String inhospIndexNo;
    @Excel(name = "住院天数",width = 15,orderNum = "5")
    private String inhospDays;
本文作者:Weee
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!