Commit c88101de authored by 赵啸非's avatar 赵啸非

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

parent 322c581c
......@@ -34,10 +34,7 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
@Override
protected void findAfter(SiteMatterEntity params, PageInfo pageInfo, Context context, List<SiteMatterEntity> list) throws AppException {
if(list.size()>1000000){
}else{
List<Long> matterIdlist = list.stream().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));
list.forEach(item -> {
if (!ObjectUtils.isEmpty(item.getMatterId())) {
......@@ -51,24 +48,6 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
}
}
});
}
/*
list.forEach(item -> {
if (!ObjectUtils.isEmpty(item.getMatterId())) {
MatterEntity matterEntity = matterService.getCache(item.getMatterId().toString());
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);
}
......@@ -81,7 +60,7 @@ public class SiteMatterServiceImpl extends AbstractCRUDServiceImpl<SiteMatterDao
protected void updateBefore(SiteMatterEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
SiteMatterEntity beforeSiteMatterEntity = this.get(entity.getId(), context);
if (!ObjectUtils.isEmpty(beforeSiteMatterEntity.getDeptId())&&!beforeSiteMatterEntity.getDeptId().equals(entity.getDeptId())) {
if (!ObjectUtils.isEmpty(beforeSiteMatterEntity.getDeptId()) && !beforeSiteMatterEntity.getDeptId().equals(entity.getDeptId())) {
//更新事项中的部门编号
MatterEntity matterEntity = matterService.get(entity.getMatterId(), context);
if (!ObjectUtils.isEmpty(matterEntity)) {
......
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