Commit 6e4f4d74 by wangli

修改

1 parent d7ca567e
......@@ -103,7 +103,7 @@ public class DispatchServiceImpl implements DispatchService {
// 获取engineerCodes
List<String> engineerCodes = engineers.stream().map(EngineerInfo::getEngineerCode).collect(Collectors.toList());
// 获取技术员订单ID列表HashMap<engineerCode, List<orderId>>
// 获取技术员已指派单列表
Map<String, List<OrderAppointment>> engineerOrders = this.queryEngineerOrders(engineerCodes, date);
// 获取订单ID
......@@ -114,10 +114,11 @@ public class DispatchServiceImpl implements DispatchService {
}
}
// 获取单列表
// 获取服务单/工单列表
Map<String, List<OrderRequest>> orders = this.queryOrderRequestByOrderIds(new ArrayList<>(orderIds)).stream().collect(
Collectors.groupingBy(OrderRequest::getOrderId));
// 获取技术员已指派单列表
List<DispatchEngineerOrderListResp.EngineerInfo> egs = new ArrayList<>();
for (EngineerInfo e : engineers) {
......@@ -126,8 +127,10 @@ public class DispatchServiceImpl implements DispatchService {
// 技术员已指派的订单列表
List<OrderAppointment> records = engineerOrders.getOrDefault(e.getEngineerCode(), List.of());
for (OrderAppointment r : records) {
DispatchEngineerOrderListResp.OrderInfo item = new DispatchEngineerOrderListResp.OrderInfo();
// 获取订单信息
// 获取对应的工单信息
OrderRequest o = orders.get(r.getOrderId()).get(0);
item.setOrderId(r.getOrderId());
......@@ -207,7 +210,6 @@ public class DispatchServiceImpl implements DispatchService {
lqw.in(OrderAppointment::getEngineerCode, engineerCodes);
lqw.ge(OrderAppointment::getExpectTime, this.getTimestampFromDate(date, "00:00:00"));
lqw.le(OrderAppointment::getExpectTime, this.getTimestampFromDate(date, "23:59:59"));
lqw.select(OrderAppointment::getEngineerCode, OrderAppointment::getOrderId);
lqw.orderByAsc(OrderAppointment::getEngineerCode);
lqw.orderByAsc(OrderAppointment::getExpectTime);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!