|
@@ -100,7 +100,12 @@ public class OnLineInfoServiceImpl extends ServiceImpl<OnLineInfoMapper, OnLineI
|
|
|
DynamicDataSourceContextHolder.push(SourceConstant.BASE);
|
|
|
List<SysDept> deptList11 = sysDeptService.list(Wrappers.<SysDept>lambdaQuery().eq(SysDept::getParentId, sysDept.getDeptId()));
|
|
|
DynamicDataSourceContextHolder.poll();
|
|
|
- dept1.setDeptList(getDeptList(deptList11, userId, 1));
|
|
|
+ //赋值子部门
|
|
|
+ List<OnLineInfoReturnData.Dept> deptList2 = getDeptList(deptList11, userId, 1);
|
|
|
+ dept1.setDeptList(deptList2);
|
|
|
+ //计算子部门列表的时长和加到当前部门上
|
|
|
+ BigDecimal onLineTimeCount = deptList2.stream().map(OnLineInfoReturnData.Dept::getOnLineTime).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ dept1.setOnLineTime(dept1.getOnLineTime().add(onLineTimeCount));
|
|
|
}
|
|
|
|
|
|
//返回数据
|