Commit 93fdda6f356da3f1395dbe3282531c0df2e62426

Authored by 胡翰林
1 parent b981d2c7

模板修改

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