Commit 347d9eb4 authored by 高宇's avatar 高宇

1.导出Dto类

parent 9cdbd322
...@@ -16,62 +16,72 @@ public class RoleDto extends CyIdIncreEntity<RoleDto> { ...@@ -16,62 +16,72 @@ public class RoleDto extends CyIdIncreEntity<RoleDto> {
private String nqy; private String nqy;
@Excel(name = "ddh", orderNum = "3", width = 20) @Excel(name = "ddh", orderNum = "3", width = 20)
private String ddh; private String ddh;
@Excel(name = "khdm", orderNum = "0", width = 20) @Excel(name = "khdm", orderNum = "4", width = 20)
private String khdm; private String khdm;
@Excel(name = "khm", orderNum = "4", width = 20) @Excel(name = "khm", orderNum = "5", width = 20)
private String khm; private String khm;
@Excel(name = "khqf", orderNum = "5", width = 20)
@Excel(name = "gc", orderNum = "6", width = 20)
private String gc;
@Excel(name = "co", orderNum = "7", width = 20)
private String co;
@Excel(name = "seqno", orderNum = "8", width = 20)
private String seqno;
@Excel(name = "khqf", orderNum = "8", width = 20)
private String khqf; private String khqf;
@Excel(name = "pn", orderNum = "7", width = 20) @Excel(name = "pn", orderNum = "11", width = 20)
private String pn; private String pn;
@Excel(name = "mksqf", orderNum = "6", width = 20) @Excel(name = "mksqf", orderNum = "9", width = 20)
private String mksqf; private String mksqf;
@Excel(name = "xsjg", orderNum = "12", width = 20,type = 10) @Excel(name = "xsjg", orderNum = "16", width = 20,type = 10)
private String xsjg; private String xsjg;
@Excel(name = "zzc", orderNum = "9", width = 20,type = 10) @Excel(name = "zzc", orderNum = "19", width = 20,type = 10)
private String zzc; private String zzc;
@Excel(name = "rmb", orderNum = "13", width = 20,type = 10) @Excel(name = "rmb", orderNum = "21", width = 20,type = 10)
private String rmb; private String rmb;
@Excel(name = "chzsa", orderNum = "10", width = 20,type = 10) @Excel(name = "chzsa", orderNum = "22", width = 20,type = 10)
private String chzsa; private String chzsa;
@Excel(name = "szzt", orderNum = "8", width = 20) @Excel(name = "szzt", orderNum = "18", width = 20)
private String szzt; private String szzt;
@Excel(name = "chzsb", orderNum = "14", width = 20,type = 10) @Excel(name = "chzsb", orderNum = "23", width = 20,type = 10)
private String chzsb; private String chzsb;
@Excel(name = "ddjsr", orderNum = "10", width = 20) @Excel(name = "ddjsr", orderNum = "24", width = 20)
private String ddjsr; private String ddjsr;
@Excel(name = "ddzdnq", orderNum = "11", width = 20) @Excel(name = "ddzdnq", orderNum = "25", width = 20)
private String ddzdnq; private String ddzdnq;
@Excel(name = "zd", orderNum = "1", width = 20) @Excel(name = "zd", orderNum = "1", width = 20)
private String zd; private String zd;
@Excel(name = "fnq", orderNum = "15", width = 20)
@Excel(name = "fnq", orderNum = "17", width = 20)
private String fnq; private String fnq;
@Excel(name = "l24", orderNum = "15", width = 20)
private String ltw; private String ltw;
@Excel(name = "yyydd", orderNum = "16", width = 20) @Excel(name = "yydd", orderNum = "26", width = 20)
private String yydd; private String yydd;
@Excel(name = "zzcg", orderNum = "16", width = 20,type = 10) @Excel(name = "zzcg", orderNum = "20", width = 20,type = 10)
private String zzcg; private String zzcg;
@Excel(name = "bz", orderNum = "17", width = 20) @Excel(name = "bz", orderNum = "14", width = 20)
private String bz; private String bz;
@Excel(name = "jypn", orderNum = "17", width = 20) @Excel(name = "jypn", orderNum = "13", width = 20)
private String jypn; private String jypn;
@Excel(name = "fzdm", orderNum = "17", width = 20) @Excel(name = "fzdm", orderNum = "12", width = 20)
private String fzdm; private String fzdm;
@Excel(name = "xslj", orderNum = "17", width = 20) @Excel(name = "xslj", orderNum = "10", width = 20)
private String xslj; private String xslj;
@Excel(name = "jlpm", orderNum = "17", width = 20) @Excel(name = "jlpm", orderNum = "9", width = 20)
private String jlpm; private String jlpm;
@Excel(name = "hl", orderNum = "15", width = 20)
private String hl;
private String person; private String person;
private String month_one_total; private String month_one_total;
......
...@@ -34,7 +34,7 @@ public class ExportToExcelUtil extends CyEpExcelUtil { ...@@ -34,7 +34,7 @@ public class ExportToExcelUtil extends CyEpExcelUtil {
// 1、创建一个Workbook(XSSFWorkbook) // 1、创建一个Workbook(XSSFWorkbook)
Workbook workbook = new XSSFWorkbook(); Workbook workbook = new XSSFWorkbook();
// 3、定义标题和sheetName // 3、定义标题和sheetName
ExportParams exportParams = new ExportParams("导出统计", "sheet1"); ExportParams exportParams = new ExportParams();
exportParams.setStyle(ExcelExportStatisticStyler.class); exportParams.setStyle(ExcelExportStatisticStyler.class);
// 默认未 ExcelType.HSSF导出失败 // 默认未 ExcelType.HSSF导出失败
exportParams.setType(ExcelType.XSSF); exportParams.setType(ExcelType.XSSF);
...@@ -46,7 +46,7 @@ public class ExportToExcelUtil extends CyEpExcelUtil { ...@@ -46,7 +46,7 @@ public class ExportToExcelUtil extends CyEpExcelUtil {
public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName, HttpServletResponse response) { public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName, HttpServletResponse response) {
ExportParams exportParams = new ExportParams(title, sheetName); ExportParams exportParams = new ExportParams();
exportParams.setStyle(ExcelExportStatisticStyler.class); exportParams.setStyle(ExcelExportStatisticStyler.class);
String[] format = fileName.split("\\."); String[] format = fileName.split("\\.");
if (format[1].equals("xlsx")) { if (format[1].equals("xlsx")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment