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
698e1f6c
Commit
698e1f6c
authored
Oct 29, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):注销报废编辑使用登记证编号不更新证号问题处理
parent
b5be0d47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
13 deletions
+38
-13
ChangeEquipImpactCertListener.java
...iz/edit/event/listener/ChangeEquipImpactCertListener.java
+38
-13
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/edit/event/listener/ChangeEquipImpactCertListener.java
View file @
698e1f6c
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.event.listener;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.edit.event.listener;
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
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yeejoin.amos.boot.module.jg.api.converter.EquDefineConverter
;
import
com.yeejoin.amos.boot.module.jg.api.converter.EquDefineConverter
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.dto.FieldChangeMeta
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
...
@@ -117,6 +118,7 @@ public class ChangeEquipImpactCertListener {
...
@@ -117,6 +118,7 @@ public class ChangeEquipImpactCertListener {
keysToJson
.
add
(
CERTIFICATE_NORMAL
);
keysToJson
.
add
(
CERTIFICATE_NORMAL
);
break
;
break
;
default
:
default
:
this
.
updateUseCertField
(
manage
,
meta
);
log
.
warn
(
"未知分类字段:[{}]"
,
category
);
log
.
warn
(
"未知分类字段:[{}]"
,
category
);
}
}
}
}
...
@@ -233,20 +235,43 @@ public class ChangeEquipImpactCertListener {
...
@@ -233,20 +235,43 @@ public class ChangeEquipImpactCertListener {
}
}
private
void
handleDefaultRegistration
(
BaseBizDataChangeEvent
event
)
{
private
void
handleDefaultRegistration
(
BaseBizDataChangeEvent
event
)
{
if
(
event
.
getBizRelationData
().
getBizIsFinished
()){
String
equId
=
Stream
.
concat
(
String
equId
=
Stream
.
concat
(
Optional
.
ofNullable
(
event
.
getBizRelationData
().
getProjectContraptionIds
()).
orElse
(
Collections
.
emptySet
()).
stream
(),
Optional
.
ofNullable
(
event
.
getBizRelationData
().
getProjectContraptionIds
()).
orElse
(
Collections
.
emptySet
()).
stream
(),
Optional
.
ofNullable
(
event
.
getBizRelationData
().
getRecords
()).
orElse
(
Collections
.
emptySet
()).
stream
()
Optional
.
ofNullable
(
event
.
getBizRelationData
().
getRecords
()).
orElse
(
Collections
.
emptySet
()).
stream
()
).
findFirst
().
orElse
(
null
);
).
findFirst
().
orElse
(
null
);
if
(
StringUtils
.
isBlank
(
equId
))
{
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryRegisterWrapper
=
new
QueryWrapper
<
IdxBizJgRegisterInfo
>().
lambda
();
log
.
warn
(
"[handleDefaultRegistration] 未找到设备ID,eventId={}"
,
event
.
getBizRelationData
().
getBizId
());
queryRegisterWrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
equId
);
return
;
IdxBizJgRegisterInfo
registerInfo
=
registerInfoMapper
.
selectOne
(
queryRegisterWrapper
);
}
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
lambdaQuery
()
IdxBizJgRegisterInfo
registerInfo
=
registerInfoMapper
.
selectOne
(
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
registerInfo
.
getUseOrgCode
())
Wrappers
.<
IdxBizJgRegisterInfo
>
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
equId
)
.
one
();
);
this
.
handleFieldChange
(
event
.
getData
(),
jgUseRegistrationManage
);
if
(
registerInfo
==
null
)
{
log
.
warn
(
"[handleDefaultRegistration] 未查询到登记信息,equId={}"
,
equId
);
return
;
}
String
useOrgCode
=
event
.
getData
().
stream
()
.
filter
(
m
->
"useOrgCode"
.
equals
(
m
.
getColumnKey
()))
.
map
(
FieldChangeMeta:
:
getColumnOldValue
)
.
findFirst
()
.
orElse
(
registerInfo
.
getUseOrgCode
());
if
(
StringUtils
.
isBlank
(
useOrgCode
))
{
log
.
warn
(
"[handleDefaultRegistration] useOrgCode 为空,equId={}"
,
equId
);
return
;
}
// 查询使用登记证管理信息
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useOrgCode
)
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
.
one
();
if
(
jgUseRegistrationManage
==
null
)
{
log
.
info
(
"[handleDefaultRegistration] 未找到使用登记证信息,useOrgCode={}"
,
useOrgCode
);
return
;
}
}
handleFieldChange
(
event
.
getData
(),
jgUseRegistrationManage
);
log
.
debug
(
"[handleDefaultRegistration] 字段变更处理完成,useOrgCode={}"
,
useOrgCode
);
}
}
private
void
handleUsageRegistration
(
BaseBizDataChangeEvent
event
)
{
private
void
handleUsageRegistration
(
BaseBizDataChangeEvent
event
)
{
...
...
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