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

添加多级查询区域下站点

parent ae9b905a
package com.mortals.xhx.module.site.model;
package com.mortals.xhx.module.site.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.site.model.SiteBusinessEntity;
......
package com.mortals.xhx.module.site.model;
package com.mortals.xhx.module.site.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.site.model.SiteMatterEntity;
import lombok.Data;
......
package com.mortals.xhx.module.site.model;
package com.mortals.xhx.module.site.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.site.model.SiteModelEntity;
import lombok.Data;
......
package com.mortals.xhx.module.site.model;
package com.mortals.xhx.module.site.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.site.model.SiteEntity;
import lombok.Data;
......
......@@ -20,4 +20,9 @@ public class WindowBusinessVo extends BaseEntityLong {
*/
private String siteBusinessIds;
/**
* 窗口编号
*/
private String fromnum;
}
\ No newline at end of file
package com.mortals.xhx.module.window.service.impl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.business.model.BusinessQuery;
import com.mortals.xhx.module.site.model.SiteBusinessEntity;
import com.mortals.xhx.module.site.model.SiteBusinessQuery;
import com.mortals.xhx.module.site.model.SiteEntity;
import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.model.WindowQuery;
import com.mortals.xhx.module.window.service.WindowService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.window.dao.WindowBusinessDao;
......@@ -18,6 +24,7 @@ import org.springframework.util.ObjectUtils;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
......@@ -29,5 +36,18 @@ import java.util.stream.Collectors;
*/
@Service("windowBusinessService")
public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBusinessDao, WindowBusinessEntity, Long> implements WindowBusinessService {
@Autowired
private WindowService windowService;
@Override
protected void findAfter(WindowBusinessEntity entity, PageInfo pageInfo, Context context, List<WindowBusinessEntity> list) throws AppException {
Map<Long, WindowEntity> collect = windowService.find(new WindowQuery()).stream().collect(Collectors.toMap(x -> x.getId(), y -> y));
list.forEach(item->{
if(!ObjectUtils.isEmpty(item.getWindowId())&&!ObjectUtils.isEmpty(collect.get(item.getWindowId()))){
item.setFromnum(collect.get(item.getWindowId()).getFromnum());
}
});
super.findAfter(entity, pageInfo, context, list);
}
}
\ No newline at end of file
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