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
2ac13cbf
Commit
2ac13cbf
authored
Sep 06, 2024
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出的顺序
parent
a9657b64
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
TTestPlanRecord.java
...eview/src/main/java/com/ruoyi/domain/TTestPlanRecord.java
+3
-0
TestPlanRecordController.java
...src/main/java/com/ruoyi/web/TestPlanRecordController.java
+12
-2
ExcelMultipleSheetsUtil.java
...a/com/ruoyi/common/utils/poi/ExcelMultipleSheetsUtil.java
+3
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/TTestPlanRecord.java
View file @
2ac13cbf
...
@@ -27,6 +27,7 @@ public class TTestPlanRecord{
...
@@ -27,6 +27,7 @@ public class TTestPlanRecord{
* 被检车企ID
* 被检车企ID
*/
*/
@ApiModelProperty
(
"被检车企ID"
)
@ApiModelProperty
(
"被检车企ID"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
inspectCarCompanyId
;
private
Long
inspectCarCompanyId
;
/**
/**
...
@@ -60,6 +61,7 @@ public class TTestPlanRecord{
...
@@ -60,6 +61,7 @@ public class TTestPlanRecord{
* 检测机构id
* 检测机构id
*/
*/
@ApiModelProperty
(
"检测机构id"
)
@ApiModelProperty
(
"检测机构id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
testOrganizationId
;
private
Long
testOrganizationId
;
/**
/**
...
@@ -85,6 +87,7 @@ public class TTestPlanRecord{
...
@@ -85,6 +87,7 @@ public class TTestPlanRecord{
* 标准id
* 标准id
*/
*/
@ApiModelProperty
(
"标准id"
)
@ApiModelProperty
(
"标准id"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
inspectionStandardId
;
private
Long
inspectionStandardId
;
/**
/**
...
...
quality-review/src/main/java/com/ruoyi/web/TestPlanRecordController.java
View file @
2ac13cbf
...
@@ -173,7 +173,17 @@ public class TestPlanRecordController extends BaseController{
...
@@ -173,7 +173,17 @@ public class TestPlanRecordController extends BaseController{
cover
.
put
(
"车辆VIN号:"
,
systemReviewExportRequest
.
getCarModel
());
cover
.
put
(
"车辆VIN号:"
,
systemReviewExportRequest
.
getCarModel
());
cover
.
put
(
"检测机构:"
,
systemReviewExportRequest
.
getTestOrganizationName
());
cover
.
put
(
"检测机构:"
,
systemReviewExportRequest
.
getTestOrganizationName
());
cover
.
put
(
"生成时间:"
,
systemReviewExportRequest
.
getCreateTime
());
cover
.
put
(
"生成时间:"
,
systemReviewExportRequest
.
getCreateTime
());
ExcelMultipleSheetsUtil
.
excelMultipleSheets
(
result
,
"检测方案"
+
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
),
XLSX_SUFFIX
,
respon
,
cover
);
// 自定义排序顺序
List
<
String
>
customOrder
=
Arrays
.
asList
(
"体系审查"
,
"车型审查"
,
"车型检验"
);
Map
<
String
,
Object
>
resultDesc
=
new
LinkedHashMap
<>();
customOrder
.
forEach
(
key
->
{
if
(
result
.
containsKey
(
key
))
{
resultDesc
.
put
(
key
,
result
.
get
(
key
));
}
}
});
ExcelMultipleSheetsUtil
.
excelMultipleSheets
(
resultDesc
,
"检测方案"
+
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
),
XLSX_SUFFIX
,
respon
,
cover
);
}
}
}
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelMultipleSheetsUtil.java
View file @
2ac13cbf
...
@@ -197,6 +197,9 @@ public class ExcelMultipleSheetsUtil {
...
@@ -197,6 +197,9 @@ public class ExcelMultipleSheetsUtil {
// 创建数据行
// 创建数据行
Row
dataRow
=
sheet
.
createRow
(
rowIndex
);
Row
dataRow
=
sheet
.
createRow
(
rowIndex
);
sheet
.
setColumnWidth
(
1
,
25
*
256
);
sheet
.
setColumnWidth
(
2
,
25
*
256
);
sheet
.
setColumnWidth
(
3
,
25
*
256
);
Field
[]
fields
=
data
.
getClass
().
getDeclaredFields
();
Field
[]
fields
=
data
.
getClass
().
getDeclaredFields
();
for
(
int
i
=
0
;
i
<
fields
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
fields
.
length
;
i
++)
{
createDataCell
(
dataCellStyle
,
fields
,
dataRow
,
i
,
data
);
createDataCell
(
dataCellStyle
,
fields
,
dataRow
,
i
,
data
);
...
...
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