|
@@ -14,6 +14,13 @@ class StationCacheShelfGridService
|
|
|
|
|
|
|
|
protected $modelClass = StationCacheShelfGrid::class;
|
|
protected $modelClass = StationCacheShelfGrid::class;
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * processGrid 格口上放入料箱
|
|
|
|
|
+ * lightOff 解析HaiQ格口灭灯请求 完成格口上的任务 进行灭灯完成后的广播
|
|
|
|
|
+ * cancelTask 完成格口上的任务
|
|
|
|
|
+ * lightOn 发送给HaiQ的格口亮灯
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 修改格口的状态
|
|
* 修改格口的状态
|
|
|
* @param $stationCacheShelfGrid
|
|
* @param $stationCacheShelfGrid
|
|
@@ -36,7 +43,7 @@ class StationCacheShelfGridService
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 格口灭灯
|
|
|
|
|
|
|
+ * 格口灭灯完成后的广播
|
|
|
* @param $locCode
|
|
* @param $locCode
|
|
|
* @param $PTLAction
|
|
* @param $PTLAction
|
|
|
*/
|
|
*/
|
|
@@ -45,6 +52,8 @@ class StationCacheShelfGridService
|
|
|
if ($PTLAction == '0') {
|
|
if ($PTLAction == '0') {
|
|
|
list($stationCode, $gridId, $x, $y) = StationCacheShelfGrid::getGridByCode($locCode);
|
|
list($stationCode, $gridId, $x, $y) = StationCacheShelfGrid::getGridByCode($locCode);
|
|
|
$station = Station::query()->where('code', $stationCode)->first();
|
|
$station = Station::query()->where('code', $stationCode)->first();
|
|
|
|
|
+ $gird = StationCacheShelfGrid::query()->where('station_id',$station['id'])->where('grid_id',$gridId)->first();
|
|
|
|
|
+ $this->cancelTask($gird);
|
|
|
$json = json_encode([
|
|
$json = json_encode([
|
|
|
'code' => $stationCode,
|
|
'code' => $stationCode,
|
|
|
'x' => $x,
|
|
'x' => $x,
|
|
@@ -57,6 +66,13 @@ class StationCacheShelfGridService
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 通知HaiQ亮灯
|
|
|
|
|
+ * @param Station $station
|
|
|
|
|
+ * @param $pointX
|
|
|
|
|
+ * @param $pointY
|
|
|
|
|
+ * @return string
|
|
|
|
|
+ */
|
|
|
public function lightOn(Station $station, $pointX, $pointY)
|
|
public function lightOn(Station $station, $pointX, $pointY)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
@@ -82,9 +98,9 @@ class StationCacheShelfGridService
|
|
|
],
|
|
],
|
|
|
"locCode" => $locCode//灯条口,B1\B2=设备编号,中间号码代表从右往左数的列,右边号码时从下往上数
|
|
"locCode" => $locCode//灯条口,B1\B2=设备编号,中间号码代表从右往左数的列,右边号码时从下往上数
|
|
|
];
|
|
];
|
|
|
- LogService::log(__METHOD__,'海柔亮灯请求',json_encode($params));
|
|
|
|
|
|
|
+// LogService::log(__METHOD__,'海柔亮灯请求',json_encode($params));
|
|
|
$response = Http::post(config('api.haiq.storage.light'), $params);
|
|
$response = Http::post(config('api.haiq.storage.light'), $params);
|
|
|
- LogService::log(__METHOD__,'海柔亮灯请求返回',json_encode($params));
|
|
|
|
|
|
|
+// LogService::log(__METHOD__,'海柔亮灯请求返回',json_encode($params));
|
|
|
return $response->body();
|
|
return $response->body();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|