|
|
@@ -67,6 +67,9 @@ class StorageService
|
|
|
"station_id" => $stationTaskMaterialBox->station_id,
|
|
|
"material_box_id" => $stationTaskMaterialBox->material_box_id,
|
|
|
]);
|
|
|
+ $stationTaskMaterialBox->loadMissing("station");
|
|
|
+ //清理原有任务
|
|
|
+ app("StorageService")->clearTask([$stationTaskMaterialBox->station->code]);
|
|
|
DB::commit();
|
|
|
}catch (\Exception $e){
|
|
|
DB::rollBack();
|
|
|
@@ -87,8 +90,6 @@ class StorageService
|
|
|
if ($storage->status == 1)$update["status"] = 0;
|
|
|
if ($storage->station_id)$update["station_id"] = null;
|
|
|
if ($update)$storage->update($update);
|
|
|
- //一号缓存架操作完下达补充料箱
|
|
|
- if ($stationTaskMaterialBox->station->parent_id == 6)app("ForeignHaiRoboticsService")->paddingCacheShelf(Station::query()->where("code",$stationTaskMaterialBox->station_id)->get());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -133,7 +134,6 @@ class StorageService
|
|
|
DB::connection("oracle")->rollBack();
|
|
|
return false;
|
|
|
};
|
|
|
- DB::connection("oracle")->commit();
|
|
|
}catch(\Exception $e){
|
|
|
DB::connection("oracle")->rollBack();
|
|
|
return false;
|
|
|
@@ -148,9 +148,11 @@ class StorageService
|
|
|
$collection = new Collection([$taskMaterialBox]);
|
|
|
app("ForeignHaiRoboticsService")->fetchGroup($station->code,$collection,'','缓存架入立架'); //呼叫机器人入库
|
|
|
DB::commit();
|
|
|
+ DB::connection("oracle")->commit();
|
|
|
return true;
|
|
|
}catch(\Exception $e){
|
|
|
DB::rollBack();
|
|
|
+ DB::connection("oracle")->rollBack();
|
|
|
return false;
|
|
|
}
|
|
|
}
|