|
|
@@ -78,6 +78,7 @@ class AssignTasksTest extends TestCase
|
|
|
{
|
|
|
$this->service->assignTasks($this->data['batches']);
|
|
|
($波次任务指向了波次=function(){
|
|
|
+ $this->data['batches']->load('stationTaskBatch');
|
|
|
$this->assertEquals(
|
|
|
data_get($this->data['batches'],'*.id'),
|
|
|
data_get($this->data['batches'],'*.stationTaskBatch.batch_id')
|
|
|
@@ -87,39 +88,39 @@ class AssignTasksTest extends TestCase
|
|
|
|
|
|
function tearDown(): void
|
|
|
{
|
|
|
- $stationTaskBatchs=data_get($this->data['batches'],'*.stationTaskBatch');
|
|
|
- foreach ($stationTaskBatchs as $stationTaskBatch){
|
|
|
- $stationTaskBatch->loadMissing('stationTask.stationTaskCommodities');
|
|
|
- $stationTaskBatch->loadMissing('stationTask.stationTaskMaterialBoxes.materialBox');
|
|
|
- }
|
|
|
+// $stationTaskBatchs=data_get($this->data['batches'],'*.stationTaskBatch');
|
|
|
+// foreach ($stationTaskBatchs as $stationTaskBatch){
|
|
|
+// $stationTaskBatch->loadMissing('stationTask.stationTaskCommodities');
|
|
|
+// $stationTaskBatch->loadMissing('stationTask.stationTaskMaterialBoxes.materialBox');
|
|
|
+// }
|
|
|
|
|
|
- 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();
|
|
|
}
|
|
|
}
|