部门负责人多级显示问题处理

pull/279/head
Chengliang 10 months ago
parent 035ae80970
commit 4a8c85cd41

@ -32,16 +32,20 @@ public class DepartmentBO {
* @param list * @param list
* @return * @return
*/ */
public static List<DepartmentListDTO> buildDeptDTOShowNames(Collection<DepartmentListDTO> list) { public static List<DepartmentListDTO> buildDeptDTOShowNames(List<DepartmentListDTO> list) {
return list.stream().peek(e -> { setDeptLeader(list);
List<DepartmentListDTO> children = e.getChildren(); return list;
if (CollectionUtils.isNotEmpty(children)){ }
List<DepartmentListDTO> collect = children.stream().peek(item -> item.setBmfzr(getEmployeeNameById(item.getId()))).collect(Collectors.toList());
e.setChildren(collect); public static void setDeptLeader(List<DepartmentListDTO> departments) {
} for (DepartmentListDTO dept : departments) {
e.setBmfzr(getEmployeeNameById(e.getId())); dept.setBmfzr(getEmployeeNameById(dept.getId()));
} List<DepartmentListDTO> children = dept.getChildren();
).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(children)){
setDeptLeader(children);
}
}
} }
public static List<DepartmentListDTO> buildDeptDTOList(Collection<DepartmentPO> list, String orderType) { public static List<DepartmentListDTO> buildDeptDTOList(Collection<DepartmentPO> list, String orderType) {

@ -206,6 +206,8 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
//todo 修复导出excel与列定制顺序 //todo 修复导出excel与列定制顺序
// 增加id字段,跳转人员卡片 // 增加id字段,跳转人员卡片
WeaTableColumn weaTableColumn = new WeaTableColumn(); WeaTableColumn weaTableColumn = new WeaTableColumn();
weaTableColumn.setColumn("id"); weaTableColumn.setColumn("id");

@ -34,7 +34,7 @@ public class StatisticsPersonCron extends BaseCronJob {
@Override @Override
public void execute() { public void execute() {
Integer value = StringUtils.isNotBlank(companyId) ? Integer.parseInt(companyId) : null; 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 user = new User();
user.setUid(1); user.setUid(1);
getChartService(user).recordStatistics(build); getChartService(user).recordStatistics(build);

Loading…
Cancel
Save