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
bcf58524
Commit
bcf58524
authored
Mar 13, 2024
by
盖献康
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaixiankang' into 'dev'
去除不必要的引用 See merge request
!175
parents
90ea0cd9
6791a9bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
40 deletions
+39
-40
PdfTemplateManagementService.java
.../java/com/ruoyi/service/PdfTemplateManagementService.java
+0
-2
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+39
-38
No files found.
quality-review/src/main/java/com/ruoyi/service/PdfTemplateManagementService.java
View file @
bcf58524
package
com
.
ruoyi
.
service
;
import
javax.servlet.http.HttpServletResponse
;
/**
* PDF模板管理Service接口
* @author gxk
...
...
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
View file @
bcf58524
...
...
@@ -17,11 +17,9 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.lang.reflect.Field
;
import
java.util.*
;
import
java.util.List
;
...
...
@@ -62,8 +60,7 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
ByteArrayOutputStream
bos
=
null
;
try
{
// 模板绝对路径--服务器
// String fileName = "/template/receipt_template_02_27.pdf";
String
fileName
=
"E:/文件/PDF模板/receipt_template_02_27.pdf"
;
String
fileName
=
"/template/receipt_template_02_27.pdf"
;
// 读取现有模板内容
reader
=
new
PdfReader
(
fileName
);
// 创建输出流
...
...
@@ -102,40 +99,6 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
return
uploadMinio
(
bos
,
"检验报告_"
+
taskId
);
}
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
...
...
@@ -232,6 +195,44 @@ public class PdfTemplateManagementServiceImpl implements PdfTemplateManagementSe
return
StringUtils
.
format
(
"{}/{}.pdf"
,
DateUtils
.
datePath
(),
name
);
}
/**
* 模拟数据
* @return
*/
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
;
}
/**
* 渲染数据
* @param fields
...
...
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