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

修改文件地址拼接

parent 3cb91cd1
......@@ -64,9 +64,9 @@ public class SyncMatterTaskImpl implements ITaskExcuteService {
public void excuteTask(ITask task) throws AppException {
log.info("开始同步事项!");
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);
......@@ -91,8 +91,10 @@ public class SyncMatterTaskImpl implements ITaskExcuteService {
stopWatch.stop();
log.info("同步主题事项完成,耗时:{}s", stopWatch.getLastTaskTimeMillis() / 1000);
}
// syncDevice();
log.info("结束同步事项!");
} catch (Exception e) {
log.error("同步站点事项异常,站点:{}", siteEntities.get(0).getSiteName(), e);
}
log.info("结束同步事项!,耗时:{}秒", stopWatch.getLastTaskTimeMillis() / 1000);
}
......
......@@ -120,7 +120,10 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
matterEntity.setCreateTime(new Date());
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()));
}
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