LD пре 5 година
родитељ
комит
e6c1595b5b

+ 7 - 0
app/Http/Controllers/api/thirdPart/haiq/LightController.php

@@ -24,4 +24,11 @@ class LightController
     public function lightOff(Request $request){
     }
 
+    public function update(Request $request){
+        $success = $request->input('success');
+        $location = $success?200:0;
+        app('LogService')->log(__METHOD__,__FUNCTION__,json_encode($request->all()));
+        return ['location'=>$location,'errMsg'=>'','data'=>$request->all()];
+    }
+
 }

+ 17 - 16
app/Http/Controllers/api/thirdPart/haiq/StorageController.php

@@ -111,24 +111,24 @@ class StorageController
         $this->move = [[
             "taskMode"      => 3,
             "bins"=>[[
-                "taskCode"  =>"TESTINM-BS2011160024",
-                "binCode"   => "IDE0000054",
-                "fromLocCode" => "",
-                "toLocCode" => "HAIB2-01-02",
-            ],[
-                "taskCode"  =>"TESTINM-BS2011160023",
-                "binCode"   => "IDE0000004",
-                "fromLocCode" => "",
-                "toLocCode" => "HAIB2-01-01",
+                "taskCode"  =>"TESTINM-BS20111600243",
+                "binCode"   => "IDE0000006",
+                "fromLocCode" => "HAIB2-01-01",
+                "toLocCode" => "HAIB2-01-03",
             ],[
-                "taskCode"  =>"TESTINM-BS2011160022",
-                "binCode"   => "IDE0005683",
-                "fromLocCode" => "",
+                "taskCode"  =>"TESTINM-BS20111600233",
+                "binCode"   => "IDE0000098",
+                "fromLocCode" => "HAIB2-02-01",
                 "toLocCode" => "HAIB2-02-03",
+            ],[
+                "taskCode"  =>"TESTINM-BS20111600223",
+                "binCode"   => "IDE0005325",
+                "fromLocCode" => "HAIB2-03-01",
+                "toLocCode" => "HAIB2-03-03",
             ]],
-            "groupCode"     => 'WM12352',
+            "groupCode"     => 'WM4',
             "priority"      => 20,
-            "sequenceFlag"  => -1,
+            "sequenceFlag"  => 1,
         ]];
         $this->lightOn = [
             "areaCode"=> "1004",
@@ -149,10 +149,11 @@ class StorageController
                 "uomDesc01"=> "uo",
                 "uomDesc02"=> "uo"
             ],
-            "locCode"=> "1004-BZ04-01-01"
+            "locCode"=> "HAIB2-02-03"
         ];
         $this->lightOff = [
-            "locCode"=> "12G03-21",
+            "PTLAction"=> 0,
+            "locCode"=> "HAIB2-02-03"
         ];
     }
 

+ 3 - 0
app/Services/ForeignHaiRoboticsService.php

@@ -4,6 +4,8 @@
 namespace App\Services;
 
 
+use App\MaterialBox;
+use App\StationTaskMaterialBox;
 use Illuminate\Http\Request;
 
 class ForeignHaiRoboticsService
@@ -22,4 +24,5 @@ class ForeignHaiRoboticsService
     public function throwException(){
 
     }
+
 }

+ 1 - 1
app/Services/OwnerService.php

@@ -33,7 +33,7 @@ Class OwnerService
 
     public function getSelection($column = ['id'])
     {
-        return $this->cacheService->getOrExecute('OwnersAll_Id',function()use($column){
+        return $this->cacheService->getOrExecute('OwnersAll_'.md5(json_encode($column)),function()use($column){
             return Owner::filterAuthorities()->select($column)->get();
         },config('cache.expirations.owners'));
     }

+ 3 - 3
app/StationTask.php

@@ -13,15 +13,15 @@ class StationTask extends Model
         return $this->morphTo();
     }
 
-    public function taskCommodities()
+    public function stationTaskCommodities()
     {   //任务商品列表
         return $this->morphTo()->where("station_task_table_type","station_task_commodities");
     }
-    public function taskBatches()
+    public function stationTaskBatches()
     {   //任务波次 目前为单个,取值时应取第一个即可
         return $this->morphTo()->where("station_task_table_type","station_task_batches");
     }
-    public function taskMaterialBoxes()
+    public function stationTaskMaterialBoxes()
     {   //任务料箱
         return $this->morphTo()->where("station_task_table_type","station_task_material_boxes");
     }

+ 1 - 0
config/api.php

@@ -41,6 +41,7 @@ return [
      *  https://was.baoshi56.com/api/thirdPart/haiq/pickStation/processed  //标记料箱已处理
      *  https://was.baoshi56.com/api/thirdPart/haiq/storage/taskUpdate  //任务状态更新
      *  https://was.baoshi56.com/api/thirdPart/haiq/storage/exception  //异常通知
+     *  https://was.baoshi56.com/api/thirdPart/haiq/light/update  //拍灯通知
      */
     'haiq'=>[
         'storage'=>[

+ 3 - 0
routes/api/thirdPart/haiq.php

@@ -20,3 +20,6 @@ Route::group(['prefix'=>'storage'],function(){
 Route::group(['prefix'=>'pickStation'],function(){
     Route::post('processed', "PickStationController@processed");//移库
 });
+Route::group(['prefix'=>'light'],function(){
+    Route::post('update', "LightController@update");//移库
+});

+ 8 - 0
tests/webApi/thirdPart/haiq/storage.http

@@ -14,6 +14,14 @@ POST http://bswas/api/thirdPart/haiq/storage/moveBinIn
 POST http://bswas/api/thirdPart/haiq/storage/lightOn
 
 ###
+POST http://bswas/api/thirdPart/haiq/storage/lightOff
+
+###
+POST https://was.baoshi56.com/api/thirdPart/haiq/light/update
+Content-Type: application/json
+
+{"locCode":"2323"}
+###
 
 
 POST http://bswas/api/thirdPart/haiq/storage/taskUpdate