Commit 90081602 by Joneq

提交代码

parent 9fb86b7c
Showing with 15 additions and 7 deletions
...@@ -258,21 +258,29 @@ class PalletLogic ...@@ -258,21 +258,29 @@ class PalletLogic
throw new \Exception('装箱型号不能为空'); throw new \Exception('装箱型号不能为空');
} }
//查找出所有的拣货详情
$outStoreDetailIdArr = PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->pluck('out_store_detail_id')->toArray();
if (empty($outStoreDetailIdArr)){
throw new \Exception('查找不到拣货详情');
}
//如果是新箱子就生成一个下架箱子 //如果是新箱子就生成一个下架箱子
if ($data['pack_type'] != 2){ if ($data['pack_type'] != 2){
$data['pack_val'] = $boxSn = BoxModel::getBoxSn(); $data['pack_val'] = $boxSn = BoxModel::getBoxSn();
$isInsp = OutStoreDetailModel::whereIn('out_store_detail_id',$outStoreDetailIdArr)->where('is_insp',1)->value('out_store_detail_id');
if (empty($isInsp)){
$isInsp = 2;
}else{
$isInsp = 1;
}
BoxModel::insertGetId([ BoxModel::insertGetId([
'box_sn'=>$boxSn,'weight'=>$data['weigh_val'],'status'=>3, 'box_sn'=>$boxSn,'weight'=>$data['weigh_val'],'status'=>3,'is_insp'=>$isInsp,
'add_time'=>time(),'admin_id'=>CommonLogic::getAdminInfo()['admin_id'],'admin_name'=>CommonLogic::getAdminInfo()['admin_name'], 'add_time'=>time(),'last_update_time'=>time(),'admin_id'=>CommonLogic::getAdminInfo()['admin_id'],'admin_name'=>CommonLogic::getAdminInfo()['admin_name'],
'store_id'=>CommonLogic::getAdminInfo()['store_id'],'customer_id'=>OutStoreModel::where('out_store_id',PickTaskDetailModel::where('pick_task_detail_id',$pickTaskDetailIdArr[0])->value('out_store_id'))->value('customer_id') 'store_id'=>CommonLogic::getAdminInfo()['store_id'],'customer_id'=>OutStoreModel::where('out_store_id',PickTaskDetailModel::where('pick_task_detail_id',$pickTaskDetailIdArr[0])->value('out_store_id'))->value('customer_id')
]); ]);
} }
//查找出所有的拣货详情
$outStoreDetailIdArr = PickTaskDetailModel::whereIn('pick_task_detail_id',$pickTaskDetailIdArr)->pluck('out_store_detail_id')->toArray();
if (empty($outStoreDetailIdArr)){
throw new \Exception('查找不到拣货详情');
}
//查找出当前箱子信息 //查找出当前箱子信息
if (empty($boxId = BoxModel::where('box_sn',$data['pack_val'])->value('box_id'))){ if (empty($boxId = BoxModel::where('box_sn',$data['pack_val'])->value('box_id'))){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment