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
80eaba86
Commit
80eaba86
authored
Apr 08, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加作废listener日志
parent
7cbce420
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
CancellationEventListener.java
...dule/jg/biz/event/listener/CancellationEventListener.java
+7
-1
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 @
80eaba86
...
@@ -53,12 +53,17 @@ public class CancellationEventListener {
...
@@ -53,12 +53,17 @@ public class CancellationEventListener {
@PostConstruct
@PostConstruct
public
void
init
()
{
public
void
init
()
{
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
threadNumber
);
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
threadNumber
,
r
->
{
Thread
t
=
new
Thread
(
r
);
t
.
setName
(
"CancellationWorker-"
+
t
.
getId
());
return
t
;
});
for
(
int
i
=
0
;
i
<
threadNumber
;
i
++)
{
for
(
int
i
=
0
;
i
<
threadNumber
;
i
++)
{
executorService
.
execute
(()
->
{
executorService
.
execute
(()
->
{
while
(
true
)
{
while
(
true
)
{
try
{
try
{
String
record
=
queue
.
take
();
String
record
=
queue
.
take
();
log
.
info
(
"线程 {} 开始处理 record: {}"
,
Thread
.
currentThread
().
getName
(),
record
);
this
.
dealData
(
record
);
this
.
dealData
(
record
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
@@ -70,6 +75,7 @@ public class CancellationEventListener {
...
@@ -70,6 +75,7 @@ public class CancellationEventListener {
}
}
private
void
dealData
(
String
record
)
{
private
void
dealData
(
String
record
)
{
log
.
info
(
"开始检查设备的引用:{}"
,
record
);
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
// 无引用则进行修改纳管状态为未纳管
// 无引用则进行修改纳管状态为未纳管
...
...
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