Commit d2a46dd0 by wangli

修改

1 parent f9308e99
...@@ -391,22 +391,17 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -391,22 +391,17 @@ public class DispatchServiceImpl implements DispatchService {
private Map<String, List<OrderInfoEntity>> queryEngineerOrders(List<String> engineerCodes, LocalDate date) { private Map<String, List<OrderInfoEntity>> queryEngineerOrders(List<String> engineerCodes, LocalDate date) {
// 获取工程师服务单列表 // 获取工程师服务单列表
Map<String, List<OrderInfo>> map = new HashMap<>();
LambdaQueryWrapper<OrderInfo> lqw = new LambdaQueryWrapper<>();
lqw.eq(OrderInfo::getDt, date);
lqw.in(OrderInfo::getAppointmentStatus, List.of("VIRTUAL", "PRE", "CONFIRM"));
lqw.in(OrderInfo::getEngineerCode, engineerCodes);
List<OrderInfoEntity> records = orderInfoDao.findByDtAndEngineerCodeIn(date, engineerCodes); List<OrderInfoEntity> records = orderInfoDao.findByDtAndEngineerCodeIn(date, engineerCodes);
// 排序 // 排序
records.sort(Comparator.comparing(OrderInfoEntity::getEngineerCode)); records.sort(Comparator.comparing(OrderInfoEntity::getEngineerCode));
records.sort(Comparator.comparing(OrderInfoEntity::getPlanStartTime)); records.sort(Comparator.comparing(OrderInfoEntity::getPlanStartTime));
//过滤 //过滤
List<OrderInfoEntity> orders = records.stream() List<OrderInfoEntity> orders = records.stream()
.filter(r -> !r.getAppointmentStatus().equals("INIT")) .filter(r -> r.getOrderStatus().equals("NORMAL"))
.collect(Collectors.toList()); .collect(Collectors.toList());
return orders.stream().collect(Collectors.groupingBy(OrderInfoEntity::getEngineerCode)); return orders.stream().collect(Collectors.groupingBy(OrderInfoEntity::getEngineerCode));
} }
...@@ -637,7 +632,7 @@ class OrderRequestScheduler { ...@@ -637,7 +632,7 @@ class OrderRequestScheduler {
List<Line> newTasks = new ArrayList<>(); List<Line> newTasks = new ArrayList<>();
for (OrderInfoEntity o : orderRequests) { for (OrderInfoEntity o : orderRequests) {
if (!o.getAppointmentStatus().equals("NOT_ASSIGNED")) { if (!o.getAppointmentStatus().equals("INIT")) {
continue; continue;
} }
Line t = new Line(o.getOrderId(), 30); Line t = new Line(o.getOrderId(), 30);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!