Commit c0add024 by 王力

Merge branch 'dev_mp2jpa0810' into 'develop'

修改

See merge request !337
2 parents e2b32b6f d2a46dd0
......@@ -391,22 +391,17 @@ public class DispatchServiceImpl implements DispatchService {
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);
// 排序
records.sort(Comparator.comparing(OrderInfoEntity::getEngineerCode));
records.sort(Comparator.comparing(OrderInfoEntity::getPlanStartTime));
//过滤
List<OrderInfoEntity> orders = records.stream()
.filter(r -> !r.getAppointmentStatus().equals("INIT"))
.filter(r -> r.getOrderStatus().equals("NORMAL"))
.collect(Collectors.toList());
return orders.stream().collect(Collectors.groupingBy(OrderInfoEntity::getEngineerCode));
}
......@@ -637,7 +632,7 @@ class OrderRequestScheduler {
List<Line> newTasks = new ArrayList<>();
for (OrderInfoEntity o : orderRequests) {
if (!o.getAppointmentStatus().equals("NOT_ASSIGNED")) {
if (!o.getAppointmentStatus().equals("INIT")) {
continue;
}
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!