|
|
@@ -721,4 +721,17 @@ sql;
|
|
|
dump($reflection->getConstants());
|
|
|
dump($reflection->getInterfaces());
|
|
|
}
|
|
|
+
|
|
|
+ public function syncWorkOrder()
|
|
|
+ {
|
|
|
+ $workOrders = WorkOrder::query()->with('order')->get();
|
|
|
+ foreach ($workOrders as $workOrder) {
|
|
|
+ $workOrder->owner_id = $workOrder->order->owner_id;
|
|
|
+ $workOrder->logistic_id = $workOrder->order->logistic_id;
|
|
|
+ if ($workOrder->review_at){
|
|
|
+ $workOrder->status = 5;
|
|
|
+ }
|
|
|
+ $workOrder->save();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|