Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_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
赵啸非
smart_gov_platform
Commits
5a240978
Commit
5a240978
authored
Mar 21, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文件地址拼接
parent
3cb91cd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
26 deletions
+31
-26
base-manager/src/main/java/com/mortals/xhx/daemon/task/SyncMatterTaskImpl.java
.../java/com/mortals/xhx/daemon/task/SyncMatterTaskImpl.java
+27
-25
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterExtServiceImpl.java
.../xhx/module/matter/service/impl/MatterExtServiceImpl.java
+4
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/daemon/task/SyncMatterTaskImpl.java
View file @
5a240978
...
@@ -64,35 +64,37 @@ public class SyncMatterTaskImpl implements ITaskExcuteService {
...
@@ -64,35 +64,37 @@ public class SyncMatterTaskImpl implements ITaskExcuteService {
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
public
void
excuteTask
(
ITask
task
)
throws
AppException
{
log
.
info
(
"开始同步事项!"
);
log
.
info
(
"开始同步事项!"
);
List
<
SiteEntity
>
siteEntities
=
siteService
.
find
(
new
SiteEntity
());
List
<
SiteEntity
>
siteEntities
=
siteService
.
find
(
new
SiteEntity
());
for
(
SiteEntity
siteEntity
:
siteEntities
)
{
StopWatch
stopWatch
=
new
StopWatch
(
"stopwatch syncmatter"
);
try
{
for
(
SiteEntity
siteEntity
:
siteEntities
)
{
log
.
info
(
"开始同步站点部门==》{}"
,
siteEntity
.
getSiteName
());
stopWatch
.
start
(
"开始同步站点部门"
);
deptService
.
syncDeptBySiteId
(
siteEntity
,
null
);
stopWatch
.
stop
();
log
.
info
(
"同步站点部门完成,耗时:{}s"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
log
.
info
(
"开始同步事项==》{}"
,
siteEntity
.
getSiteName
());
StopWatch
stopWatch
=
new
StopWatch
(
"stopwatch syncmatter"
);
stopWatch
.
start
(
"开始同步事项方法"
);
log
.
info
(
"开始同步站点部门==》{}"
,
siteEntity
.
getSiteName
());
matterExtService
.
doMatterBySiteId
(
siteEntity
,
null
);
stopWatch
.
start
(
"开始同步站点部门"
);
stopWatch
.
stop
();
deptService
.
syncDeptBySiteId
(
siteEntity
,
null
);
log
.
info
(
"同步事项完成,耗时:{}s"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
stopWatch
.
stop
();
log
.
info
(
"同步站点部门完成,耗时:{}s"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
log
.
info
(
"开始同步事项==》{}"
,
siteEntity
.
getSiteName
());
stopWatch
.
start
(
"开始同步事项方法"
);
log
.
info
(
"开始添加站点事项==》{}"
,
siteEntity
.
getSiteName
());
matterExtService
.
doMatterBySiteId
(
siteEntity
,
null
);
stopWatch
.
start
(
"开始添加站点事项"
);
stopWatch
.
stop
();
siteMatterService
.
doSyncSiteMatter
(
siteEntity
,
null
);
log
.
info
(
"同步事项完成,耗时:{}s"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
stopWatch
.
stop
();
log
.
info
(
"开始添加站点事项,耗时:{} s"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
log
.
info
(
"开始添加站点事项==》{}"
,
siteEntity
.
getSiteName
());
//同步主题
stopWatch
.
start
(
"开始添加站点事项"
);
stopWatch
.
start
(
"开始同步主题事项"
);
siteMatterService
.
doSyncSiteMatter
(
siteEntity
,
null
);
matterExtService
.
doMatterThemeBySiteId
(
siteEntity
,
null
);
stopWatch
.
stop
();
stopWatch
.
stop
();
log
.
info
(
"开始添加站点事项,耗时:{} s"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
log
.
info
(
"同步主题事项完成,耗时:{}s"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
}
//同步主题
}
catch
(
Exception
e
)
{
stopWatch
.
start
(
"开始同步主题事项"
);
log
.
error
(
"同步站点事项异常,站点:{}"
,
siteEntities
.
get
(
0
).
getSiteName
(),
e
);
matterExtService
.
doMatterThemeBySiteId
(
siteEntity
,
null
);
stopWatch
.
stop
();
log
.
info
(
"同步主题事项完成,耗时:{}s"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
}
}
// syncDevice();
log
.
info
(
"结束同步事项!,耗时:{}秒"
,
stopWatch
.
getLastTaskTimeMillis
()
/
1000
);
log
.
info
(
"结束同步事项!"
);
}
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterExtServiceImpl.java
View file @
5a240978
...
@@ -120,7 +120,10 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
...
@@ -120,7 +120,10 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
matterEntity
.
setCreateTime
(
new
Date
());
matterEntity
.
setCreateTime
(
new
Date
());
matterEntity
.
setMatterEdition
(
"0"
);
matterEntity
.
setMatterEdition
(
"0"
);
}
}
matterService
.
save
(
subList
,
context
);
List
<
List
<
MatterEntity
>>
partition
=
Lists
.
partition
(
subList
,
100
);
for
(
List
<
MatterEntity
>
partitionList
:
partition
)
{
matterService
.
save
(
partitionList
,
context
);
}
matterList
=
matterService
.
getDao
().
getMatterListByAreaCode
(
matterQuery
.
areaCode
(
siteEntity
.
getAreaCode
()));
matterList
=
matterService
.
getDao
().
getMatterListByAreaCode
(
matterQuery
.
areaCode
(
siteEntity
.
getAreaCode
()));
}
}
log
.
info
(
"开始更新事项详细!"
);
log
.
info
(
"开始更新事项详细!"
);
...
...
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