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
62be67c6
Commit
62be67c6
authored
Jan 20, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):BUG 26887
parent
e46930ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
CancellationEventListener.java
...dule/jg/biz/event/listener/CancellationEventListener.java
+17
-12
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/event/listener/CancellationEventListener.java
View file @
62be67c6
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import
com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.event.CancellationEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgUseInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
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.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
...
@@ -40,7 +41,7 @@ public class CancellationEventListener {
...
@@ -40,7 +41,7 @@ public class CancellationEventListener {
private
final
ESEquipmentCategory
esEquipmentCategoryDao
;
private
final
ESEquipmentCategory
esEquipmentCategoryDao
;
private
final
IdxBizJgUseInfo
Mapper
idxBizJgUseInfoMapper
;
private
final
IdxBizJgUseInfo
ServiceImpl
idxBizJgUseInfoService
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
...
@@ -76,24 +77,28 @@ public class CancellationEventListener {
...
@@ -76,24 +77,28 @@ public class CancellationEventListener {
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
// 无引用则进行修改纳管状态为未纳管
// 无引用则进行修改纳管状态为未纳管
if
(!
inUsed
)
{
if
(!
inUsed
)
{
// 更新已纳管为未纳管-数据库
// 更新已纳管为未纳管 - 数据库
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
idxBizJgUseInfoService
.
lambdaUpdate
()
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
)
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
);
.
set
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
)
idxBizJgUseInfoMapper
.
update
(
null
,
updateWrapper
);
.
update
();
// 清除系统自动生成的设备代码
idxBizJgRegisterInfoService
.
lambdaUpdate
()
// 清除系统自动生成的设备代码`equCode`
boolean
isRegisterUpdated
=
idxBizJgRegisterInfoService
.
lambdaUpdate
()
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
)
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
)
.
eq
(
IdxBizJgRegisterInfo:
:
getEquCodeType
,
"2"
)
.
eq
(
IdxBizJgRegisterInfo:
:
getEquCodeType
,
"2"
)
.
set
(
IdxBizJgRegisterInfo:
:
getEquCode
,
null
)
.
set
(
IdxBizJgRegisterInfo:
:
getEquCode
,
null
)
.
update
();
.
update
();
// 更新已纳管为未纳管-es
// 同步修改ES数据
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategoryDao
.
findById
(
record
);
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategoryDao
.
findById
(
record
);
if
(
optional
.
isPresent
())
{
optional
.
ifPresent
(
esEquipmentCategoryDto
->
{
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
esEquipmentCategoryDto
.
setIS_INTO_MANAGEMENT
(
false
);
esEquipmentCategoryDto
.
setIS_INTO_MANAGEMENT
(
false
);
if
(
isRegisterUpdated
)
{
esEquipmentCategoryDto
.
setEQU_CODE
(
null
);
}
esEquipmentCategoryDao
.
save
(
esEquipmentCategoryDto
);
esEquipmentCategoryDao
.
save
(
esEquipmentCategoryDto
);
}
}
);
}
}
}
}
}
}
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