Commit 00a28b7f authored by 赵啸非's avatar 赵啸非

修改根据业务查询部门逻辑

parent c88101de
...@@ -34,11 +34,11 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao ...@@ -34,11 +34,11 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
@Override @Override
protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException { protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException {
List<Long> matterIdlist = list.parallelStream().map(item -> item.getMatterId()).collect(Collectors.toList()); // List<Long> matterIdlist = list.parallelStream().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)); //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 -> { list.forEach(item -> {
if (!ObjectUtils.isEmpty(item.getMatterId())) { if (!ObjectUtils.isEmpty(item.getMatterId())) {
MatterEntity matterEntity = matterEntityMap.get(item.getMatterId()); MatterEntity matterEntity = matterService.get(item.getMatterId());
if (!ObjectUtils.isEmpty(matterEntity)) { if (!ObjectUtils.isEmpty(matterEntity)) {
item.setBelongDept(matterEntity.getBelongDept()); item.setBelongDept(matterEntity.getBelongDept());
item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum()); item.setWindowToTheSceneNum(matterEntity.getWindowToTheSceneNum());
......
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