Commit 27a49250 authored by 赵啸非's avatar 赵啸非

修改考勤汇总

parent 2476ffe5
......@@ -115,8 +115,12 @@ public class TestController {
Long deptId = item.getKey();
if (deptId == -1) continue;
DeptEntity deptEntity = deptService.get(deptId);
if (!ObjectUtils.isEmpty(deptEntity) && !ObjectUtils.isEmpty(deptEntity.getParentId())) {
int sum = deptService.find(new DeptQuery().id(deptEntity.getParentId())).stream().map(i -> i.getPersonNum()).reduce(0, Integer::sum);;
if (!ObjectUtils.isEmpty(deptEntity) ) {
//查询当前父节点的所有子部门
DeptQuery deptQuery = new DeptQuery();
deptQuery.setParentId(deptEntity.getParentId());
int sum = deptService.find(new DeptQuery().parentId(deptEntity.getParentId())).stream().map(i -> i.getPersonNum()).reduce(0, Integer::sum);;
DeptEntity parentDept = deptService.get(deptEntity.getParentId());
log.info("dept:{},sum:{}", parentDept.getDeptName(), sum);
......
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