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
b946fe51
Commit
b946fe51
authored
Jan 15, 2025
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
压力管道-公用、长输管道告知页面调整
parent
217f8e8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+14
-15
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/JgInstallationNoticeServiceImpl.java
View file @
b946fe51
...
...
@@ -665,12 +665,17 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// jgInstallationNotice.setNoticeReportUrl(url);
// this.updateById(jgInstallationNotice);
map
.
put
(
"equipBasicInfoList"
,
maps
);
// WordTemplateUtils.templateToPdfDownload(tempFileName, "installation-notification-report.ftl", map, response);
byte
[]
templateToPdfData
=
WordTemplateUtils
.
getTemplateToPdfData
(
tempFileName
,
"installation-notification-report.ftl"
,
map
);
//获取管道和气瓶的基本信息汇总表
List
<
CompletableFuture
<
byte
[]>>
exportSummaryBasicInfoData
=
jgUseRegistrationService
.
getExportSummaryBasicInfoData
(
Collections
.
singletonList
(
Long
.
valueOf
(
sequenceNbr
)),
jgInstallationNotice
.
getEquCategoryCode
(),
"安装告知"
);
//将安装告知单和汇总表压缩到zip中
toZipFileByData
(
response
,
exportSummaryBasicInfoData
,
templateToPdfData
,
jgInstallationNotice
.
getApplyNo
(),
jgInstallationNotice
.
getEquCategoryCode
());
//将安装告知单和汇总表压缩到zip中 如果是压力/长输/公用管道的情况需要压缩包
String
category
=
jgInstallationNotice
.
getEquCategoryCode
();
if
(
"8300"
.
equals
(
category
)
||
"8200"
.
equals
(
category
)
||
"8100"
.
equals
(
category
))
{
//获取
byte
[]
templateToPdfData
=
WordTemplateUtils
.
getTemplateToPdfData
(
tempFileName
,
"installation-notification-report.ftl"
,
map
);
//获取管道和气瓶的基本信息汇总表
List
<
CompletableFuture
<
byte
[]>>
exportSummaryBasicInfoData
=
jgUseRegistrationService
.
getExportSummaryBasicInfoData
(
Collections
.
singletonList
(
Long
.
valueOf
(
sequenceNbr
)),
jgInstallationNotice
.
getEquCategoryCode
(),
"安装告知"
);
toZipFileByData
(
response
,
exportSummaryBasicInfoData
,
templateToPdfData
,
jgInstallationNotice
.
getApplyNo
());
}
else
{
WordTemplateUtils
.
templateToPdfDownload
(
tempFileName
,
"installation-notification-report.ftl"
,
map
,
response
);
}
}
/**
...
...
@@ -679,16 +684,10 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @param exportSummaryBasicInfoData
* @param templateToPdfData
* @param applyNo
* @param category
*/
private
void
toZipFileByData
(
HttpServletResponse
response
,
List
<
CompletableFuture
<
byte
[]>>
exportSummaryBasicInfoData
,
byte
[]
templateToPdfData
,
String
applyNo
,
String
category
)
{
String
filePrefix
=
"汇总表"
;
String
customFileName
=
"设备基本信息汇总表"
;
if
(
"8300"
.
equals
(
category
)
||
"8200"
.
equals
(
category
)
||
"8100"
.
equals
(
category
))
{
// 文件名前缀
filePrefix
=
"压力管道基本信息汇总表_"
;
customFileName
=
"压力管道告知单_设备基本信息汇总表_"
+
applyNo
+
".zip"
;
}
private
void
toZipFileByData
(
HttpServletResponse
response
,
List
<
CompletableFuture
<
byte
[]>>
exportSummaryBasicInfoData
,
byte
[]
templateToPdfData
,
String
applyNo
)
{
String
filePrefix
=
"压力管道基本信息汇总表_"
;
String
customFileName
=
"压力管道告知单_设备基本信息汇总表_"
+
applyNo
+
".zip"
;
// 打包zip
try
(
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ZipOutputStream
zip
=
new
ZipOutputStream
(
outputStream
))
{
...
...
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