Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
sample-form-platform
Commits
9da7db52
Commit
9da7db52
authored
Feb 19, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/sample-form-platform
parents
24591d64
e6d7b8ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
sample-form-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
...a/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
+5
-0
No files found.
sample-form-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSiteMatterTaskImpl.java
View file @
9da7db52
...
...
@@ -44,6 +44,7 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
sitePdu
.
setId
(
1L
);
Rest
<
List
<
SitePdu
>>
siteRest
=
siteFeign
.
getFlatSitesBySiteId
(
sitePdu
);
if
(
siteRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
log
.
info
(
"总数量:{}"
,
siteRest
.
getData
().
size
());
siteRest
.
getData
().
forEach
(
site
->
{
SiteMatterPdu
siteMatterPdu
=
new
SiteMatterPdu
();
siteMatterPdu
.
setPage
(
1
);
...
...
@@ -51,6 +52,7 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
Rest
<
RespData
<
List
<
SiteMatterPdu
>>>
siteMatterRest
=
siteMatterFeign
.
list
(
siteMatterPdu
);
if
(
siteMatterRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
//删除后新增
log
.
info
(
"事项总数量:{}"
,
siteMatterRest
.
getData
().
getData
().
size
());
List
<
SheetMatterEntity
>
sheetMatterEntities
=
siteMatterRest
.
getData
().
getData
().
stream
().
map
(
siteMatter
->
{
SheetMatterEntity
sheetMatterEntity
=
new
SheetMatterEntity
();
sheetMatterEntity
.
initAttrValue
();
...
...
@@ -67,12 +69,15 @@ public class SyncSiteMatterTaskImpl implements ITaskExcuteService {
if
(!
ObjectUtils
.
isEmpty
(
sheetMatterEntities
))
{
sheetMatterService
.
getDao
().
delete
(
new
SheetMatterQuery
().
siteId
(
site
.
getId
()));
log
.
info
(
"新增数量:{}"
,
sheetMatterEntities
.
size
());
List
<
List
<
SheetMatterEntity
>>
partition
=
ListUtil
.
partition
(
sheetMatterEntities
,
500
);
for
(
List
<
SheetMatterEntity
>
matterEntities
:
partition
)
{
sheetMatterService
.
save
(
matterEntities
);
}
}
}
else
{
log
.
info
(
"请求错误,code:{}"
,
siteMatterRest
.
getCode
());
}
});
}
...
...
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