|
|
@@ -14,6 +14,7 @@ use App\StationRuleBatch;
|
|
|
use App\StationTask;
|
|
|
use App\StationTaskBatch;
|
|
|
use App\StationTaskCommodity;
|
|
|
+use App\StationTaskMaterialBox;
|
|
|
use Tests\TestCase;
|
|
|
use App\Batch;
|
|
|
use App\Traits\TestMockSubServices;
|
|
|
@@ -79,43 +80,45 @@ class AssignTasksTest extends TestCase
|
|
|
($波次任务指向了波次=function(){
|
|
|
$this->assertEquals(
|
|
|
data_get($this->data['batches'],'*.id'),
|
|
|
- data_get($this->data['batches'],'*.stationBatchTask.batch_id')
|
|
|
+ data_get($this->data['batches'],'*.stationTaskBatch.batch_id')
|
|
|
);
|
|
|
})();
|
|
|
}
|
|
|
|
|
|
function tearDown(): void
|
|
|
{
|
|
|
-
|
|
|
- $stationBatchTasks=data_get($this->data['batches'],'*.stationBatchTask');
|
|
|
- $a3=data_get($this->data['batches'],'*.stationBatchTask.*.stationTask');
|
|
|
- $a4=data_get($this->data['batches'],'*.stationBatchTask.stationTask');
|
|
|
- foreach ($stationBatchTasks as $stationBatchTask){
|
|
|
- $stationBatchTask->loadMissing('stationTask.stationTaskCommodities');
|
|
|
- $stationBatchTask->loadMissing('stationTask.stationTaskMaterialBoxes.materialBox');
|
|
|
+ $stationTaskBatchs=data_get($this->data['batches'],'*.stationTaskBatch');
|
|
|
+ foreach ($stationTaskBatchs as $stationTaskBatch){
|
|
|
+ $stationTaskBatch->loadMissing('stationTask.stationTaskCommodities');
|
|
|
+ $stationTaskBatch->loadMissing('stationTask.stationTaskMaterialBoxes.materialBox');
|
|
|
}
|
|
|
- $a13=data_get($this->data['batches'],'*.stationBatchTask.*.stationTask');
|
|
|
- $a14=data_get($this->data['batches'],'*.stationBatchTask.stationTask');
|
|
|
- Batch::query()
|
|
|
- ->whereIn('id',data_get($this->data['batches'],'*.id')??[])
|
|
|
- ->delete();
|
|
|
-// StationTaskBatch::query()
|
|
|
-// ->whereIn('id',data_get($this->data['batches'],'*.stationBatchTask.id')??[])
|
|
|
+
|
|
|
+// 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'],'*.stationBatchTask.*.stationTask.*.stationTaskCommodities.id')??[])
|
|
|
+ ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.stationTask.stationTaskCommodities.*.id')??[])
|
|
|
->delete();
|
|
|
- StationTask::query()
|
|
|
- ->whereIn('id',data_get($this->data['batches'],'*.stationBatchTask.stationTask.id')??[])
|
|
|
+ StationTaskBatch::query()
|
|
|
+ ->whereIn('id',data_get($this->data['batches'],'*.stationTaskBatch.id')??[])
|
|
|
->delete();
|
|
|
- Order::query()
|
|
|
- ->whereIn('id',data_get($this->data['orders'],'*.id')??[])
|
|
|
+// 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();
|
|
|
- StationRuleBatch::query()
|
|
|
- ->whereIn('id',data_get($this->data['station_rule_batches'],'*.id')??[])
|
|
|
+ Order::query()
|
|
|
+ ->whereIn('id',data_get($this->data['orders'],'*.id')??[])
|
|
|
+ ->delete();
|
|
|
+ Batch::query()
|
|
|
+ ->whereIn('id',data_get($this->data['batches'],'*.id')??[])
|
|
|
->delete();
|
|
|
parent::tearDown();
|
|
|
}
|