Commit 93fdda6f356da3f1395dbe3282531c0df2e62426

Authored by 胡翰林
1 parent b981d2c7

模板修改

1 1 package com.ash.excelData;
2 2
3 3 import com.alibaba.excel.annotation.ExcelProperty;
  4 +import com.alibaba.excel.annotation.write.style.ColumnWidth;
4 5 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
  6 +import com.alibaba.excel.annotation.write.style.ContentStyle;
5 7 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
6 8 import com.ash.base.excelOpt.ExcelCheck;
7 9 import lombok.AllArgsConstructor;
... ... @@ -23,29 +25,43 @@ public class CaseExcelData implements Serializable {
23 25
24 26 @ExcelCheck(canEmpty = false, canRepeat = false)
25 27 @ExcelProperty(value = "案件标识", index = 0)
  28 + @ContentStyle(dataFormat = 49)
  29 + @ColumnWidth(25)
26 30 private String mark;
27 31
28 32 @ExcelCheck(canEmpty = false, canRepeat = false)
29 33 @ExcelProperty(value = "案件编号", index = 1)
  34 + @ContentStyle(dataFormat = 49)
  35 + @ColumnWidth(25)
30 36 private String code;
31 37
32 38 @ExcelCheck(canEmpty = false)
33 39 @ExcelProperty(value = "案件名称", index = 2)
  40 + @ContentStyle(dataFormat = 49)
  41 + @ColumnWidth(25)
34 42 private String name;
35 43
36 44 @ExcelCheck(canEmpty = false)
37 45 @ExcelProperty(value = "案件详情", index = 3)
  46 + @ContentStyle(dataFormat = 49)
  47 + @ColumnWidth(25)
38 48 private String caseDetail;
39 49
40 50 @ExcelCheck(canEmpty = false)
41 51 @ExcelProperty(value = "接警时间", index = 4)
  52 + @ContentStyle(dataFormat = 49)
  53 + @ColumnWidth(25)
42 54 private Date alarmDate;
43 55
44 56 @ExcelCheck(canEmpty = false)
45 57 @ExcelProperty(value = "立案时间", index = 5)
  58 + @ContentStyle(dataFormat = 49)
  59 + @ColumnWidth(25)
46 60 private Date filingDate;
47 61
48 62 @ExcelCheck(canEmpty = false)
49 63 @ExcelProperty(value = "立案单位", index = 6)
  64 + @ContentStyle(dataFormat = 49)
  65 + @ColumnWidth(25)
50 66 private String filingUnit;
51 67 }
... ...
1 1 package com.ash.excelData;
2 2
3 3 import com.alibaba.excel.annotation.ExcelProperty;
  4 +import com.alibaba.excel.annotation.write.style.ColumnWidth;
4 5 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
  6 +import com.alibaba.excel.annotation.write.style.ContentStyle;
