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
cbb7dac2
Commit
cbb7dac2
authored
May 15, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):证打印标记功能开发
parent
e086c80b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
22 deletions
+83
-22
JgUseRegistrationManageDto.java
...os/boot/module/jg/api/dto/JgUseRegistrationManageDto.java
+4
-0
JgUseRegistrationManage.java
...os/boot/module/jg/api/entity/JgUseRegistrationManage.java
+7
-0
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+1
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+1
-1
JgUseRegistrationManageServiceImpl.java
.../biz/service/impl/JgUseRegistrationManageServiceImpl.java
+0
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+70
-20
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgUseRegistrationManageDto.java
View file @
cbb7dac2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -147,4 +148,7 @@ public class JgUseRegistrationManageDto extends BaseDto {
...
@@ -147,4 +148,7 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty
(
"使用单位seq"
)
@ApiModelProperty
(
"使用单位seq"
)
private
String
useUnitSeq
;
private
String
useUnitSeq
;
@ApiModelProperty
(
"证书是否打印标记"
)
private
JSONObject
certificatePrintTag
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgUseRegistrationManage.java
View file @
cbb7dac2
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
entity
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
entity
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
@@ -240,4 +241,10 @@ public class JgUseRegistrationManage extends BaseEntity {
...
@@ -240,4 +241,10 @@ public class JgUseRegistrationManage extends BaseEntity {
*/
*/
@TableField
(
"is_do_business"
)
@TableField
(
"is_do_business"
)
private
String
isDoBusiness
;
private
String
isDoBusiness
;
/**
* 证书是否打印标记
*/
@TableField
(
"certificate_print_tag"
)
private
JSONObject
certificatePrintTag
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
cbb7dac2
...
@@ -226,7 +226,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -226,7 +226,7 @@ public class JgUseRegistrationController extends BaseController {
public
void
exportSummaryBasicInfo
(
HttpServletResponse
response
,
public
void
exportSummaryBasicInfo
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@RequestParam
(
"sequenceNbr"
)
String
sequenceNbr
,
@RequestParam
(
"category"
)
String
category
)
{
@RequestParam
(
"category"
)
String
category
)
{
jgUseRegistrationServiceImpl
.
exportSummaryBasicInfo
(
Collections
.
singletonList
(
Long
.
valueOf
(
sequenceNbr
)),
response
,
category
);
jgUseRegistrationServiceImpl
.
exportSummaryBasicInfo
(
Collections
.
singletonList
(
Long
.
valueOf
(
sequenceNbr
)),
response
,
category
,
null
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
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 @
cbb7dac2
...
@@ -710,7 +710,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -710,7 +710,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
//获取告知单信息
//获取告知单信息
byte
[]
templateToPdfData
=
WordTemplateUtils
.
getTemplateToPdfData
(
tempFileName
,
"installation-notification-report.ftl"
,
map
);
byte
[]
templateToPdfData
=
WordTemplateUtils
.
getTemplateToPdfData
(
tempFileName
,
"installation-notification-report.ftl"
,
map
);
//获取管道和气瓶的基本信息汇总表
//获取管道和气瓶的基本信息汇总表
List
<
CompletableFuture
<
byte
[]>>
exportSummaryBasicInfoData
=
jgUseRegistrationService
.
getExportSummaryBasicInfoData
(
Collections
.
singletonList
(
Long
.
valueOf
(
sequenceNbr
)),
jgInstallationNotice
.
getEquCategoryCode
(),
"安装告知"
,
Boolean
.
TRUE
);
List
<
CompletableFuture
<
byte
[]>>
exportSummaryBasicInfoData
=
jgUseRegistrationService
.
getExportSummaryBasicInfoData
(
Collections
.
singletonList
(
Long
.
valueOf
(
sequenceNbr
)),
jgInstallationNotice
.
getEquCategoryCode
(),
"安装告知"
,
Boolean
.
TRUE
,
null
);
toZipFileByData
(
response
,
exportSummaryBasicInfoData
,
templateToPdfData
,
jgInstallationNotice
.
getApplyNo
());
toZipFileByData
(
response
,
exportSummaryBasicInfoData
,
templateToPdfData
,
jgInstallationNotice
.
getApplyNo
());
}
else
{
}
else
{
WordTemplateUtils
.
templateToPdfDownload
(
tempFileName
,
"installation-notification-report.ftl"
,
map
,
response
);
WordTemplateUtils
.
templateToPdfDownload
(
tempFileName
,
"installation-notification-report.ftl"
,
map
,
response
);
...
...
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 @
cbb7dac2
This diff is collapsed.
Click to expand it.
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 @
cbb7dac2
...
@@ -1167,7 +1167,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -1167,7 +1167,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
boolean
isFirstMerge
=
jgProjectContraption
.
getIsFirstMerge
();
boolean
isFirstMerge
=
jgProjectContraption
.
getIsFirstMerge
();
mapData
.
put
(
"isFirstMerge"
,
isFirstMerge
);
mapData
.
put
(
"isFirstMerge"
,
isFirstMerge
);
// 装置表写入使用登记证编号、将装置名称写入到使用登记表
// 装置表写入使用登记证编号、将装置名称写入到使用登记表
updateRegAndProjectContraption
(
jgUseRegistration
,
mapData
,
jgProjectContraption
);
this
.
updateRegAndProjectContraption
(
jgUseRegistration
,
mapData
,
jgProjectContraption
);
// 首次合并 + 特殊登记,给工程装置生成设备代码和监管码
// 首次合并 + 特殊登记,给工程装置生成设备代码和监管码
if
(
isFirstMerge
||
"2"
.
equals
(
jgUseRegistration
.
getRegType
()))
{
if
(
isFirstMerge
||
"2"
.
equals
(
jgUseRegistration
.
getRegType
()))
{
Map
<
String
,
Object
>
createCodeMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
createCodeMap
=
new
HashMap
<>();
...
@@ -2556,13 +2556,52 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2556,13 +2556,52 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
/**
/**
* 获取装置下的管道信息(根据整个记录去重)
*
* @param projectContraptionList 装置 ID 列表
* @return 去重后的管道信息 JSON 数组
*/
public
List
<
Map
<
String
,
Object
>>
queryPipelineList
(
Set
<
String
>
projectContraptionList
)
{
if
(
CollectionUtils
.
isEmpty
(
projectContraptionList
))
{
return
Collections
.
emptyList
();
}
Set
<
String
>
result
=
new
HashSet
<>();
return
projectContraptionList
.
stream
()
.
filter
(
Objects:
:
nonNull
)
.
map
(
jgProjectContraptionService
.
getBaseMapper
()::
selectEquipList
)
.
filter
(
Objects:
:
nonNull
)
.
flatMap
(
List:
:
stream
)
.
peek
(
map
->
map
.
put
(
"productName"
,
map
.
get
(
"pipeName"
)))
.
filter
(
map
->
result
.
add
(
JSONObject
.
toJSONString
(
map
)))
.
collect
(
Collectors
.
toList
());
}
public
List
<
Map
<
String
,
Object
>>
getEquipInfoList
(
List
<
Long
>
useRegistrationSeqs
,
String
category
,
Set
<
String
>
projectContraptionIdList
)
{
LambdaQueryWrapper
<
JgUseRegistrationEq
>
lambda
=
new
QueryWrapper
<
JgUseRegistrationEq
>().
lambda
();
lambda
.
in
(
JgUseRegistrationEq:
:
getEquipTransferId
,
useRegistrationSeqs
);
lambda
.
select
(
JgUseRegistrationEq:
:
getEquId
);
List
<
JgUseRegistrationEq
>
eqs
=
jgUseRegistrationEqService
.
getBaseMapper
().
selectList
(
lambda
);
List
<
String
>
records
=
eqs
.
stream
().
map
(
JgUseRegistrationEq:
:
getEquId
).
collect
(
toList
());
if
(!
"2300"
.
equals
(
category
))
{
return
this
.
queryPipelineList
(
projectContraptionIdList
);
}
else
{
List
<
DictionarieValueModel
>
fillingMedium
=
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
).
getResult
();
Map
<
String
,
Object
>
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
List
<
Map
<
String
,
Object
>>
tableData
=
jgUseRegistrationMapper
.
queryForUnitVesselEquipment
(
records
);
tableData
.
forEach
(
i
->
i
.
put
(
"chargingMedium"
,
fillingMediumMap
.
get
(
i
.
get
(
"chargingMedium"
))));
return
tableData
;
}
}
/**
* 获取导出基本信息数据
* 获取导出基本信息数据
* @param useRegistrationSeqs
* @param useRegistrationSeqs
* @param category
* @param category
* @param whetherToFilterStatus 是否过滤设备状态 是:true(过滤设备状态为在用),否:false(所有的)
* @param whetherToFilterStatus 是否过滤设备状态 是:true(过滤设备状态为在用),否:false(所有的)
* @return
* @return
*/
*/
public
List
<
CompletableFuture
<
byte
[]>>
getExportSummaryBasicInfoData
(
List
<
Long
>
useRegistrationSeqs
,
String
category
,
String
type
,
Boolean
whetherToFilterStatus
)
{
public
List
<
CompletableFuture
<
byte
[]>>
getExportSummaryBasicInfoData
(
List
<
Long
>
useRegistrationSeqs
,
String
category
,
String
type
,
Boolean
whetherToFilterStatus
,
Set
<
String
>
projectContraptionIdList
)
{
List
<
CompletableFuture
<
byte
[]>>
futureList
=
new
ArrayList
<>();
List
<
CompletableFuture
<
byte
[]>>
futureList
=
new
ArrayList
<>();
// 总数
// 总数
double
total
;
double
total
;
...
@@ -2575,26 +2614,38 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2575,26 +2614,38 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
throw
new
BadRequest
(
"没有查询到汇总信息!"
);
throw
new
BadRequest
(
"没有查询到汇总信息!"
);
}
}
JSONArray
allEquipment
=
new
JSONArray
();
JSONArray
allEquipment
=
new
JSONArray
();
// 用Set存储已添加的equCode,防止重复添加
Set
<
String
>
addedEquCodes
=
new
HashSet
<>();
Set
<
String
>
addedEquCodes
=
new
HashSet
<>();
registrationHistoryList
.
forEach
(
historyList
->
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
historyList
.
getChangeData
());
if
(!
"安装告知"
.
equals
(
type
))
{
JSONArray
equipmentLists
=
"安装告知"
.
equals
(
type
)
List
<
Map
<
String
,
Object
>>
equipmentList
=
getEquipInfoList
(
useRegistrationSeqs
,
category
,
projectContraptionIdList
);
?
(
JSONArray
)
jsonObject
.
get
(
"deviceList"
)
if
(
CollectionUtils
.
isNotEmpty
(
equipmentList
))
{
:
(
JSONArray
)
jsonObject
.
get
(
"equipmentLists"
);
equipmentList
.
forEach
(
map
->
{
String
record
=
(
String
)
map
.
get
(
"record"
);
final
String
useDateValue
=
jsonObject
.
getString
(
"useDate"
);
if
((
whetherToFilterStatus
||
this
.
checkEquStatusInUse
(
record
)))
{
if
(
CollectionUtils
.
isNotEmpty
(
equipmentLists
))
{
allEquipment
.
add
(
new
JSONObject
(
map
));
equipmentLists
.
stream
()
}
.
map
(
obj
->
(
JSONObject
)
obj
)
});
.
filter
(
equipmentItem
->
whetherToFilterStatus
||
this
.
checkEquStatusInUse
(
equipmentItem
.
getString
(
"record"
)))
}
.
forEach
(
item
->
{
}
else
{
item
.
put
(
"useDate"
,
timeToMonths
(
useDateValue
));
registrationHistoryList
.
forEach
(
history
->
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
history
.
getChangeData
());
String
useDate
=
jsonObject
.
getString
(
"useDate"
);
List
<
Map
<
String
,
Object
>>
deviceList
=
(
List
<
Map
<
String
,
Object
>>)
jsonObject
.
get
(
"deviceList"
);
if
(
CollectionUtils
.
isNotEmpty
(
deviceList
))
{
deviceList
.
forEach
(
map
->
{
JSONObject
item
=
new
JSONObject
(
map
);
String
equCode
=
item
.
getString
(
"equCode"
);
String
record
=
item
.
getString
(
"record"
);
if
((
whetherToFilterStatus
||
this
.
checkEquStatusInUse
(
record
))
&&
addedEquCodes
.
add
(
equCode
))
{
item
.
put
(
"useDate"
,
timeToMonths
(
useDate
));
allEquipment
.
add
(
item
);
allEquipment
.
add
(
item
);
addedEquCodes
.
add
(
item
.
getString
(
"equCode"
));
}
});
});
}
}
});
});
}
total
=
allEquipment
.
size
();
total
=
allEquipment
.
size
();
AgencyUserModel
result
=
new
AgencyUserModel
();
AgencyUserModel
result
=
new
AgencyUserModel
();
// 暂时拿第一条的 监管部门和安全管理人员
// 暂时拿第一条的 监管部门和安全管理人员
...
@@ -2661,10 +2712,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2661,10 +2712,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
* @param useRegistrationSeqs
* @param useRegistrationSeqs
* @param response
* @param response
*/
*/
public
void
exportSummaryBasicInfo
(
List
<
Long
>
useRegistrationSeqs
,
HttpServletResponse
response
,
String
category
)
{
public
void
exportSummaryBasicInfo
(
List
<
Long
>
useRegistrationSeqs
,
HttpServletResponse
response
,
String
category
,
Set
<
String
>
projectContraptionIdList
)
{
JgUseRegistration
jgUseRegistration
=
jgUseRegistrationMapper
.
selectOne
(
new
QueryWrapper
<
JgUseRegistration
>().
lambda
()
JgUseRegistration
jgUseRegistration
=
jgUseRegistrationMapper
.
selectOne
(
new
QueryWrapper
<
JgUseRegistration
>().
lambda
()
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
useRegistrationSeqs
.
get
(
0
)).
eq
(
JgUseRegistration:
:
getIsDelete
,
false
));
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
useRegistrationSeqs
.
get
(
0
)).
eq
(
JgUseRegistration:
:
getIsDelete
,
false
));
List
<
CompletableFuture
<
byte
[]>>
futures
=
getExportSummaryBasicInfoData
(
useRegistrationSeqs
,
category
,
""
,
Boolean
.
FALSE
);
List
<
CompletableFuture
<
byte
[]>>
futures
=
getExportSummaryBasicInfoData
(
useRegistrationSeqs
,
category
,
""
,
Boolean
.
FALSE
,
projectContraptionIdList
);
if
(
"8300"
.
equals
(
category
)
||
"8200"
.
equals
(
category
)
||
"8100"
.
equals
(
category
))
{
if
(
"8300"
.
equals
(
category
)
||
"8200"
.
equals
(
category
)
||
"8100"
.
equals
(
category
))
{
// 文件名前缀
// 文件名前缀
String
filePrefix
=
"压力管道基本信息汇总表_"
;
String
filePrefix
=
"压力管道基本信息汇总表_"
;
...
@@ -2680,7 +2731,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -2680,7 +2731,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// byte[]压缩zip
// byte[]压缩zip
toZipFile
(
response
,
futures
,
filePrefix
,
customFileName
);
toZipFile
(
response
,
futures
,
filePrefix
,
customFileName
);
}
}
}
}
/**
/**
...
...
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