|
|
@@ -48,6 +48,27 @@ class StorageController
|
|
|
"priority" => 20,
|
|
|
"sequenceFlag" => -1,
|
|
|
]];
|
|
|
+ $this->lightOn = [
|
|
|
+ "areaCode"=> "1004",
|
|
|
+ "PTLAction"=> 1,
|
|
|
+ "PTLSettings"=> [
|
|
|
+ "color"=> 1,
|
|
|
+ "frequency"=> 1
|
|
|
+ ],
|
|
|
+ "displayInfo"=> [
|
|
|
+ "detail01"=> "detail01",
|
|
|
+ "detail02"=> "detail02",
|
|
|
+ "detail03"=> "detail03",
|
|
|
+ "qrCode"=> "qrCode",
|
|
|
+ "qty00"=> "qty00",
|
|
|
+ "qty01"=> 1,
|
|
|
+ "qty02"=> 2,
|
|
|
+ "title"=> "title",
|
|
|
+ "uomDesc01"=> "uo",
|
|
|
+ "uomDesc02"=> "uo"
|
|
|
+ ],
|
|
|
+ "locCode"=> "1004-BZ04-01-01"
|
|
|
+ ];
|
|
|
}
|
|
|
|
|
|
public function relocate(Request $request){
|
|
|
@@ -67,8 +88,28 @@ class StorageController
|
|
|
app('LogService')->log(__METHOD__,"haiq-料箱出库成功","REQUEST:".json_encode($this->request)." | RESPONSE:".$response);
|
|
|
return ["success"=>true];
|
|
|
}
|
|
|
+ public function light(Request $request,$post){
|
|
|
+ $response = Http::post(config('api.haiq.storage.moveBin'),$post);
|
|
|
+ if (!$response->ok()){
|
|
|
+ app('LogService')->log(__METHOD__,"haiq-请求失败,路径异常","REQUEST:".json_encode($this->post)." | RESPONSE:".$response);
|
|
|
+ return ['success'=>false,"data"=>$response->body()];
|
|
|
+ }
|
|
|
+ if (($response["code"] ?? false) && $response["code"] != 200){
|
|
|
+ app('LogService')->log(__METHOD__,"haiq-料箱出库失败","REQUEST:".json_encode($this->post)." | RESPONSE:".$response);
|
|
|
+ return ['success'=>false,"data"=>$response["errMsg"]];
|
|
|
+ }
|
|
|
+ if (($response["status"] ?? false) && $response["status"] == 500){
|
|
|
+ app('LogService')->log(__METHOD__,"haiq-料箱出库失败","REQUEST:".json_encode($this->post)." | RESPONSE:".$response);
|
|
|
+ return ['success'=>false,"data"=>$response["msg"]];
|
|
|
+ }
|
|
|
+ app('LogService')->log(__METHOD__,"haiq-料箱出库成功","REQUEST:".json_encode($this->post)." | RESPONSE:".$response);
|
|
|
+ return ["success"=>true];
|
|
|
+ }
|
|
|
public function moveBin(Request $request){
|
|
|
|
|
|
+ }
|
|
|
+ public function lightOn(Request $request){
|
|
|
+ return $this->relocate($request,$this->lightOn);
|
|
|
}
|
|
|
public function taskUpdate(Request $request){
|
|
|
$this->service->taskUpdate();
|