5 7 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
6 8 import com.ash.base.excelOpt.ExcelCheck;
7 9 import lombok.AllArgsConstructor;
... ... @@ -23,78 +25,116 @@ public class WarningInstanceExcelData implements Serializable {
23 25
24 26 @ExcelCheck(canEmpty = false, canRepeat = false)
25 27 @ExcelProperty(value = "警情单编号", index = 0)
  28 + @ContentStyle(dataFormat = 49)
  29 + @ColumnWidth(25)
26 30 private String code;
27 31
28 32 @ExcelCheck(canEmpty = false)
29 33 @ExcelProperty(value = "报警时间", index = 1)
  34 + @ContentStyle(dataFormat = 49)
  35 + @ColumnWidth(25)
30 36 private Date alarmDate;
31 37
32 38 @ExcelCheck(canEmpty = false)
33 39 @ExcelProperty(value = "报警电话", index = 2)
  40 + @ContentStyle(dataFormat = 49)
  41 + @ColumnWidth(25)
34 42 private String phoneNum;
35 43
36 44 @ExcelCheck(canEmpty = false)
37 45 @ExcelProperty(value = "所属市局", index = 3)
  46 + @ContentStyle(dataFormat = 49)
  47 + @ColumnWidth(25)
38 48 private String municipalPolice;
39 49
40 50 @ExcelCheck(canEmpty = false)
41 51 @ExcelProperty(value = "所属分县局", index = 4)
  52 + @ContentStyle(dataFormat = 49)
  53 + @ColumnWidth(25)
42 54 private String countyPolice;
43 55
44 56 @ExcelCheck(canEmpty = false)
45 57 @ExcelProperty(value = "管辖单位", index = 5)
  58 + @ContentStyle(dataFormat = 49)
  59 + @ColumnWidth(25)
46 60 private String jurisdictionalUnit;
47 61
48 62 @ExcelCheck(canEmpty = false)
49 63 @ExcelProperty(value = "所属区县", index = 6)
  64 + @ContentStyle(dataFormat = 49)
  65 + @ColumnWidth(25)
50 66 private String county;
51 67
52 68 @ExcelCheck(canEmpty = false)
53 69 @ExcelProperty(value = "事发地址", index = 7)
  70 + @ContentStyle(dataFormat = 49)
  71 + @ColumnWidth(25)
54 72 private String address;
55 73
56 74 @ExcelCheck(canEmpty = false)
57 75 @ExcelProperty(value = "报警内容", index = 8)
  76 + @ContentStyle(dataFormat = 49)
  77 + @ColumnWidth(25)
58 78 private String content;
59 79
60 80 @ExcelCheck(canEmpty = false)
61 81 @ExcelProperty(value = "接警警情类别", index = 9)
  82 + @ContentStyle(dataFormat = 49)
  83 + @ColumnWidth(25)
62 84 private String alarmCategory;
63 85
64 86 @ExcelCheck(canEmpty = false)
65 87 @ExcelProperty(value = "接警警情类型", index = 10)
  88 + @ContentStyle(dataFormat = 49)
  89 + @ColumnWidth(25)
66 90 private String alarmType;
67 91
68 92 @ExcelCheck(canEmpty = false)
69 93 @ExcelProperty(value = "接警警情细类", index = 11)
  94 + @ContentStyle(dataFormat = 49)
  95 + @ColumnWidth(25)
70 96 private String alarmTypeDetail;
71 97
72 98 @ExcelCheck(canEmpty = false)
73 99 @ExcelProperty(value = "接警警情子类", index = 12)
  100 + @ContentStyle(dataFormat = 49)
  101 + @ColumnWidth(25)
74 102 private String alarmSubType;
75 103
76 104 @ExcelCheck(canEmpty = false)
77 105 @ExcelProperty(value = "反馈内容", index = 13)
  106 + @ContentStyle(dataFormat = 49)
  107 + @ColumnWidth(25)
78 108 private String feedbackContent;
79 109
80 110 @ExcelCheck(canEmpty = false)
81 111 @ExcelProperty(value = "警情类别", index = 14)
  112 + @ContentStyle(dataFormat = 49)
  113 + @ColumnWidth(25)
82 114 private String category;
83 115
84 116 @ExcelCheck(canEmpty = false)
85 117 @ExcelProperty(value = "警情类型", index = 15)
  118 + @ContentStyle(dataFormat = 49)
  119 + @ColumnWidth(25)
86 120 private String type;
87 121
88 122 @ExcelCheck(canEmpty = false)
89 123 @ExcelProperty(value = "警情细类", index = 16)
  124 + @ContentStyle(dataFormat = 49)
  125 + @ColumnWidth(25)
90 126 private String typeDetail;
91 127
92 128 @ExcelCheck(canEmpty = false)
93 129 @ExcelProperty(value = "警情子类", index = 17)
  130 + @ContentStyle(dataFormat = 49)
  131 + @ColumnWidth(25)
94 132 private String subType;
95 133
96 134 @ExcelCheck(canEmpty = false)
97 135 @ExcelProperty(value = "处理结果", index = 18)
  136 + @ContentStyle(dataFormat = 49)
  137 + @ColumnWidth(25)
98 138 private String result;
99 139
100 140
... ...