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
e46930ca
Commit
e46930ca
authored
Jan 20, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):BUG 26887
parent
31ac860c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
CancellationEventListener.java
...dule/jg/biz/event/listener/CancellationEventListener.java
+16
-9
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 @
e46930ca
...
...
@@ -6,8 +6,12 @@ import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
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.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
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.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.event.EventListener
;
...
...
@@ -26,24 +30,21 @@ import java.util.concurrent.LinkedBlockingQueue;
*/
@Component
@Slf4j
@RequiredArgsConstructor
public
class
CancellationEventListener
{
@Value
(
"${cancellation.deal.thread.number:1}"
)
private
int
threadNumber
;
private
ICommonService
commonService
;
private
final
ICommonService
commonService
;
private
ESEquipmentCategory
esEquipmentCategoryDao
;
private
final
ESEquipmentCategory
esEquipmentCategoryDao
;
private
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
private
final
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
private
BlockingQueue
<
String
>
queue
=
new
LinkedBlockingQueue
<>()
;
private
final
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
public
CancellationEventListener
(
ICommonService
commonService
,
ESEquipmentCategory
esEquipmentCategoryDao
,
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
)
{
this
.
commonService
=
commonService
;
this
.
esEquipmentCategoryDao
=
esEquipmentCategoryDao
;
this
.
idxBizJgUseInfoMapper
=
idxBizJgUseInfoMapper
;
}
private
BlockingQueue
<
String
>
queue
=
new
LinkedBlockingQueue
<>();
@EventListener
(
value
=
CancellationEvent
.
class
)
public
void
handleTransactionalEvent
(
CancellationEvent
event
)
{
...
...
@@ -80,6 +81,12 @@ public class CancellationEventListener {
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
record
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getIsIntoManagement
,
false
);
idxBizJgUseInfoMapper
.
update
(
null
,
updateWrapper
);
// 清除系统自动生成的设备代码
idxBizJgRegisterInfoService
.
lambdaUpdate
()
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
record
)
.
eq
(
IdxBizJgRegisterInfo:
:
getEquCodeType
,
"2"
)
.
set
(
IdxBizJgRegisterInfo:
:
getEquCode
,
null
)
.
update
();
// 更新已纳管为未纳管-es
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategoryDao
.
findById
(
record
);
if
(
optional
.
isPresent
())
{
...
...
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