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
0a2226b5
Commit
0a2226b5
authored
Sep 03, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):西安电梯做业务修改
parent
87bde01b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
31 deletions
+29
-31
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+29
-31
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/DataHandlerServiceImpl.java
View file @
0a2226b5
...
...
@@ -2186,15 +2186,6 @@ public class DataHandlerServiceImpl {
List
<
Long
>
manageSeqs
=
manageList
.
stream
()
.
map
(
JgUseRegistrationManage:
:
getSequenceNbr
)
.
collect
(
Collectors
.
toList
());
List
<
String
>
useRegistrantionCodeList
=
manageList
.
stream
()
.
map
(
JgUseRegistrationManage:
:
getUseRegistrationCode
)
.
collect
(
Collectors
.
toList
());
List
<
String
>
recordList
=
registerInfoService
.
lambdaQuery
()
.
in
(
IdxBizJgRegisterInfo:
:
getUseOrgCode
,
useRegistrantionCodeList
)
.
list
()
.
stream
()
.
map
(
IdxBizJgRegisterInfo:
:
getRecord
)
.
collect
(
Collectors
.
toList
());
List
<
List
<
Long
>>
managePartitions
=
Lists
.
partition
(
manageSeqs
,
BATCH_SIZE
);
for
(
List
<
Long
>
part
:
managePartitions
)
{
...
...
@@ -2203,30 +2194,37 @@ public class DataHandlerServiceImpl {
.
in
(
JgUseRegistrationManage:
:
getSequenceNbr
,
part
)
.
update
();
}
List
<
String
>
useRegistrantionCodeList
=
manageList
.
stream
()
.
map
(
JgUseRegistrationManage:
:
getUseRegistrationCode
)
.
collect
(
Collectors
.
toList
());
List
<
List
<
String
>>
useRegistrationCodes
=
Lists
.
partition
(
useRegistrantionCodeList
,
BATCH_SIZE
);
for
(
List
<
String
>
useRegistrations
:
useRegistrationCodes
)
{
List
<
String
>
recordList
=
registerInfoService
.
lambdaQuery
()
.
in
(
IdxBizJgRegisterInfo:
:
getUseOrgCode
,
useRegistrations
)
.
list
()
.
stream
()
.
map
(
IdxBizJgRegisterInfo:
:
getRecord
)
.
collect
(
Collectors
.
toList
());
// ------------------- 更新数据 --- 设备数据 -------------------
List
<
List
<
String
>>
recordPartitions
=
Lists
.
partition
(
recordList
,
BATCH_SIZE
);
for
(
List
<
String
>
part
:
recordPartitions
)
{
// 批量查询 & 更新设备数据
Iterable
<
ESEquipmentInfo
>
esEquipmentBatch
=
esEquipmentDao
.
findAllById
(
part
);
esEquipmentBatch
.
forEach
(
x
->
{
x
.
setUSE_PLACE
(
"陕西省/西安市"
);
x
.
setUSE_PLACE_CODE
(
"610000#610100"
);
x
.
setIS_DO_BUSINESS
(
Boolean
.
TRUE
);
});
esEquipmentDao
.
saveAll
(
esEquipmentBatch
);
// 批量查询 & 更新设备分类数据
Iterable
<
ESEquipmentCategoryDto
>
equipmentCategoryBatch
=
esEquipmentCategory
.
findAllById
(
part
);
equipmentCategoryBatch
.
forEach
(
x
->
{
x
.
setIS_DO_BUSINESS
(
Boolean
.
TRUE
);
x
.
setUSE_PLACE
(
"陕西省/西安市"
);
x
.
setUSE_PLACE_CODE
(
"610000#610100"
);
});
esEquipmentCategory
.
saveAll
(
equipmentCategoryBatch
);
}
// 批量查询 & 更新设备数据
Iterable
<
ESEquipmentInfo
>
esEquipmentBatch
=
esEquipmentDao
.
findAllById
(
recordList
);
esEquipmentBatch
.
forEach
(
x
->
{
x
.
setUSE_PLACE
(
"陕西省/西安市"
);
x
.
setUSE_PLACE_CODE
(
"610000#610100"
);
x
.
setIS_DO_BUSINESS
(
Boolean
.
TRUE
);
});
esEquipmentDao
.
saveAll
(
esEquipmentBatch
);
return
String
.
format
(
"刷新证管理表数据:%s 条;对应设备ES数据:%s 条。"
,
manageList
.
size
(),
recordList
.
size
());
// 批量查询 & 更新设备分类数据
Iterable
<
ESEquipmentCategoryDto
>
equipmentCategoryBatch
=
esEquipmentCategory
.
findAllById
(
recordList
);
equipmentCategoryBatch
.
forEach
(
x
->
{
x
.
setIS_DO_BUSINESS
(
Boolean
.
TRUE
);
x
.
setUSE_PLACE
(
"陕西省/西安市"
);
x
.
setUSE_PLACE_CODE
(
"610000#610100"
);
});
esEquipmentCategory
.
saveAll
(
equipmentCategoryBatch
);
}
return
String
.
format
(
"刷新证管理表数据:%s 条;对应设备ES数据:%s 条。"
,
manageList
.
size
(),
useRegistrantionCodeList
.
size
());
}
public
String
refreshXianData2ES
(
boolean
isUpdate
)
throws
IOException
{
...
...
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