|
|
@@ -9,6 +9,9 @@ use App\OracleDOCWaveDetails;
|
|
|
use App\Order;
|
|
|
use App\OrderCommodity;
|
|
|
use App\Services\LogService;
|
|
|
+use App\Services\OracleDOCOrderHeaderService;
|
|
|
+use App\Services\OrderCommodityService;
|
|
|
+use App\Services\OrderService;
|
|
|
use App\SortingStation;
|
|
|
use App\User;
|
|
|
use App\UserToken;
|
|
|
@@ -66,6 +69,9 @@ class SortingController extends Controller
|
|
|
// return ['result'=>'unauthority','fail_info'=>'无效令牌或令牌过期'];
|
|
|
// }
|
|
|
|
|
|
+ // 同步orderCommodity
|
|
|
+ $this->syncOrder($batch_id);
|
|
|
+
|
|
|
/** @var Batch $batch */
|
|
|
$batch=Batch::query()->where('code',$batch_id)->orderBy('id','desc')->first();
|
|
|
$data=[
|
|
|
@@ -189,4 +195,12 @@ class SortingController extends Controller
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
+ public function syncOrder($code)
|
|
|
+ {
|
|
|
+ $code = \request("code");
|
|
|
+ $orderHeaders = app(OracleDOCOrderHeaderService::class)->getQuery()->where('DOC_Order_Header.WaveNo',$code)->get();
|
|
|
+ app(OrderService::class)->syncOrderByWMSOrderHeaders($orderHeaders);
|
|
|
+ app(OrderCommodityService::class)->syncOrderCommodity($orderHeaders);
|
|
|
+ }
|
|
|
+
|
|
|
}
|