Commit 7b3c26cb authored by 赵啸非's avatar 赵啸非

优化站点同步事项

parent 05912012
...@@ -94,8 +94,6 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao, ...@@ -94,8 +94,6 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
List<MatterEntity> matterList = matterService.getDao().getMatterListByAreaCode(new MatterQuery().areaCode(siteEntity.getAreaCode())); List<MatterEntity> matterList = matterService.getDao().getMatterListByAreaCode(new MatterQuery().areaCode(siteEntity.getAreaCode()));
Set<String> matterNoSet =matterList.parallelStream().map(i -> i.getMatterNo()).collect(Collectors.toSet()); Set<String> matterNoSet =matterList.parallelStream().map(i -> i.getMatterNo()).collect(Collectors.toSet());
log.info("计算差集"); log.info("计算差集");
List<MatterEntity> subList = this.subListSet(govMatterList, matterNoSet); List<MatterEntity> subList = this.subListSet(govMatterList, matterNoSet);
subList = subList.parallelStream().distinct().collect(Collectors.toList()); subList = subList.parallelStream().distinct().collect(Collectors.toList());
...@@ -112,14 +110,13 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao, ...@@ -112,14 +110,13 @@ public class MatterExtServiceImpl extends AbstractCRUDServiceImpl<MatterExtDao,
matterService.save(subList, context); matterService.save(subList, context);
} }
matterList.parallelStream().forEach(matterEntity -> { for (MatterEntity matterEntity : matterList) {
Rest<String> rest = matterService.buildMatterDetail(matterEntity, null); Rest<String> rest = matterService.buildMatterDetail(matterEntity, null);
if(rest.getCode()==YesNoEnum.YES.getValue()){ if(rest.getCode()==YesNoEnum.YES.getValue()){
matterEntity.setUpdateTime(new Date()); matterEntity.setUpdateTime(new Date());
matterService.update(matterEntity, null); matterService.update(matterEntity, null);
} }
}); }
//查询站点事项相关 //查询站点事项相关
List<SiteEntity> siteEntities = siteService.find(new SiteQuery().areaCode(siteEntity.getAreaCode())); List<SiteEntity> siteEntities = siteService.find(new SiteQuery().areaCode(siteEntity.getAreaCode()));
if (!ObjectUtils.isEmpty(siteEntities)) { if (!ObjectUtils.isEmpty(siteEntities)) {
......
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