Procházet zdrojové kódy

getSelection缓存修复

LD před 5 roky
rodič
revize
b06ba5d76f

+ 37 - 0
app/Services/ForeignHaiRoboticsService.php

@@ -10,6 +10,43 @@ use Illuminate\Http\Request;
 
 class ForeignHaiRoboticsService
 {
+    private function makeJson_move(
+        $modeName,
+        $fromLocation,
+        $toLocation,
+        $materialBoxes,
+        $groupId=''
+        ,$priority=10
+        , $isSequenced=1
+    ){
+        $timestampSuffix = microtime(true);
+        $taskMode=(function()use($modeName){
+            switch ($modeName){
+                case '输送线入库': return 1;
+                case '库出至输送线': return 2;
+                case '移动位置': return 3;
+                case '缓存架入库': return 6;
+                default: throw new \Exception('发至海柔的移料箱请求,模式不存在');
+            }
+        })();
+        $bins=$materialBoxes->map(function (MaterialBox $materialBox){
+            return [
+
+            ];
+        });
+        $groupId .= $timestampSuffix;
+        $groupId .= $timestampSuffix;
+        $json=[
+            "taskCode"  =>$taskMode,
+            "bins"=>$bins,
+            "groupCode"=>$groupId,
+            "priority"=>$priority,
+            "sequenceFlag"=>$isSequenced,
+        ];
+    }
+    public function fetchGroupToLocation($toLocation,StationTaskMaterialBox $taskMaterialBoxes, $groupIdPrefix=''){
+
+    }
 
     public function moveBin(){
 

+ 3 - 0
app/Services/StationTaskBatchService.php

@@ -26,12 +26,15 @@ class StationTaskBatchService
     private $stationTypeService;
     /** @var StationTaskService $stationTaskService */
     private $stationTaskService;
+    /** @var ForeignHaiRoboticsService $foreignHaiRoboticsService */
+    private $foreignHaiRoboticsService;
     public function __construct(){
         $this->stationService=null;
         $this->stationTypeService=null;
         $this->stationTaskBatchTypeService=null;
         $this->batchService=null;
         $this->stationTaskService=null;
+        $this->foreignHaiRoboticsService=null;
     }
 
     /**

+ 8 - 0
app/StationTaskBatch.php

@@ -9,6 +9,14 @@ class StationTaskBatch extends Model
 {
     protected $fillable=['batch_id','station_id','station_task_batch_type_id','status'];
 
+    function station(): HasOne
+    {
+        return $this->hasOne(Station::class);
+    }
+    function parentTask(){
+        return $this->morphOne(StationTask::class,'station_taskable');
+    }
+
     public function batch()
     {   //波次
         return $this->hasOne(Batch::class,"id","batch_id");