|
|
@@ -377,14 +377,15 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
|
|
|
acb.setId(depId);
|
|
|
deps=departmentMapper.selectBysuperId(oo.getId());
|
|
|
depIds =departmentService.selectSubordinateDeps(depId);
|
|
|
+ Department department = new Department();
|
|
|
+ department.setId(depId);
|
|
|
+ depIds.add(department);
|
|
|
}
|
|
|
List<AdminCustomerBo> list =departmentMapper.AlldepCount(depIds,startTime, endTime);
|
|
|
- Iterator<AdminCustomerBo> iterator = list.iterator();
|
|
|
- while (iterator.hasNext()){
|
|
|
- AdminCustomerBo ad=new AdminCustomerBo();
|
|
|
+
|
|
|
+ for(AdminCustomerBo ad:list){
|
|
|
if (acb.getId().equals(ad.getDepId())){
|
|
|
acb.getaList().add(ad);
|
|
|
- iterator.remove();
|
|
|
}
|
|
|
}
|
|
|
for (depCountBo dep : deps) {
|
|
|
@@ -404,14 +405,11 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
|
|
|
//迭代获取所有部门与部门员工并计算出部门数量
|
|
|
private List<depCountBo> iterationDeps(String id,List<AdminCustomerBo> list) {
|
|
|
List<depCountBo> deps =departmentMapper.selectBysuperId(id);
|
|
|
- Iterator<AdminCustomerBo> iterator = list.iterator();
|
|
|
for (depCountBo dep : deps) {
|
|
|
dep.setList(iterationDeps(dep.getId(),list));
|
|
|
- while (iterator.hasNext()){
|
|
|
- AdminCustomerBo ad=new AdminCustomerBo();
|
|
|
+ for (AdminCustomerBo ad:list){
|
|
|
if (dep.getId().equals(ad.getDepId())){
|
|
|
dep.getaList().add(ad);
|
|
|
- iterator.remove();
|
|
|
}
|
|
|
}
|
|
|
sumCount(dep);
|