Commit 299c1335 authored by 廖旭伟's avatar 廖旭伟

修改花名册部门组织架构bug

parent 53e29ed6
...@@ -136,6 +136,20 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -136,6 +136,20 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
@Override @Override
public List<DeptTreeSelect> buildDeptTreeSelect(List<DeptEntity> list) { public List<DeptTreeSelect> buildDeptTreeSelect(List<DeptEntity> list) {
for (Iterator<DeptEntity> iterator = list.iterator(); iterator.hasNext(); ) {
DeptEntity deptEntity = iterator.next();
List<StaffEntity> staffEntities = staffService.find(new StaffQuery().deptId(deptEntity.getId()));
List<Map<String, Object>> personList = new ArrayList<>();
staffEntities.forEach(item -> {
Map<String, Object> map = new HashMap<>();
map.put("staffId", item.getId());
map.put("staffName", item.getName());
map.put("deptId", item.getDeptId());
personList.add(map);
});
deptEntity.setPersonList(personList);
}
//获取父节点 //获取父节点
List<DeptEntity> returnList = list.stream().filter(t -> t.getParentId() == 0).map( List<DeptEntity> returnList = list.stream().filter(t -> t.getParentId() == 0).map(
m -> { m -> {
......
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