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
94799c8b
Commit
94799c8b
authored
Dec 26, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
6fbcfbe4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
JgTransferNoticeController.java
.../module/jg/biz/controller/JgTransferNoticeController.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+20
-14
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/controller/JgTransferNoticeController.java
View file @
94799c8b
...
...
@@ -165,7 +165,7 @@ public class JgTransferNoticeController extends BaseController {
public
void
generateCertificateReport
(
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
// 组装模板变量
map
.
put
(
"useRegistrationCode"
,
"2023
110
56"
);
// 编号
map
.
put
(
"useRegistrationCode"
,
"2023
012564
56"
);
// 编号
map
.
put
(
"useUnitName"
,
"西安市高科物业服务有限公司"
);
// 使用单位名称
map
.
put
(
"fullAddress"
,
"西安市曲江新区春临东街南湖意境1单元2号楼"
);
// 设备使用地点
map
.
put
(
"equList"
,
"电梯"
);
// 设备种类
...
...
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 @
94799c8b
...
...
@@ -289,21 +289,21 @@ public class CommonServiceImpl implements ICommonService {
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
// 组装模板变量
map
.
put
(
"useRegistrationCode"
,
map
.
getOrDefault
(
"useRegistrationCode"
,
""
).
toString
());
// 编号
map
.
put
(
"useUnitName"
,
map
.
getOrDefault
(
"useUnitName"
,
""
).
toString
());
// 使用单位名称
map
.
put
(
"fullAddress"
,
map
.
getOrDefault
(
"fullAddress"
,
""
).
toString
());
// 设备使用地点
map
.
put
(
"equList"
,
map
.
getOrDefault
(
"equList"
,
""
).
toString
());
// 设备种类
map
.
put
(
"equipDefine"
,
map
.
getOrDefault
(
"equipDefine"
,
""
).
toString
());
// 设备品种
map
.
put
(
"equipCode"
,
map
.
getOrDefault
(
"equipCode"
,
""
).
toString
());
// 设备代码
map
.
put
(
"equipCategory"
,
map
.
getOrDefault
(
"equipCategory"
,
""
).
toString
());
// 设备类别
map
.
put
(
"useInnerCode"
,
map
.
getOrDefault
(
"useInnerCode"
,
""
).
toString
());
// 单位内编号
map
.
put
(
"factoryNum"
,
map
.
getOrDefault
(
"factoryNum"
,
""
).
toString
());
// 产品编号
map
.
put
(
"receiveOrgName"
,
map
.
getOrDefault
(
"receiveOrgName"
,
""
).
toString
());
// 登记机关
map
.
put
(
"giveOutYear"
,
map
.
getOrDefault
(
"giveOutYear"
,
""
).
toString
());
// 发证日期-年
map
.
put
(
"giveOutMonth"
,
map
.
getOrDefault
(
"giveOutMonth"
,
""
).
toString
());
// 发证日期-月
map
.
put
(
"giveOutDay"
,
map
.
getOrDefault
(
"giveOutDay"
,
""
).
toString
());
// 发证日期-日
map
.
put
(
"useRegistrationCode"
,
Optional
.
ofNullable
(
map
.
get
(
"useRegistrationCode"
)).
orElse
(
""
).
toString
());
// 编号
map
.
put
(
"useUnitName"
,
Optional
.
ofNullable
(
map
.
get
(
"useUnitName"
)).
orElse
(
""
).
toString
());
// 使用单位名称
map
.
put
(
"fullAddress"
,
Optional
.
ofNullable
(
map
.
get
(
"fullAddress"
)).
orElse
(
""
).
toString
());
// 设备使用地点
map
.
put
(
"equList"
,
Optional
.
ofNullable
(
map
.
get
(
"equList"
)).
orElse
(
""
).
toString
());
// 设备种类
map
.
put
(
"equipDefine"
,
Optional
.
ofNullable
(
map
.
get
(
"equipDefine"
)).
orElse
(
""
).
toString
());
// 设备品种
map
.
put
(
"equipCode"
,
Optional
.
ofNullable
(
map
.
get
(
"equipCode"
)).
orElse
(
""
).
toString
());
// 设备代码
map
.
put
(
"equipCategory"
,
Optional
.
ofNullable
(
map
.
get
(
"equipCategory"
)).
orElse
(
""
).
toString
());
// 设备类别
map
.
put
(
"useInnerCode"
,
Optional
.
ofNullable
(
map
.
get
(
"useInnerCode"
)).
orElse
(
""
).
toString
());
// 单位内编号
map
.
put
(
"factoryNum"
,
Optional
.
ofNullable
(
map
.
get
(
"factoryNum"
)).
orElse
(
""
).
toString
());
// 产品编号
map
.
put
(
"receiveOrgName"
,
Optional
.
ofNullable
(
map
.
get
(
"receiveOrgName"
)).
orElse
(
""
).
toString
());
// 登记机关
map
.
put
(
"giveOutYear"
,
Optional
.
ofNullable
(
map
.
get
(
"giveOutYear"
)).
orElse
(
""
).
toString
());
// 发证日期-年
map
.
put
(
"giveOutMonth"
,
Optional
.
ofNullable
(
map
.
get
(
"giveOutMonth"
)).
orElse
(
""
).
toString
());
// 发证日期-月
map
.
put
(
"giveOutDay"
,
Optional
.
ofNullable
(
map
.
get
(
"giveOutDay"
)).
orElse
(
""
).
toString
());
// 发证日期-日
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
map
.
getOrDefault
(
"supervisoryCode"
,
""
).
toString
(),
70
,
65
);
String
qrCode
=
ImageUtils
.
generateQRCode
(
Optional
.
ofNullable
(
map
.
get
(
"supervisoryCode"
)).
orElse
(
""
).
toString
(),
70
,
65
);
map
.
put
(
"supervisoryCode"
,
qrCode
);
// 监管二维码
// word转pdf
...
...
@@ -330,6 +330,12 @@ public class CommonServiceImpl implements ICommonService {
FileExporter
.
exportFile
(
FileExporter
.
FileType
.
valueOf
(
"pdf"
),
docTitle
,
bytes
,
response
);
}
catch
(
Exception
e
)
{
log
.
error
(
"pdf文件转换失败:{}"
,
e
);
}
finally
{
try
{
Files
.
deleteIfExists
(
pdfFile
.
toPath
());
}
catch
(
Exception
e
)
{
log
.
error
(
"文件找不到,删除失败:{}"
,
e
);
}
}
}
...
...
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