Commit 4400326a authored by 赵啸非's avatar 赵啸非

添加窗口同步修改通知

parent 87675dbd
......@@ -41,19 +41,21 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
@Override
protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException {
List<Long> matterIdlist = list.stream().map(item -> item.getMatterId()).collect(Collectors.toList());
Map<Long, MatterEntity> matterEntityMap = matterService.find(new MatterQuery().idList(matterIdlist)).parallelStream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n));
list.forEach(item -> {
if (!ObjectUtils.isEmpty(item.getMatterId())) {
MatterEntity matterEntity = matterEntityMap.get(item.getMatterId());
if (!ObjectUtils.isEmpty(matterEntity)) {
item.setBelongDept(matterEntity.getBelongDept());
item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum());
item.setOnlineToTheSceneNum(matterEntity.getOnlineToTheSceneNum());
item.setDeptCode(matterEntity.getDeptCode());
item.setAreaCode(matterEntity.getAreaCode());
}
}
});
if(!ObjectUtils.isEmpty(matterIdlist)){
Map<Long, MatterEntity> matterEntityMap = matterService.find(new MatterQuery().idList(matterIdlist)).parallelStream().collect(Collectors.toMap(x -> x.getId(), y -> y, (o, n) -> n));
list.forEach(item -> {
if (!ObjectUtils.isEmpty(item.getMatterId())) {
MatterEntity matterEntity = matterEntityMap.get(item.getMatterId());
if (!ObjectUtils.isEmpty(matterEntity)) {
item.setBelongDept(matterEntity.getBelongDept());
item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum());
item.setOnlineToTheSceneNum(matterEntity.getOnlineToTheSceneNum());
item.setDeptCode(matterEntity.getDeptCode());
item.setAreaCode(matterEntity.getAreaCode());
}
}
});
}
super.findAfter(params, pageInfo, context, list);
}
......
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