Commit 829cc3c9 authored by 廖旭伟's avatar 廖旭伟

考勤人员花名册接口功能调整

parent 8483bb6c
...@@ -159,7 +159,8 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -159,7 +159,8 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
m -> { m -> {
m.setChildren(getChildren(m, list)); m.setChildren(getChildren(m, list));
StaffEntity query = new StaffQuery(); StaffQuery query = new StaffQuery();
query.setStatusNotList(Arrays.asList(StaffSatusEnum.离职.getValue()));
query.setDeptIdList(getChildrenId(m, list)); query.setDeptIdList(getChildrenId(m, list));
int count = staffService.count(query,null); int count = staffService.count(query,null);
m.setPersonNum(count); m.setPersonNum(count);
...@@ -220,7 +221,9 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -220,7 +221,9 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
@Override @Override
public Rest<Void> updateDeptNum(Context context) { public Rest<Void> updateDeptNum(Context context) {
log.info("更新部门用户数量"); log.info("更新部门用户数量");
Map<Long, Long> collect = staffService.find(new StaffQuery()).stream().collect(Collectors.groupingBy(x -> x.getDeptId(), Collectors.counting())); StaffQuery query = new StaffQuery();
query.setStatusNotList(Arrays.asList(StaffSatusEnum.离职.getValue()));
Map<Long, Long> collect = staffService.find(query).stream().collect(Collectors.groupingBy(x -> x.getDeptId(), Collectors.counting()));
DeptEntity deptEntity1 = new DeptEntity(); DeptEntity deptEntity1 = new DeptEntity();
deptEntity1.setPersonNum(0); deptEntity1.setPersonNum(0);
this.getDao().update(deptEntity1, new HashMap<>()); this.getDao().update(deptEntity1, new HashMap<>());
......
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