Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
650b88ba
Commit
650b88ba
authored
Apr 09, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(JG):标志套打模版修改
parent
fceb8160
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+9
-7
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
650b88ba
...
...
@@ -789,17 +789,19 @@ public class CommonServiceImpl implements ICommonService {
String
qrCode
=
ImageUtils
.
generateQRCode
((
String
)
map
.
getOrDefault
(
"applyNo"
,
""
),
100
,
100
);
map
.
put
(
"supervisoryCode"
,
qrCode
);
// 监管二维码 代码优化
this
.
fillParamValueToPdf
(
map
,
response
,
"templates/use-registration-model.pdf"
,
"套打使用登记证.pdf"
);
this
.
fillParamValueToPdf
(
map
,
response
,
"templates/use-registration-model.pdf"
,
"套打使用登记证.pdf"
,
12.0f
);
}
/**
* 根据参数填充PDF文本域
* @param map 参数
* @param response response
* @param pathResource PDF模版路径
*
* @param map 参数
* @param response response
* @param pathResource PDF模版路径
* @param printFileName 生成文件名称
* @param v
*/
private
void
fillParamValueToPdf
(
Map
<
String
,
Object
>
map
,
HttpServletResponse
response
,
String
pathResource
,
String
printFileNam
e
)
{
private
void
fillParamValueToPdf
(
Map
<
String
,
Object
>
map
,
HttpServletResponse
response
,
String
pathResource
,
String
printFileName
,
float
textSiz
e
)
{
// 读取资源文件夹下的模板
ClassPathResource
resource
=
new
ClassPathResource
(
pathResource
);
...
...
@@ -818,7 +820,7 @@ public class CommonServiceImpl implements ICommonService {
// 设置文本域的字体为中文字体
acroFields
.
setFieldProperty
(
param
.
getKey
(),
"textfont"
,
font
,
null
);
// 设置字体大小
acroFields
.
setFieldProperty
(
param
.
getKey
(),
"textsize"
,
12.0f
,
null
);
acroFields
.
setFieldProperty
(
param
.
getKey
(),
"textsize"
,
textSize
,
null
);
// 将 map 中的值写到 pdf 模板对应的文本域中
acroFields
.
setField
(
param
.
getKey
(),
param
.
getValue
()
+
""
);
}
...
...
@@ -1671,7 +1673,7 @@ public class CommonServiceImpl implements ICommonService {
String
qrCode
=
ImageUtils
.
generateQRCode
(
Optional
.
ofNullable
(
useFlagParamDto
.
getApplyNo
()).
orElse
(
""
),
180
,
180
);
paramMap
.
put
(
"supervisoryCode"
,
qrCode
);
this
.
fillParamValueToPdf
(
paramMap
,
response
,
selectPdfTemplate
(
useFlagParamDto
.
getEquListCode
()),
printFileName
);
this
.
fillParamValueToPdf
(
paramMap
,
response
,
selectPdfTemplate
(
useFlagParamDto
.
getEquListCode
()),
printFileName
,
9.0f
);
}
@Override
...
...
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