Commit 5a240978 authored by 赵啸非's avatar 赵啸非

修改文件地址拼接

parent 3cb91cd1
...@@ -64,9 +64,9 @@ public class SyncMatterTaskImpl implements ITaskExcuteService { ...@@ -64,9 +64,9 @@ 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"); StopWatch stopWatch = new StopWatch("stopwatch syncmatter");
try {
for (SiteEntity siteEntity : siteEntities) {
log.info("开始同步站点部门==》{}", siteEntity.getSiteName()); log.info("开始同步站点部门==》{}", siteEntity.getSiteName());
stopWatch.start("开始同步站点部门"); stopWatch.start("开始同步站点部门");
deptService.syncDeptBySiteId(siteEntity, null); deptService.syncDeptBySiteId(siteEntity, null);
...@@ -91,8 +91,10 @@ public class SyncMatterTaskImpl implements ITaskExcuteService { ...@@ -91,8 +91,10 @@ public class SyncMatterTaskImpl implements ITaskExcuteService {
stopWatch.stop(); stopWatch.stop();
log.info("同步主题事项完成,耗时:{}s", stopWatch.getLastTaskTimeMillis() / 1000); log.info("同步主题事项完成,耗时:{}s", stopWatch.getLastTaskTimeMillis() / 1000);
} }
// syncDevice(); } catch (Exception e) {
log.info("结束同步事项!"); log.error("同步站点事项异常,站点:{}", siteEntities.get(0).getSiteName(), e);
}
log.info("结束同步事项!,耗时:{}秒", stopWatch.getLastTaskTimeMillis() / 1000);
} }
......
...@@ -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("开始更新事项详细!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment