فهرست منبع

海柔U线出箱

LD 5 سال پیش
والد
کامیت
d90f33ad2e
2فایلهای تغییر یافته به همراه16 افزوده شده و 7 حذف شده
  1. 0 6
      app/Services/StationTaskBatchService.php
  2. 16 1
      app/Services/StationTaskMaterialBoxService.php

+ 0 - 6
app/Services/StationTaskBatchService.php

@@ -4,15 +4,9 @@
 namespace App\Services;
 
 
-use App\Batch;
 use App\Exceptions\ErrorException;
-use App\Log;
-use App\Station;
-use App\StationTask;
 use App\StationTaskBatch;
-use App\StationTaskBatchType;
 use Exception;
-use Illuminate\Foundation\Mix;
 use Illuminate\Support\Collection;
 use Illuminate\Support\Facades\Cache;
 use App\Traits\ServiceAppAop;

+ 16 - 1
app/Services/StationTaskMaterialBoxService.php

@@ -123,7 +123,22 @@ class StationTaskMaterialBoxService
     }
 
     function markTaken($stationTaskMaterialBox){
-            标记料箱任务为完成
+        try{
+            $taskType=$this->getServingTaskType($stationTaskMaterialBox);
+            switch ($taskType){
+                case '分波次':
+                    $this->markProcessing($stationTaskMaterialBox);
+                    $this->stationTaskBatchService->markProcessing($stationTaskMaterialBox['stationTaskBatch']);
+                    $this->stationTaskCommodityService->markProcessing($stationTaskMaterialBox['stationTaskCommodities']);
+                    break;
+                case '入立库':
+
+                    break;
+                case '入库':break;
+            }
+        }catch (\Exception $e){
+            throw new ErrorException('放置料箱出错');
+        }
     }
     function markProcessed(StationTaskMaterialBox $stationTaskMaterialBox){
         $stationTaskMaterialBox['status'] = '完成';