|
|
@@ -54,7 +54,7 @@ class StorageController extends Controller
|
|
|
//建立入库任务
|
|
|
if (!app("StorageService")->putWareHousing($fromLocation,$box->id))$this->error("错误库位或库位已被下达任务");
|
|
|
//库存记录
|
|
|
- app("StorageService")->enterWarehouse($station->id, $box->id, $item->commodity_id ?? null, $amount, $box->material_box_model_id);
|
|
|
+ if (!app("StorageService")->enterWarehouse($station->id, $box->id, $item->commodity_id ?? null, $amount, $box->material_box_model_id))$this->error("库存异常");
|
|
|
|
|
|
DB::connection("oracle")->transaction(function ()use($asns,$ide){ //单体嵌套事务 回滚FLUX失败任务
|
|
|
foreach ($asns as $asn)if (!app("StorageService")->fluxPA($asn,$ide,(int)$asn->fmqty)){
|
|
|
@@ -127,6 +127,12 @@ 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([
|
|
|
+ "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([
|