|
@@ -2,12 +2,12 @@
|
|
|
|
|
|
|
|
namespace App\Services;
|
|
namespace App\Services;
|
|
|
|
|
|
|
|
-use App\DeliveryAppointment;
|
|
|
|
|
use App\DeliveryAppointmentCar;
|
|
use App\DeliveryAppointmentCar;
|
|
|
use App\Traits\ServiceAppAop;
|
|
use App\Traits\ServiceAppAop;
|
|
|
use App\ReceivingTask;
|
|
use App\ReceivingTask;
|
|
|
use App\Utils\IdCreate;
|
|
use App\Utils\IdCreate;
|
|
|
use Illuminate\Support\Carbon;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
|
+use Illuminate\Support\Facades\Auth;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
use Ramsey\Uuid\Uuid;
|
|
use Ramsey\Uuid\Uuid;
|
|
|
|
|
|
|
@@ -54,6 +54,7 @@ class ReceivingTaskService
|
|
|
$task_number = $this->buildTaskNumber();
|
|
$task_number = $this->buildTaskNumber();
|
|
|
$params['number'] = $task_number;
|
|
$params['number'] = $task_number;
|
|
|
$params['delivery_appointment_car_id'] = $deliveryAppointmentCar->id; // 预约号
|
|
$params['delivery_appointment_car_id'] = $deliveryAppointmentCar->id; // 预约号
|
|
|
|
|
+ $params['user_id'] = Auth::user()->id;
|
|
|
$receivingTask = new ReceivingTask($params);
|
|
$receivingTask = new ReceivingTask($params);
|
|
|
DB::transaction(function () use ($deliveryAppointmentCar, $params, &$receivingTask) {
|
|
DB::transaction(function () use ($deliveryAppointmentCar, $params, &$receivingTask) {
|
|
|
$receivingTask->save();
|
|
$receivingTask->save();
|