Commit ec45ea8c by wangli

修改

1 parent 3ebc5005
......@@ -142,18 +142,22 @@ public class ScheduleServiceImpl implements ScheduleService {
timelines.add(item);
}
Map<String, List<OrderAppointment>> statusGroup = orderAppointments.stream().collect(Collectors.groupingBy(OrderAppointment::getStatus));
List<OrderAppointment> empty = new ArrayList<>();
Integer countPending = statusGroup.getOrDefault("ASSIGNED", empty).size() + statusGroup.getOrDefault("CONTACTED", empty).size() + statusGroup.getOrDefault("DEPARTED", empty).size();
List<ScheduleEngineerOverviewResp.Dynamic> dynamics = new ArrayList<>();
dynamics.add(this.packDynamic("姓名", engineer.getName()));
dynamics.add(this.packDynamic("日期", date));
dynamics.add(this.packDynamic("状态", "上班"));
dynamics.add(this.packDynamic("待服务", "5"));
dynamics.add(this.packDynamic("服务中", "1"));
dynamics.add(this.packDynamic("已完成", "2"));
dynamics.add(this.packDynamic("已取消", "2"));
dynamics.add(this.packDynamic("已改约", "3"));
dynamics.add(this.packDynamic("待服务", Integer.toString(countPending)));
dynamics.add(this.packDynamic("服务中", Integer.toString(statusGroup.getOrDefault("STARTED", empty).size())));
dynamics.add(this.packDynamic("已完成", Integer.toString(statusGroup.getOrDefault("FINISHED", empty).size())));
dynamics.add(this.packDynamic("已取消", Integer.toString(statusGroup.getOrDefault("CANCELED", empty).size())));
dynamics.add(this.packDynamic("已改约", Integer.toString(statusGroup.getOrDefault("RESCHEDULED", empty).size())));
dynamics.add(this.packDynamic("预计总耗时", "6小时"));
dynamics.add(this.packDynamic("公里数", "42公里"));
dynamics.add(this.packDynamic("工作时间", "08:00-19:00"));
dynamics.add(this.packDynamic("工作时间", "08:00-18:00"));
dynamics.add(this.packDynamic("交通工具", "电动车"));
List<String> orderIds = orderAppointments.stream().map(OrderAppointment::getOrderId).collect(Collectors.toList());
......@@ -168,12 +172,11 @@ public class ScheduleServiceImpl implements ScheduleService {
item.setOrderStatus(o.getAppointmentStatus());
item.setOrderStatusName("");
item.setDistance(3000);
item.setArriveTime("");
item.setTimeType("");
item.setExpectArriveDuration("");
item.setArriveTime("");
item.setWorkDuration("");
item.setExpectWorkDuration("");
item.setTimeType("auto");
item.setExpectArriveDuration("10分钟");
item.setArriveTime("10分钟");
item.setExpectWorkDuration("30分钟");
item.setWorkDuration("30分钟");
orders.add(item);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!