|
|
@@ -12,6 +12,7 @@ use App\StationTask;
|
|
|
use App\StationTaskBatch;
|
|
|
use App\StationTaskCommodity;
|
|
|
use App\StationTaskMaterialBox;
|
|
|
+use Ramsey\Uuid\Uuid;
|
|
|
use Tests\TestCase;
|
|
|
use App\Batch;
|
|
|
use App\Traits\TestMockSubServices;
|
|
|
@@ -61,7 +62,8 @@ class AssignTasksTest extends TestCase
|
|
|
$this->data['orderCommodities'] =
|
|
|
factory(OrderCommodity::class)
|
|
|
->createMany($this->makeArray($this->orderCommodityAmount,[
|
|
|
- 'order_id' => function(){return $this->getTargetFieldCirculately($this->data['orders']);}
|
|
|
+ 'order_id' => function(){return $this->getTargetFieldCirculately($this->data['orders']);},
|
|
|
+ 'location' => function(){return Uuid::uuid4() . '_' . rand(1, 6);},
|
|
|
]));
|
|
|
$this->data['station_rule_batches']
|
|
|
= factory(StationRuleBatch::class)
|
|
|
@@ -85,33 +87,33 @@ class AssignTasksTest extends TestCase
|
|
|
|
|
|
function tearDown(): void
|
|
|
{
|
|
|
- MaterialBox::query()
|
|
|
- ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskMaterialBoxes.*.materialBox.id')??[])
|
|
|
- ->delete();
|
|
|
- StationTaskMaterialBox::query()
|
|
|
- ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskMaterialBoxes.*.id')??[])
|
|
|
- ->delete();
|
|
|
- StationTaskCommodity::query()
|
|
|
- ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskCommodities.*.id')??[])
|
|
|
- ->delete();
|
|
|
- StationTaskBatch::query()
|
|
|
- ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.id')??[])
|
|
|
- ->delete();
|
|
|
- StationTask::query()
|
|
|
- ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.id')??[])
|
|
|
- ->delete();
|
|
|
- StationRuleBatch::query()
|
|
|
- ->whereIn('id',data_get($this->data['station_rule_batches'],'*.id')??[])
|
|
|
- ->delete();
|
|
|
- OrderCommodity::query()
|
|
|
- ->whereIn('id',data_get($this->data['orderCommodities'],'*.id')??[])
|
|
|
- ->delete();
|
|
|
- Order::query()
|
|
|
- ->whereIn('id',data_get($this->data['orders'],'*.id')??[])
|
|
|
- ->delete();
|
|
|
- Batch::query()
|
|
|
- ->whereIn('id',data_get($this->data['batches'],'*.id')??[])
|
|
|
- ->delete();
|
|
|
+// MaterialBox::query()
|
|
|
+// ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskMaterialBoxes.*.materialBox.id')??[])
|
|
|
+// ->delete();
|
|
|
+// StationTaskMaterialBox::query()
|
|
|
+// ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskMaterialBoxes.*.id')??[])
|
|
|
+// ->delete();
|
|
|
+// StationTaskCommodity::query()
|
|
|
+// ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskCommodities.*.id')??[])
|
|
|
+// ->delete();
|
|
|
+// StationTaskBatch::query()
|
|
|
+// ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.id')??[])
|
|
|
+// ->delete();
|
|
|
+// StationTask::query()
|
|
|
+// ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.id')??[])
|
|
|
+// ->delete();
|
|
|
+// StationRuleBatch::query()
|
|
|
+// ->whereIn('id',data_get($this->data['station_rule_batches'],'*.id')??[])
|
|
|
+// ->delete();
|
|
|
+// OrderCommodity::query()
|
|
|
+// ->whereIn('id',data_get($this->data['orderCommodities'],'*.id')??[])
|
|
|
+// ->delete();
|
|
|
+// Order::query()
|
|
|
+// ->whereIn('id',data_get($this->data['orders'],'*.id')??[])
|
|
|
+// ->delete();
|
|
|
+// Batch::query()
|
|
|
+// ->whereIn('id',data_get($this->data['batches'],'*.id')??[])
|
|
|
+// ->delete();
|
|
|
parent::tearDown();
|
|
|
}
|
|
|
}
|