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
7dacd2b3
Commit
7dacd2b3
authored
Dec 16, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):压力管道打印安装告知书调整
parent
31a4333a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+21
-5
installation-notification-report.ftl
.../resources/templates/installation-notification-report.ftl
+0
-0
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 @
7dacd2b3
...
@@ -612,6 +612,15 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -612,6 +612,15 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
List
<
JgInstallationNoticeEq
>
equList
=
jgInstallationNoticeEqService
.
lambdaQuery
().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
jgInstallationNotice
.
getSequenceNbr
()).
list
();
List
<
JgInstallationNoticeEq
>
equList
=
jgInstallationNoticeEqService
.
lambdaQuery
().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
jgInstallationNotice
.
getSequenceNbr
()).
list
();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
ArrayList
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
// 管道按照装置打一份告知书
if
(
"8000"
.
equals
(
jgInstallationNotice
.
getEquListCode
())
&&
!
equList
.
isEmpty
())
{
List
<
Map
<
String
,
Object
>>
informationList
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
equList
.
get
(
0
).
getSequenceNbr
());
if
(
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"安装告知单不存在"
);
}
Map
<
String
,
Object
>
placeholders
=
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
().
substring
(
0
,
2
));
maps
.
add
(
placeholders
);
}
else
{
equList
.
forEach
(
equ
->
{
equList
.
forEach
(
equ
->
{
List
<
Map
<
String
,
Object
>>
informationList
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
equ
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
informationList
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
equ
.
getSequenceNbr
());
if
(
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
CollectionUtils
.
isEmpty
(
informationList
))
{
...
@@ -620,6 +629,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -620,6 +629,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
Map
<
String
,
Object
>
placeholders
=
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
().
substring
(
0
,
2
));
Map
<
String
,
Object
>
placeholders
=
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
().
substring
(
0
,
2
));
maps
.
add
(
placeholders
);
maps
.
add
(
placeholders
);
});
});
}
String
tempFileName
=
"安装告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
String
tempFileName
=
"安装告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
// String url = WordTemplateUtils.templateToPdf(tempFileName, "installation-notification-report.ftl", placeholders);
// String url = WordTemplateUtils.templateToPdf(tempFileName, "installation-notification-report.ftl", placeholders);
...
@@ -633,7 +644,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -633,7 +644,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
public
Map
<
String
,
Object
>
fullFillTemplateObj
(
List
<
Map
<
String
,
Object
>>
informationList
,
String
businessType
)
{
public
Map
<
String
,
Object
>
fullFillTemplateObj
(
List
<
Map
<
String
,
Object
>>
informationList
,
String
businessType
)
{
Map
<
String
,
Object
>
informObj
=
informationList
.
get
(
0
);
Map
<
String
,
Object
>
informObj
=
informationList
.
get
(
0
);
String
sequenceNbr
=
String
.
valueOf
(
informObj
.
get
(
"sequenceNbr"
));
String
useCode
=
String
.
valueOf
(
informObj
.
get
(
"installUnitCreditCode"
));
String
useCode
=
String
.
valueOf
(
informObj
.
get
(
"installUnitCreditCode"
));
LambdaQueryWrapper
<
TzBaseUnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TzBaseUnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
TzBaseUnitLicence:
:
getUnitCode
,
useCode
);
wrapper
.
eq
(
TzBaseUnitLicence:
:
getUnitCode
,
useCode
);
...
@@ -672,9 +683,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -672,9 +683,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"equList"
,
getValue
.
apply
(
"equList"
));
placeholders
.
put
(
"equList"
,
getValue
.
apply
(
"equList"
));
placeholders
.
put
(
"installUnitName"
,
getValue
.
apply
(
"installUnitName"
));
placeholders
.
put
(
"installUnitName"
,
getValue
.
apply
(
"installUnitName"
));
placeholders
.
put
(
"informNumber"
,
getValue
.
apply
(
"informNumber"
));
placeholders
.
put
(
"informNumber"
,
getValue
.
apply
(
"informNumber"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"factoryNum"
));
// 出厂编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"installUnitAddress"
));
// 施工单位地址
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"installUnitAddress"
));
// 施工单位地址
...
@@ -688,11 +697,18 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -688,11 +697,18 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitLeaderAddress"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitLeaderAddress"
));
if
(
"压力管道"
.
equals
(
getValue
.
apply
(
"equList"
)))
{
if
(
"压力管道"
.
equals
(
getValue
.
apply
(
"equList"
)))
{
ArrayList
<
String
>
equipTypeList
=
new
ArrayList
<>();
// todo
JgRegistrationHistory
history
=
jgRegistrationHistoryMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgRegistrationHistory
>().
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
));
equipTypeList
.
add
(
"123123"
);
JSONObject
historyJson
=
JSON
.
parseObject
(
history
.
getChangeData
());
List
<
Map
<
String
,
Object
>>
deviceList
=
(
List
<
Map
<
String
,
Object
>>)
historyJson
.
get
(
"deviceList"
);
List
<
Object
>
equipTypeList
=
deviceList
.
stream
().
limit
(
3
).
map
(
item
->
item
.
get
(
"pipelineNumber"
)
+
"("
+
item
.
get
(
"nominalDiameter"
)
+
"/"
+
item
.
get
(
"wallThickness"
)
+
"/"
+
item
.
get
(
"pipeLength"
)
+
")"
).
collect
(
Collectors
.
toList
());
List
<
Object
>
factoryNumList
=
deviceList
.
stream
().
limit
(
3
).
map
(
item
->
item
.
get
(
"pipelineNumber"
)).
collect
(
Collectors
.
toList
());
placeholders
.
put
(
"equipTypeList"
,
equipTypeList
);
placeholders
.
put
(
"equipTypeList"
,
equipTypeList
);
placeholders
.
put
(
"produceCodeList"
,
factoryNumList
);
placeholders
.
put
(
"productName"
,
historyJson
.
get
(
"projectContraption"
));
}
else
{
}
else
{
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"factoryNum"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/installation-notification-report.ftl
View file @
7dacd2b3
This diff is collapsed.
Click to expand it.
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