|
|
@@ -27,7 +27,7 @@ class CacheShelfService
|
|
|
*/
|
|
|
public function getTasks(Station $station)
|
|
|
{
|
|
|
- $grids = StationCacheShelfGrid::query()->with('materialBox:code')->where('station_id', $station['id'])->where('status', 1)->orderBy('grid_id')->get();
|
|
|
+ $grids = StationCacheShelfGrid::query()->with('materialBox')->where('station_id', $station['id'])->where('status', 1)->orderBy('grid_id')->get();
|
|
|
$station->setRelation('grids', $grids);
|
|
|
}
|
|
|
|
|
|
@@ -57,35 +57,35 @@ class CacheShelfService
|
|
|
return $this->foreignHaiRoboticsService->putBinToStore_fromCacheShelf($stationTaskMaterialBox);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 入库任务
|
|
|
- * @param $params
|
|
|
- */
|
|
|
- public function putBinToStoreFinish($params)
|
|
|
- {
|
|
|
- $this->instant($this->stationTaskMaterialBoxService,'StationTaskMaterialBoxService');
|
|
|
-
|
|
|
- $locCode = $params['locCode'];
|
|
|
-
|
|
|
- list($stationCode, $gridId) = StationCacheShelfGrid::getGridByCode($locCode);
|
|
|
- $station = Station::query()->where('code', $stationCode)->first();
|
|
|
-
|
|
|
- $stationCacheShelfGrid = StationCacheShelfGrid::query()->with('materialBox')->where('station_id', $station)->where('grid_id', $gridId)->first();
|
|
|
- $stationCacheShelfGrid->update(['status' => '0', 'material_box_id' => null]);
|
|
|
+// /**
|
|
|
+// * 入库任务
|
|
|
+// * @param $params
|
|
|
+// */
|
|
|
+// public function putBinToStoreFinish($params)
|
|
|
+// {
|
|
|
+// $this->instant($this->stationTaskMaterialBoxService,'StationTaskMaterialBoxService');
|
|
|
+//
|
|
|
+// $locCode = $params['locCode'];
|
|
|
+//
|
|
|
+// list($stationCode, $gridId) = StationCacheShelfGrid::getGridByCode($locCode);
|
|
|
+// $station = Station::query()->where('code', $stationCode)->first();
|
|
|
+//
|
|
|
+// $stationCacheShelfGrid = StationCacheShelfGrid::query()->with('materialBox')->where('station_id', $station)->where('grid_id', $gridId)->first();
|
|
|
+// $stationCacheShelfGrid->update(['status' => '0', 'material_box_id' => null]);
|
|
|
+//
|
|
|
+// $StationTaskMaterialBox = StationTaskMaterialBox::query()->where('station_id', $station['id'])->where('material_box_id', $stationCacheShelfGrid['$stationCacheShelfGrid'])->first();
|
|
|
+// $this->stationTaskMaterialBoxService->set($StationTaskMaterialBox, ['status' => '已完成']);
|
|
|
+// }
|
|
|
|
|
|
- $StationTaskMaterialBox = StationTaskMaterialBox::query()->where('station_id', $station['id'])->where('material_box_id', $stationCacheShelfGrid['$stationCacheShelfGrid'])->first();
|
|
|
- $this->stationTaskMaterialBoxService->set($StationTaskMaterialBox, ['status' => '已完成']);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 取消格口任务
|
|
|
- * @param Station $station
|
|
|
- * @param array $girds
|
|
|
- */
|
|
|
- public function cancelTask(Station $station, array $girds = [])
|
|
|
- {
|
|
|
- $gridQuery = StationCacheShelfGrid::query()->where('station_id', $station['id']);
|
|
|
- if (count($girds) > 0) $gridQuery->whereIn('grid_id', $girds);
|
|
|
- $this->stationCacheShelfGridService->cancelTask($gridQuery->get());
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 取消格口任务
|
|
|
+// * @param Station $station
|
|
|
+// * @param array $girds
|
|
|
+// */
|
|
|
+// public function cancelTask(Station $station, array $girds = [])
|
|
|
+// {
|
|
|
+// $gridQuery = StationCacheShelfGrid::query()->where('station_id', $station['id']);
|
|
|
+// if (count($girds) > 0) $gridQuery->whereIn('grid_id', $girds);
|
|
|
+// $this->stationCacheShelfGridService->cancelTask($gridQuery->get());
|
|
|
+// }
|
|
|
}
|