|
|
@@ -172,10 +172,7 @@ class StationTaskMaterialBoxService
|
|
|
$stationTaskMaterialBox->materialBox->update();
|
|
|
break;
|
|
|
case '入立库':
|
|
|
- $this->set($stationTaskMaterialBox,[
|
|
|
- 'id' => $stationTaskMaterialBox['station_id'],
|
|
|
- 'status' => '完成',
|
|
|
- ]);
|
|
|
+ $this->taskCompleted($stationTaskMaterialBox);
|
|
|
$this->cacheShelfService->putStationTaskMaterialBoxProcess($stationTaskMaterialBox);
|
|
|
$stationTaskMaterialBox->materialBox['status']='在立库';
|
|
|
$stationTaskMaterialBox->materialBox->update();
|
|
|
@@ -184,6 +181,7 @@ class StationTaskMaterialBoxService
|
|
|
$this->storageService->checkMark($stationTaskMaterialBox); //检查标记并做一些特殊处理
|
|
|
break;
|
|
|
case '入缓存架':
|
|
|
+ $this->taskCompleted($stationTaskMaterialBox);
|
|
|
$stationTaskMaterialBox->materialBox['status']='在缓存架';
|
|
|
$stationTaskMaterialBox->materialBox->update();
|
|
|
$this->storageService->putCacheShelf($stationTaskMaterialBox);
|
|
|
@@ -195,6 +193,20 @@ class StationTaskMaterialBoxService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private function taskCompleted($stationTaskMaterialBox)
|
|
|
+ {
|
|
|
+ $this->set($stationTaskMaterialBox,[
|
|
|
+ 'id' => $stationTaskMaterialBox['station_id'],
|
|
|
+ 'status' => '完成',
|
|
|
+ ]);
|
|
|
+ if (!$stationTaskMaterialBox->station_task_id)return;
|
|
|
+ $task = StationTaskMaterialBox::query()->select(DB::raw(1))
|
|
|
+ ->where("station_task_id",$stationTaskMaterialBox->station_task_id)
|
|
|
+ ->where("status","!=","完成")->first();
|
|
|
+ if (!$task)StationTask::query()->where("id",$stationTaskMaterialBox->station_task_id)
|
|
|
+ ->update(["status"=>"完成"]);
|
|
|
+ }
|
|
|
+
|
|
|
// TODO 料箱处理
|
|
|
function markHasTaken($stationTaskMaterialBox)
|
|
|
{
|