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
c896b6fd
Commit
c896b6fd
authored
Nov 03, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):修复安全问题追踪服务中的设备记录处理逻辑
parent
64072c71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
SafetyProblemTracingServiceImpl.java
.../jg/biz/service/impl/SafetyProblemTracingServiceImpl.java
+3
-2
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/service/impl/SafetyProblemTracingServiceImpl.java
View file @
c896b6fd
...
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
...
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
...
@@ -309,7 +310,7 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
...
@@ -309,7 +310,7 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
// 如果设备存在并且没有新的问题,则更新Other表和ES状态
// 如果设备存在并且没有新的问题,则更新Other表和ES状态
if
(!
ValidationUtil
.
isEmpty
(
detail
)
&&
ValidationUtil
.
isEmpty
(
newSafetyProblemTracings
))
{
if
(!
ValidationUtil
.
isEmpty
(
detail
)
&&
ValidationUtil
.
isEmpty
(
newSafetyProblemTracings
))
{
// 获取设备问题源记录
// 获取设备问题源记录
Set
<
String
>
records
=
newSafetyProblemTracings
.
stream
().
map
(
SafetyProblemTracing:
:
getSourceId
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
records
=
Sets
.
newHashSet
(
detail
.
get
(
"SEQUENCE_NBR"
).
toString
());
// 更新Other表和ES状态
// 更新Other表和ES状态
updateOtherTableAndES
(
records
);
updateOtherTableAndES
(
records
);
}
}
...
@@ -329,7 +330,7 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
...
@@ -329,7 +330,7 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
log
.
error
(
"Other表更新失败,设备record:{},错误原因:{}"
,
records
,
e
.
getMessage
(),
e
);
log
.
error
(
"Other表更新失败,设备record:{},错误原因:{}"
,
records
,
e
.
getMessage
(),
e
);
}
}
// 更新ES状态
// 更新ES状态
(添加异常处理)
try
{
try
{
Iterable
<
ESEquipmentCategoryDto
>
esEquipmentIter
=
esEquipmentCategory
.
findAllById
(
records
);
Iterable
<
ESEquipmentCategoryDto
>
esEquipmentIter
=
esEquipmentCategory
.
findAllById
(
records
);
esEquipmentIter
.
forEach
(
dto
->
esEquipmentIter
.
forEach
(
dto
->
...
...
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