Commit 0121159a by wangli

修改

1 parent 73370392
......@@ -45,22 +45,23 @@ public class ScheduleServiceImpl implements ScheduleService {
IPage<OrgTeam> pg = this.queryOrgTeams(page, size, levelType, levelIds);
List<OrgTeam> orgTeams = pg.getRecords();
List<ScheduleOverviewResp.Team> items = new ArrayList<>();
List<ScheduleOverviewResp.Team> teams = new ArrayList<>();
// 获取工单列表
for (OrgTeam t : orgTeams) {
ScheduleOverviewResp.Team item = new ScheduleOverviewResp.Team();
item.setName(t.getTeamName());
item.setValue(t.getTeamId());
item.setLevel("team");
ScheduleOverviewResp.Team team = new ScheduleOverviewResp.Team();
team.setName(t.getTeamName());
team.setValue(t.getTeamId());
team.setLevel("team");
// 获取改team订单列表
List<OrderRequest> orders = this.queryOrderRequests(t.getTeamId(), date);
item.setOrder(this.getTeamOrderSum(orders));
team.setOrder(this.getTeamOrderSum(orders));
List<ScheduleOverviewResp.Item> children = new ArrayList<>();
if(orders == null || orders.isEmpty()){
item.setChildren(children);
team.setChildren(children);
teams.add(team);
continue;
}
......@@ -92,10 +93,12 @@ public class ScheduleServiceImpl implements ScheduleService {
child.setDistanceDes("");
children.add(child);
}
item.setChildren(children);
team.setChildren(children);
item.setOrderDesc(String.format("人均:%d", orders.size() / teamEngineers.size()));
item.setDistanceDes("");
team.setOrderDesc(String.format("人均:%d", orders.size() / teamEngineers.size()));
team.setDistanceDes("");
teams.add(team);
}
ScheduleOverviewResp res = new ScheduleOverviewResp();
......@@ -103,7 +106,7 @@ public class ScheduleServiceImpl implements ScheduleService {
res.setPages(pg.getPages());
res.setPageSize(pg.getSize());
res.setPageCurrent(pg.getCurrent());
res.setContent(items);
res.setContent(teams);
return Result.success(res);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!