|
|
@@ -55,7 +55,9 @@ class CacheShelfService
|
|
|
*/
|
|
|
public function lightOffTask($locCode, $PTLAction): array
|
|
|
{
|
|
|
- $station = Station::query()->with('pendingStationTask.stationTaskMaterialBoxes.materialBox')->where('code', $locCode)->first();
|
|
|
+ $station = Station::query()->with(['pendingStationTask.stationTaskMaterialBoxes.materialBox','storage'=>function(Builder $query){
|
|
|
+ $query->whereNotNull("material_box_id")->orderByDesc("updated_at");
|
|
|
+ }])->where('code', $locCode)->first();
|
|
|
//站存在 站为缓存架2 站为蓝灯状态
|
|
|
if ($station && $station->parent_id==7){
|
|
|
if (!Storage::query()->where("station_id",$station->id)->whereNotNull("material_box_id")->first())return ['success' => false, 'errMsg' => "任务执行中,不允许灭灯"];
|