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
6ba82e0f
Commit
6ba82e0f
authored
Apr 08, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug - 71024
parent
f7bd4985
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
InspectionReportPdfVO.java
.../main/java/com/ruoyi/domain/vo/InspectionReportPdfVO.java
+18
-0
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+5
-1
TaskMapper.xml
quality-review/src/main/resources/mapper/TaskMapper.xml
+7
-4
receipt_template_04_02.pdf
...ew/src/main/resources/template/receipt_template_04_02.pdf
+0
-0
No files found.
quality-review/src/main/java/com/ruoyi/domain/vo/InspectionReportPdfVO.java
View file @
6ba82e0f
package
com
.
ruoyi
.
domain
.
vo
;
package
com
.
ruoyi
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
/**
/**
* 检验报告PDF VO类
* 检验报告PDF VO类
...
@@ -170,4 +174,18 @@ public class InspectionReportPdfVO {
...
@@ -170,4 +174,18 @@ public class InspectionReportPdfVO {
*/
*/
private
String
samplePhotos
;
private
String
samplePhotos
;
/**
* 任务开始时间
*/
private
String
taskBeginTime
;
/**
* 任务结束时间
*/
private
String
taskEndTime
;
/**
* 检验时间和地点
*/
private
String
inspectionTimeAndLocation
;
}
}
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
6ba82e0f
...
@@ -86,7 +86,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -86,7 +86,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
// 设置具体字体格式的编码, 不设置的话中文可能不会显示
// 设置具体字体格式的编码, 不设置的话中文可能不会显示
BaseFont
bf
=
BaseFont
.
createFont
(
"/fonts/STSong.TTF"
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
NOT_EMBEDDED
);
BaseFont
bf
=
BaseFont
.
createFont
(
"/fonts/STSong.TTF"
,
BaseFont
.
IDENTITY_H
,
BaseFont
.
NOT_EMBEDDED
);
fields
.
addSubstitutionFont
(
bf
);
fields
.
addSubstitutionFont
(
bf
);
//
测试
数据
//
获取真实的
数据
InspectionReportPdfVO
inspectionReportPdfVO
=
requireData
(
taskId
);
InspectionReportPdfVO
inspectionReportPdfVO
=
requireData
(
taskId
);
// 渲染数据
// 渲染数据
renderData
(
fields
,
inspectionReportPdfVO
,
ps
);
renderData
(
fields
,
inspectionReportPdfVO
,
ps
);
...
@@ -353,6 +353,10 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
...
@@ -353,6 +353,10 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
*/
*/
private
InspectionReportPdfVO
requireData
(
Long
taskId
)
{
private
InspectionReportPdfVO
requireData
(
Long
taskId
)
{
InspectionReportPdfVO
inspectionReport
=
taskMapper
.
selectInspectionReportData
(
taskId
);
InspectionReportPdfVO
inspectionReport
=
taskMapper
.
selectInspectionReportData
(
taskId
);
inspectionReport
.
setInspectionTimeAndLocation
(
" 检验于"
+
inspectionReport
.
getTaskBeginTime
()
+
"至"
+
inspectionReport
.
getTaskEndTime
()
+
"在"
+
inspectionReport
.
getInspectionCenterName
()
+
"进行"
);
inspectionReport
.
setInspectionItem
(
getInspectionItemByTaskItem
(
inspectionReport
.
getInspectionItem
()));
inspectionReport
.
setInspectionItem
(
getInspectionItemByTaskItem
(
inspectionReport
.
getInspectionItem
()));
return
inspectionReport
;
return
inspectionReport
;
}
}
...
...
quality-review/src/main/resources/mapper/TaskMapper.xml
View file @
6ba82e0f
...
@@ -307,11 +307,13 @@
...
@@ -307,11 +307,13 @@
t.entrusted_unit_address AS clientAddress,
t.entrusted_unit_address AS clientAddress,
t.entrusted_unit_phone AS entrustedUnitTelephone,
t.entrusted_unit_phone AS entrustedUnitTelephone,
t.entrusted_unit_code AS clientPostalCode,
t.entrusted_unit_code AS clientPostalCode,
GROUP_CONCAT(
distinct
s.sample_name) AS sampleName,
GROUP_CONCAT(s.sample_name) AS sampleName,
t.product_model AS typeSpecification,
t.product_model AS typeSpecification,
DATE_FORMAT(t.task_begin_time, '%Y年%m月%d日') AS taskBeginTime,
DATE_FORMAT(t.task_end_time, '%Y年%m月%d日') AS taskEndTime,
concat(st.standard_no, ' ', st.name) AS inspectionBasis,
concat(st.standard_no, ' ', st.name) AS inspectionBasis,
GROUP_CONCAT(distinct ae.enterprise_name) AS productionEnterprise,
GROUP_CONCAT(distinct ae.enterprise_name) AS productionEnterprise,
GROUP_CONCAT(
distinct
s.sample_sender) AS sampleSender,
GROUP_CONCAT(s.sample_sender) AS sampleSender,
GROUP_CONCAT(distinct DATE_FORMAT(s.delivery_date, '%Y-%m-%d')) AS sampleDeliveryDate,
GROUP_CONCAT(distinct DATE_FORMAT(s.delivery_date, '%Y-%m-%d')) AS sampleDeliveryDate,
count(s.id) AS sampleQuantity,
count(s.id) AS sampleQuantity,
CONVERT(sum(s.number_of_samples), UNSIGNED) AS sampleSum,
CONVERT(sum(s.number_of_samples), UNSIGNED) AS sampleSum,
...
@@ -323,10 +325,11 @@
...
@@ -323,10 +325,11 @@
t.task_list AS inspectionItem,
t.task_list AS inspectionItem,
DATE_FORMAT(t.create_time, '%Y-%m-%d') AS productionDate,
DATE_FORMAT(t.create_time, '%Y-%m-%d') AS productionDate,
GROUP_CONCAT(distinct s.trademark) AS brandImage,
GROUP_CONCAT(distinct s.trademark) AS brandImage,
GROUP_CONCAT(
distinct
s.sample_photos) AS samplePhotos,
GROUP_CONCAT(s.sample_photos) AS samplePhotos,
d.address AS inspectionCenterAddress,
d.address AS inspectionCenterAddress,
d.phone AS inspectionCenterTelephone,
d.phone AS inspectionCenterTelephone,
d.postcode AS inspectionCenterPostcode
d.postcode AS inspectionCenterPostcode,
d.dept_name AS inspectionCenterName
from
from
t_task t
t_task t
left join t_task_sample_relation tsr on t.id = tsr.task_id
left join t_task_sample_relation tsr on t.id = tsr.task_id
...
...
quality-review/src/main/resources/template/receipt_template_04_02.pdf
View file @
6ba82e0f
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