Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
Overview
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
reyun
manager
Commits
c31646f8
Commit
c31646f8
authored
Oct 21, 2020
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adi导出增加字段
parent
789fae1f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
ContractController.java
src/main/java/common/controller/ContractController.java
+41
-0
No files found.
src/main/java/common/controller/ContractController.java
View file @
c31646f8
...
...
@@ -499,6 +499,8 @@ public class ContractController {
HSSFWorkbook
workbook
;
if
(
platform
.
equals
(
"tkio"
)){
workbook
=
createTKIOExcel
(
contracts
);
}
else
if
(
platform
.
equals
(
"adi"
)){
workbook
=
createADIExcel
(
contracts
);
}
else
{
workbook
=
createCommonExcel
(
contracts
);
}
...
...
@@ -533,6 +535,45 @@ public class ContractController {
}
private
HSSFWorkbook
createADIExcel
(
List
<
Contract
>
contracts
)
{
DecimalFormat
df
=
new
DecimalFormat
(
"##,##0.00"
);
//创建工作薄对象
HSSFWorkbook
workbook
=
new
HSSFWorkbook
();
//这里也可以设置sheet的Name
//创建工作表对象
HSSFSheet
sheet
=
workbook
.
createSheet
();
//创建工作表的行
HSSFRow
row
=
sheet
.
createRow
(
0
);
List
<
String
>
title
=
Arrays
.
asList
(
"我方签约主体,签约方,合同编号,行政区域,隶属集团,合同状态,合同金额,不含税收入,合同开始日期,合同截止日期,套餐类型,区间使用天数,区间分摊收入,调整额,分摊总收入"
.
split
(
","
));
int
lineSize
=
title
.
size
();
for
(
int
i
=
0
;
i
<
lineSize
;
i
++)
{
row
.
createCell
(
i
).
setCellValue
(
title
.
get
(
i
));
}
for
(
int
i
=
0
;
i
<
contracts
.
size
();
i
++)
{
Contract
contract
=
contracts
.
get
(
i
);
HSSFRow
rowBody
=
sheet
.
createRow
(
i
+
1
);
rowBody
.
createCell
(
0
).
setCellValue
(
contract
.
getMyBodyName
());
rowBody
.
createCell
(
1
).
setCellValue
(
contract
.
getCustomerBody
());
rowBody
.
createCell
(
2
).
setCellValue
(
contract
.
getContractCode
());
rowBody
.
createCell
(
3
).
setCellValue
(
contract
.
getBarrioName
());
rowBody
.
createCell
(
4
).
setCellValue
(
contract
.
getBelongGroup
());
rowBody
.
createCell
(
5
).
setCellValue
(
CONTRACT_STATUS
.
get
(
contract
.
getStatus
()));
rowBody
.
createCell
(
6
).
setCellValue
(
df
.
format
(
contract
.
getMoney
()));
rowBody
.
createCell
(
7
).
setCellValue
(
df
.
format
(
contract
.
getIncomeExcludingTax
()
*
1.0
/
100
));
rowBody
.
createCell
(
8
).
setCellValue
(
contract
.
getStartDate
());
rowBody
.
createCell
(
9
).
setCellValue
(
contract
.
getEndDate
());
rowBody
.
createCell
(
10
).
setCellValue
(
contract
.
getPriceLevelName
();
rowBody
.
createCell
(
11
).
setCellValue
(
contract
.
getIntervalUseDays
());
rowBody
.
createCell
(
12
).
setCellValue
(
df
.
format
(
contract
.
getIntervaIncomeShare
()
*
1.0
/
100
));
rowBody
.
createCell
(
13
).
setCellValue
(
df
.
format
(
contract
.
getAdjustmentFund
()
*
1.0
/
100
));
rowBody
.
createCell
(
14
).
setCellValue
(
df
.
format
(
contract
.
getIncomeShareAll
()
*
1.0
/
100
));
}
return
workbook
;
}
private
HSSFWorkbook
createCommonExcel
(
List
<
Contract
>
contracts
){
DecimalFormat
df
=
new
DecimalFormat
(
"##,##0.00"
);
//创建工作薄对象
...
...
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