| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Services;
- use App\Traits\ServiceAppAop;
- use App\StationCacheShelfGrid;
- class StationCacheShelfGridService
- {
- use ServiceAppAop;
- protected $modelClass = StationCacheShelfGrid::class;
- /**
- * 修改格口的状态
- * @param $stationCacheShelfGrid
- * @param $station
- * @param $materialBox
- */
- public function processGrid($stationCacheShelfGrid, $station, $materialBox)
- {
- $stationCacheShelfGrid->update(['station_id' => $station['id'], 'material_box_id' => $materialBox['id'], 'status' => 1]);
- }
- /**
- * 清空任务
- * @param $grids
- * @return bool
- */
- public function cancelTask($grids): bool
- {
- return $grids->update(['material_box_id' => null, 'status' => 0]) > 0;
- }
- }
|