部门负责人多级显示问题处理
This commit is contained in:
parent
035ae80970
commit
4a8c85cd41
|
|
@ -32,16 +32,20 @@ public class DepartmentBO {
|
|||
* @param list
|
||||
* @return
|
||||
*/
|
||||
public static List<DepartmentListDTO> buildDeptDTOShowNames(Collection<DepartmentListDTO> list) {
|
||||
return list.stream().peek(e -> {
|
||||
List<DepartmentListDTO> children = e.getChildren();
|
||||
if (CollectionUtils.isNotEmpty(children)){
|
||||
List<DepartmentListDTO> collect = children.stream().peek(item -> item.setBmfzr(getEmployeeNameById(item.getId()))).collect(Collectors.toList());
|
||||
e.setChildren(collect);
|
||||
}
|
||||
e.setBmfzr(getEmployeeNameById(e.getId()));
|
||||
}
|
||||
).collect(Collectors.toList());
|
||||
public static List<DepartmentListDTO> buildDeptDTOShowNames(List<DepartmentListDTO> list) {
|
||||
setDeptLeader(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
public static void setDeptLeader(List<DepartmentListDTO> departments) {
|
||||
for (DepartmentListDTO dept : departments) {
|
||||
dept.setBmfzr(getEmployeeNameById(dept.getId()));
|
||||
List<DepartmentListDTO> children = dept.getChildren();
|
||||
if (CollectionUtils.isNotEmpty(children)){
|
||||
setDeptLeader(children);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static List<DepartmentListDTO> buildDeptDTOList(Collection<DepartmentPO> list, String orderType) {
|
||||
|
|
|
|||
|
|
@ -206,6 +206,8 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|||
|
||||
//todo 修复导出excel与列定制顺序
|
||||
|
||||
|
||||
|
||||
// 增加id字段,跳转人员卡片
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
weaTableColumn.setColumn("id");
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class StatisticsPersonCron extends BaseCronJob {
|
|||
@Override
|
||||
public void execute() {
|
||||
Integer value = StringUtils.isNotBlank(companyId) ? Integer.parseInt(companyId) : null;
|
||||
StatisticsParam build = StatisticsParam.builder().companyId(value).build();
|
||||
StatisticsParam build = StatisticsParam.builder().companyId(null).build();
|
||||
User user = new User();
|
||||
user.setUid(1);
|
||||
getChartService(user).recordStatistics(build);
|
||||
|
|
|
|||
Loading…
Reference in New Issue