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
e2d1b774
Commit
e2d1b774
authored
Aug 13, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):【现场问题】压力管道-工业管道,单位变更后,监管单位通过登记证管理无法打印汇总表
parent
01678ca0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
35 deletions
+101
-35
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+22
-17
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+2
-2
JgUseRegistrationManageServiceImpl.java
.../biz/service/impl/JgUseRegistrationManageServiceImpl.java
+75
-14
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+2
-2
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/DataDockServiceImpl.java
View file @
e2d1b774
...
@@ -33,10 +33,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
...
@@ -33,10 +33,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CertificateStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CertificateStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
...
@@ -160,6 +157,8 @@ public class DataDockServiceImpl {
...
@@ -160,6 +157,8 @@ public class DataDockServiceImpl {
@Autowired
@Autowired
private
EventPublisher
eventPublisher
;
private
EventPublisher
eventPublisher
;
@Autowired
private
JgUseRegistrationManageMapper
jgUseRegistrationManageMapper
;
/**
/**
* 西安数据对接-保存设备信息
* 西安数据对接-保存设备信息
...
@@ -1872,19 +1871,25 @@ public class DataDockServiceImpl {
...
@@ -1872,19 +1871,25 @@ public class DataDockServiceImpl {
// 1. 判断是否使用未来系统生成编号
// 1. 判断是否使用未来系统生成编号
idxBizJgRegisterInfoServiceImpl
.
checkUseRegistrationCode
(
paramsDto
.
getUseOrgCode
(),
"unit"
);
idxBizJgRegisterInfoServiceImpl
.
checkUseRegistrationCode
(
paramsDto
.
getUseOrgCode
(),
"unit"
);
// 2. 获取使用登记管理列表
// 2. 获取使用登记管理列表
List
<
JgUseRegistration
>
useRegistrationList
=
jgUseRegistrationMapper
.
selectList
(
// List<JgUseRegistration> useRegistrationList = jgUseRegistrationMapper.selectList(
new
LambdaQueryWrapper
<
JgUseRegistration
>()
// new LambdaQueryWrapper<JgUseRegistration>()
.
eq
(
JgUseRegistration:
:
getUseRegistrationCode
,
paramsDto
.
getUseOrgCode
())
// .eq(JgUseRegistration::getUseRegistrationCode, paramsDto.getUseOrgCode())
.
eq
(
JgUseRegistration:
:
getIsDelete
,
0
)
// .eq(JgUseRegistration::getIsDelete, 0)
.
eq
(
JgUseRegistration:
:
getStatus
,
"已完成"
)
// .eq(JgUseRegistration::getStatus, "已完成")
.
orderByDesc
(
JgUseRegistration:
:
getRecDate
)
// .orderByDesc(JgUseRegistration::getRecDate)
.
last
(
"limit 1"
));
// .last("limit 1"));
List
<
JgUseRegistrationManage
>
useRegistrationManageList
=
jgUseRegistrationManageMapper
.
selectList
(
if
(!
useRegistrationList
.
isEmpty
())
{
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>()
if
(
useRegistrationList
.
stream
().
filter
(
map
->
!
"1"
.
equals
(
map
.
getRegType
())).
count
()
>
1
)
{
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
paramsDto
.
getUseOrgCode
())
throw
new
BadRequest
(
"该使用登记证编号已由系统自动生成,不能导入,请确认使用登记证编号是否正确!"
);
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
}
.
eq
(
JgUseRegistrationManage:
:
getCertificateStatus
,
"已登记"
)
if
(
useRegistrationList
.
stream
().
anyMatch
(
map
->
!
paramsDto
.
getCompanyCode
().
equals
(
map
.
getUseUnitCreditCode
())))
{
.
orderByDesc
(
JgUseRegistrationManage:
:
getRecDate
));
if
(!
useRegistrationManageList
.
isEmpty
())
{
// if (useRegistrationList.stream().filter(map -> !"1".equals(map.getRegType())).count() > 1) {
// throw new BadRequest("该使用登记证编号已由系统自动生成,不能导入,请确认使用登记证编号是否正确!");
// }
if
(
useRegistrationManageList
.
stream
().
anyMatch
(
map
->
!
paramsDto
.
getCompanyCode
().
equals
(
map
.
getUseUnitCreditCode
())))
{
throw
new
BadRequest
(
"该使用登记证编号在其他企业使用,不能导入,请确认使用登记证编号是否正确!"
);
throw
new
BadRequest
(
"该使用登记证编号在其他企业使用,不能导入,请确认使用登记证编号是否正确!"
);
}
}
haveUseRegistration
=
true
;
haveUseRegistration
=
true
;
...
...
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/IdxBizJgProjectContraptionServiceImplService.java
View file @
e2d1b774
...
@@ -663,7 +663,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -663,7 +663,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
*
*
* @return
* @return
*/
*/
p
rivate
List
<
CompletableFuture
<
byte
[]>>
pressurePipeDataPreparation
(
int
page
,
IdxBizJgProjectContraption
idxBizJgProjectContraption
,
int
size
,
double
total
,
List
<
Map
<
String
,
Object
>>
equipmentLists
,
String
wordPath
,
String
filePrefix
,
AgencyUserModel
result
,
String
category
)
{
p
ublic
List
<
CompletableFuture
<
byte
[]>>
pressurePipeDataPreparation
(
int
page
,
IdxBizJgProjectContraption
idxBizJgProjectContraption
,
int
size
,
double
total
,
List
<
Map
<
String
,
Object
>>
equipmentLists
,
String
wordPath
,
String
filePrefix
,
AgencyUserModel
result
,
String
category
)
{
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
exportParamsMap
.
put
(
"page"
,
page
);
exportParamsMap
.
put
(
"page"
,
page
);
LocalDate
currentDate
=
LocalDate
.
now
();
LocalDate
currentDate
=
LocalDate
.
now
();
...
@@ -754,7 +754,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -754,7 +754,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
}
}
}
}
p
rivate
static
void
toZipFile
(
HttpServletResponse
response
,
List
<
CompletableFuture
<
byte
[]>>
futures
,
String
filePrefix
,
String
customFileName
)
{
p
ublic
static
void
toZipFile
(
HttpServletResponse
response
,
List
<
CompletableFuture
<
byte
[]>>
futures
,
String
filePrefix
,
String
customFileName
)
{
// 打包zip
// 打包zip
try
(
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
try
(
ByteArrayOutputStream
outputStream
=
new
ByteArrayOutputStream
();
ZipOutputStream
zip
=
new
ZipOutputStream
(
outputStream
))
{
ZipOutputStream
zip
=
new
ZipOutputStream
(
outputStream
))
{
...
...
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/JgUseRegistrationManageServiceImpl.java
View file @
e2d1b774
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -20,17 +21,23 @@ import com.yeejoin.amos.boot.module.jg.api.dto.UseFlagParamDto;
...
@@ -20,17 +21,23 @@ import com.yeejoin.amos.boot.module.jg.api.dto.UseFlagParamDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationManageService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationManageService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.ymt.api.common.StringUtil
;
import
com.yeejoin.amos.boot.module.ymt.api.common.StringUtil
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentCategoryEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentCategoryEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
import
org.apache.lucene.queryparser.classic.QueryParser
;
...
@@ -63,7 +70,6 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -63,7 +70,6 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -73,14 +79,15 @@ import java.text.ParseException;
...
@@ -73,14 +79,15 @@ import java.text.ParseException;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.CompletableFuture
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
CommonServiceImpl
.
isValidCreditCode
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
CommonServiceImpl
.
isValidCreditCode
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
IdxBizJgProjectContraptionServiceImplService
.
toZipFile
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getAuditPassedDate
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getAuditPassedDate
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getReissueDate
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getReissueDate
;
...
@@ -126,10 +133,12 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
...
@@ -126,10 +133,12 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
private
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
private
JgUseRegistrationServiceImpl
jgUseRegistrationService
;
@Autowired
@Autowired
private
JgVehicleInformationServiceImpl
jgVehicleInforma
tionService
;
private
IdxBizJgProjectContraptionServiceImplService
jgProjectContrap
tionService
;
@Autowired
@Autowired
private
IJgChangeRegistrationTransferService
jgChangeRegistrationTransferService
;
private
IdxBizJgProjectContraptionMapper
jgProjectContraptionMapper
;
@Autowired
private
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
;
@Autowired
@Autowired
private
CommonServiceImpl
commonService
;
private
CommonServiceImpl
commonService
;
...
@@ -140,7 +149,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
...
@@ -140,7 +149,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
@Value
(
"classpath:/json/registrationBasic.json"
)
@Value
(
"classpath:/json/registrationBasic.json"
)
private
Resource
registrationBasicJson
;
private
Resource
registrationBasicJson
;
private
static
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
private
static
final
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
@Autowired
@Autowired
CommonMapper
commonMapper
;
CommonMapper
commonMapper
;
@Autowired
@Autowired
...
@@ -639,20 +648,72 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
...
@@ -639,20 +648,72 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
this
.
updateById
(
manage
);
this
.
updateById
(
manage
);
}
}
/**
* 证管理下载汇总表(需要查询最新数据)
* @param response
* @param manage
*/
private
void
handleExportSummaryTable
(
HttpServletResponse
response
,
JgUseRegistrationManage
manage
)
{
private
void
handleExportSummaryTable
(
HttpServletResponse
response
,
JgUseRegistrationManage
manage
)
{
JSONObject
tagJson
=
Optional
.
ofNullable
(
manage
.
getCertificatePrintTag
())
JSONObject
tagJson
=
Optional
.
ofNullable
(
manage
.
getCertificatePrintTag
())
.
map
(
JSONObject:
:
parseObject
)
.
map
(
JSONObject:
:
parseObject
)
.
orElse
(
new
JSONObject
());
.
orElse
(
new
JSONObject
());
tagJson
.
put
(
EXPORT_SUMMARY_TABLE
,
2
);
tagJson
.
put
(
EXPORT_SUMMARY_TABLE
,
2
);
manage
.
setCertificatePrintTag
(
JSONObject
.
toJSONString
(
tagJson
));
manage
.
setCertificatePrintTag
(
JSONObject
.
toJSONString
(
tagJson
));
List
<
JgUseRegistration
>
registrations
=
jgUseRegistrationService
.
getBaseMapper
().
selectList
(
final
int
size
=
10
;
new
LambdaQueryWrapper
<
JgUseRegistration
>()
final
String
useRegCode
=
manage
.
getUseRegistrationCode
();
.
eq
(
JgUseRegistration:
:
getUseRegistrationCode
,
manage
.
getUseRegistrationCode
())
List
<
CompletableFuture
<
byte
[]>>
futures
;
.
eq
(
JgUseRegistration:
:
getStatus
,
"已完成"
)
if
(
Arrays
.
asList
(
"8200"
,
"8100"
,
"8300"
).
contains
(
manage
.
getEquCategoryCode
()))
{
);
// ===== 压力管道逻辑 =====
List
<
Long
>
seqs
=
registrations
.
stream
().
map
(
JgUseRegistration:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
List
<
IdxBizJgProjectContraption
>
list
=
jgProjectContraptionService
.
lambdaQuery
()
Set
<
String
>
projectIds
=
registrations
.
stream
().
map
(
JgUseRegistration:
:
getProjectContraptionId
).
collect
(
Collectors
.
toSet
());
.
in
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
useRegCode
)
jgUseRegistrationService
.
exportSummaryBasicInfo
(
seqs
,
response
,
manage
.
getEquCategoryCode
(),
projectIds
);
.
list
();
if
(
ValidationUtil
.
isEmpty
(
list
))
throw
new
BadRequest
(
"没有查询到汇总信息!"
);
String
wordPath
=
"PressurePipeBasicInformationSummary.ftl"
;
String
filePrefix
=
"压力管道基本信息汇总表_"
;
futures
=
list
.
stream
().
flatMap
(
v
->
{
List
<
Map
<
String
,
Object
>>
eqs
=
jgProjectContraptionMapper
.
selectEquipListByExport
(
String
.
valueOf
(
v
.
getSequenceNbr
()));
int
total
=
eqs
.
size
();
int
page
=
(
total
+
size
-
1
)
/
size
;
AgencyUserModel
result
=
Optional
.
ofNullable
(
v
.
getRecUserId
())
.
map
(
id
->
Privilege
.
agencyUserClient
.
queryByUserId
(
id
).
getResult
())
.
orElseThrow
(()
->
new
BadRequest
(
"未获取到接收人信息!"
));
return
jgProjectContraptionService
.
pressurePipeDataPreparation
(
page
,
v
,
size
,
total
,
eqs
,
wordPath
,
filePrefix
,
result
,
manage
.
getEquCategoryCode
())
.
stream
();
}).
collect
(
Collectors
.
toList
());
toZipFile
(
response
,
futures
,
filePrefix
,
filePrefix
+
useRegCode
+
".zip"
);
}
else
{
// ===== 气瓶逻辑 =====
String
wordPath
=
"CylinderBasicInformationSummary.ftl"
;
String
filePrefix
=
"气瓶基本信息汇总表_"
;
Map
<
String
,
Object
>
fillingMediumMap
=
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
).
getResult
()
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
List
<
IdxBizJgRegisterInfo
>
registerInfoList
=
idxBizJgRegisterInfoMapper
.
selectList
(
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
in
(
"USE_ORG_CODE"
,
useRegCode
));
List
<
Map
<
String
,
Object
>>
tableData
=
jgUseRegistrationMapper
.
queryForUnitVesselEquipment
(
registerInfoList
.
stream
().
map
(
IdxBizJgRegisterInfo:
:
getRecord
).
collect
(
Collectors
.
toList
()));
tableData
.
forEach
(
i
->
i
.
put
(
"chargingMedium"
,
fillingMediumMap
.
get
(
i
.
get
(
"chargingMedium"
))));
JSONArray
allEquipment
=
new
JSONArray
();
tableData
.
forEach
(
map
->
{
if
(
jgUseRegistrationService
.
checkEquStatusInUse
((
String
)
map
.
get
(
"record"
)))
{
allEquipment
.
add
(
new
JSONObject
(
map
));
}
});
int
total
=
allEquipment
.
size
();
int
page
=
(
total
+
size
-
1
)
/
size
;
JSONObject
jsonObject
=
new
JSONObject
().
fluentPut
(
"useUnitName"
,
manage
.
getUseUnitName
());
AgencyUserModel
result
=
Optional
.
ofNullable
(
manage
.
getCreateUserId
())
.
map
(
id
->
Privilege
.
agencyUserClient
.
queryByUserId
(
id
).
getResult
())
.
orElse
(
new
AgencyUserModel
());
futures
=
jgUseRegistrationService
.
cylinderDataPreparation
(
page
,
jsonObject
,
size
,
total
,
allEquipment
,
wordPath
,
filePrefix
,
result
);
toZipFile
(
response
,
futures
,
filePrefix
,
filePrefix
+
useRegCode
+
".zip"
);
}
}
}
public
void
exportUseRegistrationCertificate
(
JgUseRegistrationManage
manage
,
HttpServletResponse
response
,
String
printType
)
{
public
void
exportUseRegistrationCertificate
(
JgUseRegistrationManage
manage
,
HttpServletResponse
response
,
String
printType
)
{
...
...
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 @
e2d1b774
...
@@ -2872,7 +2872,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2872,7 +2872,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
* @param record
* @param record
* @return
* @return
*/
*/
p
rivate
boolean
checkEquStatusInUse
(
String
record
)
{
p
ublic
boolean
checkEquStatusInUse
(
String
record
)
{
IdxBizJgUseInfo
useInfo
=
idxBizJgUseInfoService
.
lambdaQuery
().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
).
one
();
IdxBizJgUseInfo
useInfo
=
idxBizJgUseInfoService
.
lambdaQuery
().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
).
one
();
if
(!
Objects
.
isNull
(
useInfo
)
&&
!
ValidationUtil
.
isEmpty
(
useInfo
.
getEquState
()))
{
if
(!
Objects
.
isNull
(
useInfo
)
&&
!
ValidationUtil
.
isEmpty
(
useInfo
.
getEquState
()))
{
return
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
().
equals
(
useInfo
.
getEquState
());
return
EquimentEnum
.
ZAIYONG
.
getCode
().
toString
().
equals
(
useInfo
.
getEquState
());
...
@@ -2912,7 +2912,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2912,7 +2912,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
*
*
* @return
* @return
*/
*/
p
rivate
List
<
CompletableFuture
<
byte
[]>>
cylinderDataPreparation
(
int
page
,
JSONObject
jsonObject
,
int
size
,
double
total
,
JSONArray
equipmentLists
,
String
wordPath
,
String
filePrefix
,
AgencyUserModel
result
)
{
p
ublic
List
<
CompletableFuture
<
byte
[]>>
cylinderDataPreparation
(
int
page
,
JSONObject
jsonObject
,
int
size
,
double
total
,
JSONArray
equipmentLists
,
String
wordPath
,
String
filePrefix
,
AgencyUserModel
result
)
{
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
<>();
Map
<
String
,
Object
>
exportParamsMap
=
new
HashMap
<>();
...
...
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