Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
Project
Project
Details
Activity
Releases
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
中汽研标准应用数据库
car-database-api
Commits
6962eba4
Commit
6962eba4
authored
Sep 04, 2024
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出方案 加一个概要
parent
8bc432cc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
TestPlanRecordController.java
...src/main/java/com/ruoyi/web/TestPlanRecordController.java
+1
-1
ExcelMultipleSheetsUtil.java
...a/com/ruoyi/common/utils/poi/ExcelMultipleSheetsUtil.java
+7
-3
No files found.
quality-review/src/main/java/com/ruoyi/web/TestPlanRecordController.java
View file @
6962eba4
...
...
@@ -173,7 +173,7 @@ public class TestPlanRecordController extends BaseController{
cover
.
put
(
"车辆VIN号:"
,
systemReviewExportRequest
.
getCarModel
());
cover
.
put
(
"检测机构:"
,
systemReviewExportRequest
.
getTestOrganizationName
());
cover
.
put
(
"生成时间:"
,
systemReviewExportRequest
.
getCreateTime
());
ExcelMultipleSheetsUtil
.
excelMultipleSheets
(
result
,
"
导出
方案"
+
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
),
XLSX_SUFFIX
,
respon
,
cover
);
ExcelMultipleSheetsUtil
.
excelMultipleSheets
(
result
,
"
检测
方案"
+
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
),
XLSX_SUFFIX
,
respon
,
cover
);
}
}
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelMultipleSheetsUtil.java
View file @
6962eba4
...
...
@@ -42,7 +42,7 @@ public class ExcelMultipleSheetsUtil {
Row
dataRowHead
=
sheetFirst
.
createRow
(
1
);
dataRowHead
.
setHeightInPoints
(
20
);
Cell
cell
=
dataRowHead
.
createCell
(
0
);
dataRowHead
.
createCell
(
1
);
dataRowHead
.
createCell
(
1
)
.
setCellStyle
(
getStyle
(
sheetFirst
.
getWorkbook
()))
;
cell
.
setCellValue
(
"检测方案"
);
cell
.
setCellStyle
(
getStyle
(
sheetFirst
.
getWorkbook
()));
// 合并区域:从第1行到第2行,第1列到第2列(注意:行和列的索引从0开始)
...
...
@@ -53,8 +53,12 @@ public class ExcelMultipleSheetsUtil {
cover
.
forEach
((
key
,
value
)->{
Row
dataRow
=
sheetFirst
.
createRow
(
i
[
0
]);
dataRow
.
setHeightInPoints
(
20
);
dataRow
.
createCell
(
0
).
setCellValue
(
key
);
dataRow
.
createCell
(
1
).
setCellValue
(
value
);
Cell
cellTitle
=
dataRow
.
createCell
(
0
);
cellTitle
.
setCellValue
(
key
);
cellTitle
.
setCellStyle
(
createCellStyle
(
sheetFirst
.
getWorkbook
()));
Cell
cellText
=
dataRow
.
createCell
(
1
);
cellText
.
setCellValue
(
value
);
cellText
.
setCellStyle
(
createCellStyle
(
sheetFirst
.
getWorkbook
()));
i
[
0
]
=
i
[
0
]
+
1
;
});
...
...
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