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
cb3ef711
Commit
cb3ef711
authored
Jan 05, 2026
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg): 西安数据核对
1.核对数据同步接口es不存在属地时进行更新属地已数据库为主
parent
b0b01cf8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
FilterableEquipInsert2EsPatcher.java
...biz/data/fix/service/FilterableEquipInsert2EsPatcher.java
+22
-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/data/fix/service/FilterableEquipInsert2EsPatcher.java
View file @
cb3ef711
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
data
.
fix
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
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.common.api.entity.TzsDataRefreshMessage
;
import
com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent
;
import
com.yeejoin.amos.boot.module.jg.biz.data.fix.patcher.FilterableBatchDataPatcher
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.utils.JsonDiffUtil
;
import
com.yeejoin.amos.boot.module.jg.biz.refresh.StatisticsDataUpdateService
;
import
com.yeejoin.amos.boot.module.jg.biz.refresh.handler.EquipmentRefreshHandler
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgSupervisionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.stereotype.Component
;
...
...
@@ -27,11 +32,14 @@ public class FilterableEquipInsert2EsPatcher extends FilterableBatchDataPatcher
private
final
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
protected
FilterableEquipInsert2EsPatcher
(
ApplicationContext
applicationContext
,
ESEquipmentCategory
equipmentCategory
,
EquipmentRefreshHandler
refreshHandler
,
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
)
{
private
final
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
protected
FilterableEquipInsert2EsPatcher
(
ApplicationContext
applicationContext
,
ESEquipmentCategory
equipmentCategory
,
EquipmentRefreshHandler
refreshHandler
,
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
,
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
)
{
super
(
applicationContext
);
this
.
equipmentCategory
=
equipmentCategory
;
this
.
refreshHandler
=
refreshHandler
;
this
.
idxBizJgUseInfoMapper
=
idxBizJgUseInfoMapper
;
this
.
idxBizJgSupervisionInfoMapper
=
idxBizJgSupervisionInfoMapper
;
}
@Override
...
...
@@ -58,6 +66,19 @@ public class FilterableEquipInsert2EsPatcher extends FilterableBatchDataPatcher
}
catch
(
Exception
e
)
{
log
.
error
(
"老设备索引插入处理失败:{}"
,
record
,
e
);
}
}
else
{
try
{
IdxBizJgSupervisionInfo
supervisionInfo
=
idxBizJgSupervisionInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
record
)
.
select
(
IdxBizJgSupervisionInfo:
:
getRecord
,
IdxBizJgSupervisionInfo:
:
getOrgBranchCode
,
IdxBizJgSupervisionInfo:
:
getOrgBranchName
));
ESEquipmentCategoryDto
esEquipmentInfo
=
op
.
get
();
if
(
supervisionInfo
!=
null
&&
StringUtils
.
isNotEmpty
(
supervisionInfo
.
getOrgBranchCode
())
&&
JsonDiffUtil
.
isNullOrEmpty
(
esEquipmentInfo
.
getOrgBranchCode
()))
{
esEquipmentInfo
.
setOrgBranchCode
(
supervisionInfo
.
getOrgBranchCode
());
esEquipmentInfo
.
setORG_BRANCH_NAME
(
supervisionInfo
.
getOrgBranchName
());
equipmentCategory
.
save
(
esEquipmentInfo
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"老设备索引更新属地处理失败:{}"
,
record
,
e
);
}
}
// 插入或者新索引
try
{
...
...
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