Commit 18d4412c by 丁伟峰

Merge remote-tracking branch 'origin/develop' into develop

2 parents 398ccd2c 9d9f09a9
...@@ -13,7 +13,7 @@ public class OrderAppointment { ...@@ -13,7 +13,7 @@ public class OrderAppointment {
private String engineerCode; private String engineerCode;
private String engineerName; private String engineerName;
private String engineerPhone; private String engineerPhone;
private String engineerAge; private Integer engineerAge;
private Integer isWorkshop; private Integer isWorkshop;
private Timestamp expectStartTime; private Timestamp expectStartTime;
private Timestamp expectEndTime; private Timestamp expectEndTime;
......
...@@ -220,8 +220,6 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -220,8 +220,6 @@ public class DispatchServiceImpl implements DispatchService {
OrderRequestScheduler scheduler = new OrderRequestScheduler(); OrderRequestScheduler scheduler = new OrderRequestScheduler();
List<LineSegment> results = scheduler.scheduler(orders, orderAppointments); List<LineSegment> results = scheduler.scheduler(orders, orderAppointments);
System.out.println(results);
for (LineSegment r : results) { for (LineSegment r : results) {
String orderId = r.id; String orderId = r.id;
...@@ -234,13 +232,13 @@ public class DispatchServiceImpl implements DispatchService { ...@@ -234,13 +232,13 @@ public class DispatchServiceImpl implements DispatchService {
op.setMainSub(1); op.setMainSub(1);
op.setEngineerCode(engineerCode); op.setEngineerCode(engineerCode);
op.setEngineerName(engineer.getName()); op.setEngineerName(engineer.getName());
op.setEngineerAge(""); op.setEngineerAge(0);
op.setEngineerPhone(engineer.getPhone()); op.setEngineerPhone(engineer.getPhone());
op.setIsWorkshop(0); op.setIsWorkshop(0);
op.setExpectStartTime(expectStartTime); op.setExpectStartTime(expectStartTime);
op.setExpectStartTime(expectEndTime); op.setExpectEndTime(expectEndTime);
op.setPreStatus("PRE"); op.setPreStatus("PRE");
op.setStatus("PRE"); op.setStatus("ASSIGNED");
orderAppointmentMPDao.insert(op); orderAppointmentMPDao.insert(op);
...@@ -485,10 +483,18 @@ class OrderRequestScheduler { ...@@ -485,10 +483,18 @@ class OrderRequestScheduler {
List<Line> newTasks = new ArrayList<>(); List<Line> newTasks = new ArrayList<>();
for (OrderRequest o : orderRequests) { for (OrderRequest o : orderRequests) {
if (!o.getAppointmentStatus().equals("NOT_ASSIGNED")) {
continue;
}
Line t = new Line(o.getOrderId(), 30); Line t = new Line(o.getOrderId(), 30);
newTasks.add(t); newTasks.add(t);
} }
if (newTasks.isEmpty()) {
List<LineSegment> empty = new ArrayList<>();
return empty;
}
LineSegmentScheduler scheduler = new LineSegmentScheduler(); LineSegmentScheduler scheduler = new LineSegmentScheduler();
return scheduler.scheduleLineSegments(used, newTasks); return scheduler.scheduleLineSegments(used, newTasks);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!