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
5b80436b
Commit
5b80436b
authored
Jul 29, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):工业管道汇总表打印
parent
1df839d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
27 deletions
+28
-27
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+28
-27
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/JgUseRegistrationServiceImpl.java
View file @
5b80436b
...
@@ -2024,36 +2024,37 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2024,36 +2024,37 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
* @return
* @return
*/
*/
private
List
<
CompletableFuture
<
byte
[]>>
pressurePipeDataPreparation
(
int
page
,
JSONObject
jsonObject
,
int
size
,
double
total
,
JSONArray
equipmentLists
,
String
wordPath
,
String
filePrefix
,
AgencyUserModel
result
)
{
private
List
<
CompletableFuture
<
byte
[]>>
pressurePipeDataPreparation
(
int
page
,
JSONObject
jsonObject
,
int
size
,
double
total
,
JSONArray
equipmentLists
,
String
wordPath
,
String
filePrefix
,
AgencyUserModel
result
)
{
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
exportParamsMap
.
put
(
"page"
,
page
);
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
formattedDate
=
currentDate
.
format
(
formatter
);
exportParamsMap
.
put
(
"printDate"
,
formattedDate
);
// 使用单位
exportParamsMap
.
put
(
"useUnitName"
,
jsonObject
.
get
(
"useUnitName"
));
// 使用单位地址
String
useUnitCreditCode
=
String
.
valueOf
(
jsonObject
.
get
(
"useUnitCreditCode"
));
CompanyModel
companyModel
=
Privilege
.
companyClient
.
queryByCompanyCode
(
useUnitCreditCode
).
getResult
();
exportParamsMap
.
put
(
"fullAddress"
,
companyModel
.
getAddress
());
// 工程(装置)名称 取第一个设备的技术参数”工程装置名称“
JSONObject
eqJSON
=
(
JSONObject
)
equipmentLists
.
get
(
0
);
String
eqId
=
!
ValidationUtil
.
isEmpty
(
eqJSON
)
?
String
.
valueOf
(
eqJSON
.
get
(
"record"
))
:
""
;
IdxBizJgUseInfo
idxBizJgUseInfo
=
useInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
eqId
));
exportParamsMap
.
put
(
"nameOfProjectDevice"
,
ValidationUtil
.
isEmpty
(
idxBizJgUseInfo
)
?
""
:
idxBizJgUseInfo
.
getProjectContraption
());
// 安全管理部门
exportParamsMap
.
put
(
"orgBranchName"
,
String
.
valueOf
(
jsonObject
.
get
(
"orgBranchCode"
)).
split
(
"_"
)[
1
]);
// 安全管理员
exportParamsMap
.
put
(
"safetyManager"
,
String
.
valueOf
(
jsonObject
.
get
(
"safetyManager"
)).
split
(
"_"
)[
1
]);
// 联系电话
exportParamsMap
.
put
(
"phone"
,
ValidationUtil
.
isEmpty
(
result
.
getMobile
())
?
""
:
result
.
getMobile
());
// 经办人
exportParamsMap
.
put
(
"agent"
,
ValidationUtil
.
isEmpty
(
result
.
getRealName
())
?
""
:
result
.
getRealName
());
// 电子邮箱
exportParamsMap
.
put
(
"email"
,
ValidationUtil
.
isEmpty
(
result
.
getEmail
())
?
""
:
result
.
getEmail
());
List
<
CompletableFuture
<
byte
[]>>
futures
=
IntStream
.
rangeClosed
(
1
,
page
)
List
<
CompletableFuture
<
byte
[]>>
futures
=
IntStream
.
rangeClosed
(
1
,
page
)
.
mapToObj
(
current
->
CompletableFuture
.
supplyAsync
(()
->
{
.
mapToObj
(
current
->
CompletableFuture
.
supplyAsync
(()
->
{
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
exportParamsMap
.
put
(
"current"
,
current
);
exportParamsMap
.
put
(
"current"
,
current
);
exportParamsMap
.
put
(
"page"
,
page
);
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
formattedDate
=
currentDate
.
format
(
formatter
);
exportParamsMap
.
put
(
"printDate"
,
formattedDate
);
// 使用单位
exportParamsMap
.
put
(
"useUnitName"
,
jsonObject
.
get
(
"useUnitName"
));
// 使用单位地址
String
useUnitCreditCode
=
String
.
valueOf
(
jsonObject
.
get
(
"useUnitCreditCode"
));
CompanyModel
companyModel
=
Privilege
.
companyClient
.
queryByCompanyCode
(
useUnitCreditCode
).
getResult
();
exportParamsMap
.
put
(
"fullAddress"
,
companyModel
.
getAddress
());
// 工程(装置)名称 取第一个设备的技术参数”工程装置名称“
JSONObject
eqJSON
=
(
JSONObject
)
equipmentLists
.
get
(
0
);
String
eqId
=
!
ValidationUtil
.
isEmpty
(
eqJSON
)
?
String
.
valueOf
(
eqJSON
.
get
(
"record"
))
:
""
;
IdxBizJgUseInfo
idxBizJgUseInfo
=
useInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
eqId
));
exportParamsMap
.
put
(
"nameOfProjectDevice"
,
ValidationUtil
.
isEmpty
(
idxBizJgUseInfo
)
?
""
:
idxBizJgUseInfo
.
getProjectContraption
());
// 安全管理部门
exportParamsMap
.
put
(
"orgBranchName"
,
String
.
valueOf
(
jsonObject
.
get
(
"orgBranchCode"
)).
split
(
"_"
)[
1
]);
// 安全管理员
exportParamsMap
.
put
(
"safetyManager"
,
String
.
valueOf
(
jsonObject
.
get
(
"safetyManager"
)).
split
(
"_"
)[
1
]);
// 联系电话
exportParamsMap
.
put
(
"phone"
,
ValidationUtil
.
isEmpty
(
result
.
getMobile
())
?
""
:
result
.
getMobile
());
// 经办人
exportParamsMap
.
put
(
"agent"
,
ValidationUtil
.
isEmpty
(
result
.
getRealName
())
?
""
:
result
.
getRealName
());
// 电子邮箱
exportParamsMap
.
put
(
"email"
,
ValidationUtil
.
isEmpty
(
result
.
getEmail
())
?
""
:
result
.
getEmail
());
// 数据分页
// 数据分页
int
start
=
(
current
-
1
)
*
size
;
int
start
=
(
current
-
1
)
*
size
;
int
end
=
((
current
-
1
)
*
size
+
size
)
<
total
?
(
current
-
1
)
*
size
+
size
:
(
int
)
total
;
int
end
=
((
current
-
1
)
*
size
+
size
)
<
total
?
(
current
-
1
)
*
size
+
size
:
(
int
)
total
;
...
...
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