|
|
@@ -51,8 +51,7 @@ class StorageController extends Controller
|
|
|
//此处嵌套三层事务 以最高层级为准
|
|
|
DB::beginTransaction(); //总体事务 回滚WAS错误操作
|
|
|
try{
|
|
|
- //建立入库任务
|
|
|
- if (!app("StorageService")->putWareHousing($fromLocation,$box->id))$this->error("错误库位或库位已被下达任务");
|
|
|
+ //if (!app("StorageService")->putWareHousing($fromLocation,$box->id))$this->error("错误库位或库位已被下达任务");
|
|
|
//库存记录
|
|
|
if (!app("StorageService")->enterWarehouse($station->id, $box->id, $item->commodity_id ?? null, $amount, $box->material_box_model_id))$this->error("库存异常");
|
|
|
|
|
|
@@ -127,13 +126,13 @@ class StorageController extends Controller
|
|
|
$data .= "存在任务待处理,无法释放";
|
|
|
$boxes = array_values($boxes);
|
|
|
$station = Station::query()->select("id")->whereIn("code",$boxes);
|
|
|
- //清除海柔信息,标记料箱为出库
|
|
|
- DB::connection("mysql_haiRobotics")->table("ks_bin")->whereIn("ks_bin_space_code",$boxes)
|
|
|
- ->where("status",1)->update([
|
|
|
+ }
|
|
|
+ //清除海柔信息,标记料箱为出库
|
|
|
+ DB::connection("mysql_haiRobotics")->table("ks_bin")->whereIn("ks_bin_space_code",$boxes)
|
|
|
+ ->where("status",1)->update([
|
|
|
"ks_bin_space_code" => null,"ks_bin_space_id"=>null,"orig_ks_bin_space_code"=>null,"orig_ks_bin_space_id"=>null,
|
|
|
"status"=>4,
|
|
|
]);
|
|
|
- }
|
|
|
$task = StationTask::query()->select("id")->where("status","!=",'完成')->whereIn("station_id",$station);
|
|
|
StationTaskMaterialBox::query()->where("status","!=",'完成')->whereIn("station_task_id",$task)->update([
|
|
|
"status" => "完成"
|