Commit d4a22fee by wangli

接口字段变更, timelines -> orders

1 parent cf2e8e56
......@@ -20,7 +20,7 @@ public class OrderAssignRecommendResp {
private String startTime;
private String endTime;
private InsertInfo insertInfo;
private List<TimeLineDTO> timelines;
private List<TimeLineDTO> orders;
}
@Data
......
......@@ -88,7 +88,7 @@ public class OrderAssignImpl implements OrderAssign {
item.setDesc(String.format("将被插入在第%d单,受此影响原第%d单变化第%d单,第3单将增加5公里路程,比预计晚到30分钟,建议调整;", rr.index + 1, rr.index + 1, rr.index + 2));
item.setStartTime("08:00");
item.setStartTime("18:00");
item.setTimelines(this.packTimelines(orderAppointments, orderTips));
item.setOrders(this.packTimelines(orderAppointments, orderTips));
items.add(item);
}
......@@ -202,11 +202,8 @@ public class OrderAssignImpl implements OrderAssign {
}
private HashMap<String, List<LabelValueDTO>> packOrderTips(List<OrderRequest> orders) {
HashMap<String, List<LabelValueDTO>> map = new HashMap<>();
for (OrderRequest order : orders) {
map.put(order.getOrderId(), this.packOrderTip(order));
}
return map;
return orders.stream().collect(Collectors.toMap(
OrderRequest::getOrderId, this::packOrderTip, (l1, l2) -> l1, HashMap::new));
}
private List<LabelValueDTO> packOrderTip(OrderRequest order) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!