Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
d3bd4e7a
Commit
d3bd4e7a
authored
Jul 06, 2021
by
liuxinben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
31172096
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
ExportExcel.java
src/main/java/com/yxproject/start/utils/ExportExcel.java
+20
-19
No files found.
src/main/java/com/yxproject/start/utils/ExportExcel.java
View file @
d3bd4e7a
...
@@ -46,6 +46,8 @@ public class ExportExcel {
...
@@ -46,6 +46,8 @@ public class ExportExcel {
sheet
.
setColumnWidth
(
11
,
30
*
110
);
sheet
.
setColumnWidth
(
11
,
30
*
110
);
sheet
.
setColumnWidth
(
12
,
30
*
110
);
sheet
.
setColumnWidth
(
12
,
30
*
110
);
sheet
.
setColumnWidth
(
13
,
30
*
110
);
sheet
.
setColumnWidth
(
13
,
30
*
110
);
sheet
.
setColumnWidth
(
14
,
30
*
110
);
sheet
.
setColumnWidth
(
15
,
30
*
110
);
//第三步创建行row:添加表头0行
//第三步创建行row:添加表头0行
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFCellStyle
style
=
wb
.
createCellStyle
();
//样式
HSSFCellStyle
style
=
wb
.
createCellStyle
();
//样式
...
@@ -70,23 +72,23 @@ public class ExportExcel {
...
@@ -70,23 +72,23 @@ public class ExportExcel {
cell
=
row
.
createCell
(
6
);
//设定值
cell
=
row
.
createCell
(
6
);
//设定值
cell
.
setCellValue
(
"身份证号"
);
cell
.
setCellValue
(
"身份证号"
);
cell
=
row
.
createCell
(
7
);
//设定值
cell
=
row
.
createCell
(
7
);
//设定值
cell
.
setCellValue
(
"联系方式"
);
cell
=
row
.
createCell
(
8
);
//设定值
cell
.
setCellValue
(
"条形码号"
);
cell
.
setCellValue
(
"条形码号"
);
cell
=
row
.
createCell
(
9
);
//设定值
cell
=
row
.
createCell
(
8
);
//设定值
cell
.
setCellValue
(
"签发机关"
);
cell
.
setCellValue
(
"签发机关"
);
cell
=
row
.
createCell
(
10
);
//设定值
cell
=
row
.
createCell
(
9
);
//设定值
cell
.
setCellValue
(
"运单号"
);
cell
.
setCellValue
(
"运单号"
);
cell
=
row
.
createCell
(
1
1
);
//设定值
cell
=
row
.
createCell
(
1
0
);
//设定值
cell
.
setCellValue
(
"制证类型"
);
cell
.
setCellValue
(
"制证类型"
);
cell
=
row
.
createCell
(
1
2
);
//设定值
cell
=
row
.
createCell
(
1
1
);
//设定值
cell
.
setCellValue
(
"原制证类型"
);
cell
.
setCellValue
(
"原制证类型"
);
cell
=
row
.
createCell
(
1
3
);
//设定值
cell
=
row
.
createCell
(
1
2
);
//设定值
cell
.
setCellValue
(
"复核日期"
);
cell
.
setCellValue
(
"复核日期"
);
cell
=
row
.
createCell
(
1
4
);
//设定值
cell
=
row
.
createCell
(
1
3
);
//设定值
cell
.
setCellValue
(
"复核人"
);
cell
.
setCellValue
(
"复核人"
);
cell
=
row
.
createCell
(
1
5
);
//设定值
cell
=
row
.
createCell
(
1
4
);
//设定值
cell
.
setCellValue
(
"备注"
);
cell
.
setCellValue
(
"备注"
);
cell
=
row
.
createCell
(
15
);
//设定值
cell
.
setCellValue
(
"联系方式"
);
for
(
int
i
=
0
;
i
<
mapList
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
mapList
.
size
();
i
++){
row
=
sheet
.
createRow
(
i
+
1
);
row
=
sheet
.
createRow
(
i
+
1
);
...
@@ -105,24 +107,23 @@ public class ExportExcel {
...
@@ -105,24 +107,23 @@ public class ExportExcel {
cell
=
row
.
createCell
(
6
);
//设定值
cell
=
row
.
createCell
(
6
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"CARD_ID"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"CARD_ID"
)+
""
);
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"CARD_ID"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"CARD_ID"
)+
""
);
cell
=
row
.
createCell
(
7
);
//设定值
cell
=
row
.
createCell
(
7
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"APPLY_PHONE"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"APPLY_PHONE"
)+
""
);
cell
=
row
.
createCell
(
8
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"QR_CODE"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"QR_CODE"
)+
""
);
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"QR_CODE"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"QR_CODE"
)+
""
);
cell
=
row
.
createCell
(
9
);
//设定值
cell
=
row
.
createCell
(
8
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"SIGN_GOVT"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"SIGN_GOVT"
)+
""
);
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"SIGN_GOVT"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"SIGN_GOVT"
)+
""
);
cell
=
row
.
createCell
(
10
);
//设定值
cell
=
row
.
createCell
(
9
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"WAYBILL_NUMBER"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"WAYBILL_NUMBER"
)+
""
);
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"WAYBILL_NUMBER"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"WAYBILL_NUMBER"
)+
""
);
cell
=
row
.
createCell
(
1
1
);
//设定值
cell
=
row
.
createCell
(
1
0
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"CARD_TYPE_ID"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"CARD_TYPE_ID"
)+
""
);
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"CARD_TYPE_ID"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"CARD_TYPE_ID"
)+
""
);
cell
=
row
.
createCell
(
1
2
);
//设定值
cell
=
row
.
createCell
(
1
1
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"OLD_CARD_TYPE_ID"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"OLD_CARD_TYPE_ID"
)+
""
);
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"OLD_CARD_TYPE_ID"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"OLD_CARD_TYPE_ID"
)+
""
);
cell
=
row
.
createCell
(
1
3
);
//设定值
cell
=
row
.
createCell
(
1
2
);
//设定值
cell
.
setCellValue
(
mapList
.
get
(
i
).
get
(
"CHECK_DATE"
)+
""
);
cell
.
setCellValue
(
mapList
.
get
(
i
).
get
(
"CHECK_DATE"
)+
""
);
cell
=
row
.
createCell
(
1
4
);
//设定值
cell
=
row
.
createCell
(
1
3
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"CHECK_NAME"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"CHECK_NAME"
)+
""
);
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"CHECK_NAME"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"CHECK_NAME"
)+
""
);
cell
=
row
.
createCell
(
1
5
);
//设定值
cell
=
row
.
createCell
(
1
4
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"NOTE"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"NOTE"
)+
""
);
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"NOTE"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"NOTE"
)+
""
);
cell
=
row
.
createCell
(
15
);
//设定值
cell
.
setCellValue
(
"null"
.
equals
(
mapList
.
get
(
i
).
get
(
"APPLY_PHONE"
)+
""
)?
""
:
mapList
.
get
(
i
).
get
(
"APPLY_PHONE"
)+
""
);
}
}
HSSFSheet
sheet1
=
wb
.
createSheet
(
"公安网信息交接表"
);
HSSFSheet
sheet1
=
wb
.
createSheet
(
"公安网信息交接表"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment