Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
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
王飞
vehicle-quality-review
Commits
87d109eb
Commit
87d109eb
authored
Mar 12, 2024
by
高滢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into gaoying
parents
3b871da5
366a1516
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
103 additions
and
18 deletions
+103
-18
CarReviewTask.java
...-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
+3
-0
ReviewDetailsResult.java
...w/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
+1
-0
ReviewEnterpriseArchive.java
...c/main/java/com/ruoyi/domain/ReviewEnterpriseArchive.java
+2
-0
ReviewSceneChangeTask.java
...src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
+2
-0
ReviewSceneChangeTaskUserRelation.java
...a/com/ruoyi/domain/ReviewSceneChangeTaskUserRelation.java
+1
-0
Standard.java
quality-review/src/main/java/com/ruoyi/domain/Standard.java
+2
-0
SystemReviewTask.java
...view/src/main/java/com/ruoyi/domain/SystemReviewTask.java
+3
-0
Task.java
quality-review/src/main/java/com/ruoyi/domain/Task.java
+4
-0
InspectionReportPdfVO.java
.../main/java/com/ruoyi/domain/vo/InspectionReportPdfVO.java
+6
-1
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+62
-17
TaskListRequest.java
.../src/main/java/com/ruoyi/web/request/TaskListRequest.java
+2
-0
ReviewSceneChangeTaskResponse.java
...com/ruoyi/web/response/ReviewSceneChangeTaskResponse.java
+3
-0
TaskFindResponse.java
...rc/main/java/com/ruoyi/web/response/TaskFindResponse.java
+7
-0
TaskGetInfoResponse.java
...main/java/com/ruoyi/web/response/TaskGetInfoResponse.java
+3
-0
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+2
-0
receipt_template_02_27.pdf
...ew/src/main/resources/template/receipt_template_02_27.pdf
+0
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/CarReviewTask.java
View file @
87d109eb
...
...
@@ -78,12 +78,14 @@ public class CarReviewTask implements Serializable {
* 任务开始时间
*/
@ApiModelProperty
(
"任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskBeginTime
;
/**
* 任务结束时间
*/
@ApiModelProperty
(
"任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskEndTime
;
/**
...
...
@@ -97,6 +99,7 @@ public class CarReviewTask implements Serializable {
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
createTime
;
/**
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewDetailsResult.java
View file @
87d109eb
...
...
@@ -77,6 +77,7 @@ public class ReviewDetailsResult implements Serializable {
* 最后修改时间
*/
@ApiModelProperty
(
"最后修改时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
lastModifyTime
;
@ApiModelProperty
(
"文件目录"
)
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewEnterpriseArchive.java
View file @
87d109eb
...
...
@@ -46,6 +46,7 @@ public class ReviewEnterpriseArchive implements Serializable {
* 发布日期
*/
@ApiModelProperty
(
"发布日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
publishDate
;
/**
...
...
@@ -83,6 +84,7 @@ public class ReviewEnterpriseArchive implements Serializable {
private
String
createBy
;
@ApiModelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
createTime
;
}
\ No newline at end of file
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTask.java
View file @
87d109eb
...
...
@@ -190,12 +190,14 @@ public class ReviewSceneChangeTask {
* 任务开始时间
*/
@ApiModelProperty
(
"任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskBeginTime
;
/**
* 任务结束时间
*/
@ApiModelProperty
(
"任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskEndTime
;
/**
...
...
quality-review/src/main/java/com/ruoyi/domain/ReviewSceneChangeTaskUserRelation.java
View file @
87d109eb
...
...
@@ -65,6 +65,7 @@ public class ReviewSceneChangeTaskUserRelation {
* 审核时间
*/
@ApiModelProperty
(
"审核时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
decisionTime
;
/**
...
...
quality-review/src/main/java/com/ruoyi/domain/Standard.java
View file @
87d109eb
...
...
@@ -54,9 +54,11 @@ public class Standard {
private
String
standardStatus
;
@ApiModelProperty
(
"发布日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
releaseDate
;
@ApiModelProperty
(
"实施日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
implementationDate
;
}
quality-review/src/main/java/com/ruoyi/domain/SystemReviewTask.java
View file @
87d109eb
...
...
@@ -82,12 +82,14 @@ public class SystemReviewTask {
* 任务开始时间
*/
@ApiModelProperty
(
"任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskBeginTime
;
/**
* 任务结束时间
*/
@ApiModelProperty
(
"任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskEndTime
;
/**
...
...
@@ -114,6 +116,7 @@ public class SystemReviewTask {
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
createTime
;
/**
...
...
quality-review/src/main/java/com/ruoyi/domain/Task.java
View file @
87d109eb
...
...
@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -116,9 +117,11 @@ public class Task {
private
String
taskInitiatorDept
;
@ApiModelProperty
(
"任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskBeginTime
;
@ApiModelProperty
(
"任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskEndTime
;
...
...
@@ -132,6 +135,7 @@ public class Task {
@ApiModelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
createTime
;
...
...
quality-review/src/main/java/com/ruoyi/domain/vo/InspectionReportPdfVO.java
View file @
87d109eb
...
...
@@ -131,7 +131,7 @@ public class InspectionReportPdfVO {
private
String
taskNumber
;
/**
*
*
样品数量
*/
private
String
sampleSum
;
...
...
@@ -140,6 +140,11 @@ public class InspectionReportPdfVO {
*/
private
String
vehicleType
;
/**
* 车辆型号
*/
private
String
vehicleModel
;
/**
* 车辆识别码
*/
...
...
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
87d109eb
...
...
@@ -5,7 +5,7 @@ import com.itextpdf.text.pdf.*;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.PdfBaseWriter
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.domain.vo.
PhotoStorage
VO
;
import
com.ruoyi.domain.vo.
InspectionReportPdf
VO
;
import
com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO
;
import
com.ruoyi.service.PdfTemplateManagementService
;
import
com.ruoyi.service.ReviewEnterpriseArchiveService
;
...
...
@@ -76,23 +76,15 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
BaseFont
bf
=
BaseFont
.
createFont
(
"STSongStd-Light"
,
"UniGB-UCS2-H"
,
BaseFont
.
NOT_EMBEDDED
);
fields
.
addSubstitutionFont
(
bf
);
// 渲染
// fillData(fields, map, ps);
renderData
(
fields
);
// 测试数据
InspectionReportPdfVO
inspectionReportPdfVO
=
requireData
();
PhotoStorageVO
photoStorageVO
=
new
PhotoStorageVO
();
Class
<?
extends
PhotoStorageVO
>
aClass
=
photoStorageVO
.
getClass
();
Field
[]
declaredFields
=
aClass
.
getDeclaredFields
();
for
(
Field
field
:
declaredFields
)
{
String
name
=
field
.
getName
();
System
.
out
.
println
(
name
);
}
// 渲染数据
renderData
(
fields
,
inspectionReportPdfVO
);
//必须要调用这个,否则文档不会生成的
ps
.
setFormFlattening
(
true
);
if
(
ps
!=
null
){
ps
.
close
();
}
ps
.
close
();
//生成pdf路径存放的路径
fos
=
response
.
getOutputStream
();
fos
.
write
(
bos
.
toByteArray
());
...
...
@@ -113,6 +105,40 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
}
}
private
InspectionReportPdfVO
requireData
()
{
InspectionReportPdfVO
inspectionReportPdfVO
=
InspectionReportPdfVO
.
builder
()
.
reportNumber
(
"报告编号"
)
.
productName
(
"产品名称"
)
.
productModel
(
"产品型号"
)
.
entrustedUnit
(
"委托单位"
)
.
inspectionCenterName
(
"检验中心名称"
)
.
inspectionCenterAddress
(
"检验中心地址"
)
.
inspectionCenterTelephone
(
"检验中心电话"
)
.
inspectionCenterPostcode
(
"检验中心邮编"
)
.
clientAddress
(
"委托单位地址"
)
.
entrustedUnitTelephone
(
"委托单位电话"
)
.
clientPostalCode
(
"委托单位邮编"
)
.
sampleName
(
"样品名称"
)
.
typeSpecification
(
"型号规格"
)
.
productionEnterprise
(
"生产企业"
)
.
sampleSender
(
"送养着"
)
.
sampleDeliveryDate
(
"送样日期"
)
.
sampleQuantity
(
"样品数量"
)
.
productionDate
(
"生产日期"
)
.
inspectionItem
(
"检验项目"
)
.
testConclusion
(
"检验结论"
)
.
issueDate
(
"签发日期"
)
.
remark
(
"备注"
)
.
taskNumber
(
"任务编号"
)
.
sampleSum
(
"样品数量"
)
.
vehicleType
(
"车俩类型"
)
.
vehicleModel
(
"车辆型号"
)
.
vehicleIdentificationNumber
(
"车辆识别码"
)
.
sampleNumberSummary
(
"样品编号汇总"
)
.
build
();
return
inspectionReportPdfVO
;
}
/**
* 企业留档文件PDF下载
* @param taskId
...
...
@@ -147,7 +173,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
document
.
setParagraph
(
"检验中心名称"
,
12
f
,
0
,
30
,
15
f
,
20
f
);
// 创建表格
List
<
String
>
list
=
Arrays
.
asList
(
"文件名称"
,
"文件目录"
,
"标准章节"
,
"标准要求"
,
"审查要点"
);
float
[]
columnWidths
=
{
20
,
20
,
20
,
70
,
7
0
};
float
[]
columnWidths
=
{
30
,
25
,
25
,
60
,
6
0
};
PdfPTable
table
=
document
.
createWithHeaderTable
(
list
,
columnWidths
);
// 查询数据
List
<
ReviewEnterpriseArchiveViewVO
>
viewList
=
reviewEnterpriseArchiveService
.
view
(
taskId
);
...
...
@@ -161,6 +187,13 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
});
}
document
.
addContent
(
table
);
// 最后结尾签字
PdfPTable
signTable
=
new
PdfPTable
(
new
float
[]{
40
,
15
});
signTable
.
setWidthPercentage
(
100
);
signTable
.
setSpacingBefore
(
40
);
document
.
writeNoBorderCell
(
"车企负责人签字:"
,
Element
.
ALIGN_RIGHT
,
1
,
1
,
signTable
);
document
.
writeBottomCell
(
""
,
Element
.
ALIGN_RIGHT
,
1
,
1
,
signTable
);
document
.
addContent
(
signTable
);
// 关闭
document
.
close
();
...
...
@@ -206,8 +239,20 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
* 渲染数据
* @param fields
*/
private
void
renderData
(
AcroFields
fields
)
{
private
void
renderData
(
AcroFields
fields
,
InspectionReportPdfVO
inspectionReportPdfVO
)
throws
Exception
{
// 取出当前对象所有属性,并赋值到模板里
Class
<?
extends
InspectionReportPdfVO
>
aClass
=
inspectionReportPdfVO
.
getClass
();
Field
[]
declaredFields
=
aClass
.
getDeclaredFields
();
for
(
Field
field
:
declaredFields
)
{
String
name
=
field
.
getName
();
String
key
=
name
.
replaceAll
(
"([a-z])([A-Z])"
,
"$1_$2"
).
toLowerCase
();
field
.
setAccessible
(
true
);
Object
o
=
field
.
get
(
inspectionReportPdfVO
);
if
(
o
!=
null
)
{
String
value
=
o
.
toString
();
fields
.
setField
(
key
,
value
);
}
}
}
...
...
quality-review/src/main/java/com/ruoyi/web/request/TaskListRequest.java
View file @
87d109eb
package
com
.
ruoyi
.
web
.
request
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -12,6 +13,7 @@ import java.util.Date;
public
class
TaskListRequest
extends
PageDomain
{
@ApiModelProperty
(
"任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskBeginTime
;
@ApiModelProperty
(
"任务状态"
)
...
...
quality-review/src/main/java/com/ruoyi/web/response/ReviewSceneChangeTaskResponse.java
View file @
87d109eb
package
com
.
ruoyi
.
web
.
response
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -131,12 +132,14 @@ public class ReviewSceneChangeTaskResponse {
* 任务开始时间
*/
@ApiModelProperty
(
"任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskBeginTime
;
/**
* 任务结束时间
*/
@ApiModelProperty
(
"任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskEndTime
;
/**
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskFindResponse.java
View file @
87d109eb
...
...
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
...
...
@@ -46,9 +47,11 @@ public class TaskFindResponse {
private
String
runStatus
;
@ApiModelProperty
(
"总任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskBeginTime
;
@ApiModelProperty
(
"任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskEndTime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
...
...
@@ -65,9 +68,11 @@ public class TaskFindResponse {
private
Double
systemReview
;
@ApiModelProperty
(
"体系问卷任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
systemTaskBeginTime
;
@ApiModelProperty
(
"体系问卷任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
systemTaskEndTime
;
@ApiModelProperty
(
"车型审查任务状态"
)
...
...
@@ -77,9 +82,11 @@ public class TaskFindResponse {
private
Double
carReview
;
@ApiModelProperty
(
"车辆问卷任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
carTaskBeginTime
;
@ApiModelProperty
(
"车辆问卷任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
carTaskEndTime
;
@ApiModelProperty
(
"测试任务状态"
)
...
...
quality-review/src/main/java/com/ruoyi/web/response/TaskGetInfoResponse.java
View file @
87d109eb
...
...
@@ -78,9 +78,11 @@ public class TaskGetInfoResponse {
private
String
taskInitiatorDept
;
@ApiModelProperty
(
"任务开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskBeginTime
;
@ApiModelProperty
(
"任务结束时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
taskEndTime
;
...
...
@@ -94,6 +96,7 @@ public class TaskGetInfoResponse {
@ApiModelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
)
private
Date
createTime
;
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
87d109eb
...
...
@@ -156,6 +156,7 @@
)
</if>
</where>
order by t.task_begin_time desc
</select>
<select
id=
"findByCarReviewTaskId"
resultType=
"java.lang.Long"
>
SELECT id
...
...
@@ -246,6 +247,7 @@
)
</if>
</where>
order by t.task_begin_time desc
</select>
<select
id=
"getByUserIdTemporary"
resultType=
"com.ruoyi.domain.Task"
>
SELECT id, system_review_task_id, car_review_task_id,
...
...
quality-review/src/main/resources/template/receipt_template_02_27.pdf
View file @
87d109eb
No preview for this file type
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