|
@@ -89,7 +89,10 @@ class BoxService extends Service
|
|
|
$detail = $num_list['detail'];
|
|
|
$team_id = $num_list['team_id'];
|
|
|
$un_box_num = bcsub($v['dispatch_complete_quantity'] , $v['box_num'],3);
|
|
|
- if ($total > $un_box_num) return [false, $v['product_title'] . ' ' . $v['technology_name'] . ' 可包装的数量不足'];
|
|
|
+ if ($total > $un_box_num) {
|
|
|
+ $this->dellimitingSendRequestBackgNeed($limit_key);
|
|
|
+ return [false, $v['product_title'] . ' ' . $v['technology_name'] . ' 可包装的数量不足'];
|
|
|
+ }
|
|
|
|
|
|
$ext_1 = $v['product_no'];//产品编号
|
|
|
$ext_2 = $v['technology_material']; //工艺材质 废弃
|
|
@@ -192,11 +195,11 @@ class BoxService extends Service
|
|
|
}
|
|
|
|
|
|
//更新完工数量
|
|
|
- list($status, $msg) = $this->updateFinish($product_list,$key_list);
|
|
|
+ list($status, $msg1) = $this->updateFinish($product_list,$key_list);
|
|
|
if(! $status) {
|
|
|
$this->dellimitingSendRequestBackgNeed($limit_key);
|
|
|
DB::rollBack();
|
|
|
- return [false,$msg];
|
|
|
+ return [false,$msg1];
|
|
|
}
|
|
|
|
|
|
//用友 ------产成品入库
|
|
@@ -214,13 +217,17 @@ class BoxService extends Service
|
|
|
DB::commit();
|
|
|
$this->dellimitingSendRequestBackgNeed($limit_key);
|
|
|
return [true, ['package_data' => $package_data]];
|
|
|
- }catch (\Exception $e){
|
|
|
+ }catch (\Throwable $e){
|
|
|
DB::rollBack();
|
|
|
$this->dellimitingSendRequestBackgNeed($limit_key);
|
|
|
return [false,$e->getLine().':'.$e->getMessage()];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function delBoxLock(){
|
|
|
+ $this->dellimitingSendRequestBackgNeed($this->lock_key);
|
|
|
+ }
|
|
|
+
|
|
|
public function updateFinish($production_list = [], $map){
|
|
|
if(empty($production_list)) return [true,''];
|
|
|
|
|
@@ -431,7 +438,7 @@ class BoxService extends Service
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 根据发货单包装(恒诚塑业不需要 如果有调用 直接返回)
|
|
|
+ * 根据发货单包装(恒成塑业不需要 如果有调用 直接返回)
|
|
|
* @param $data
|
|
|
* @return array
|
|
|
*/
|
|
@@ -779,9 +786,13 @@ class BoxService extends Service
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $list = $list->select('top_order_no','order_no','crt_time','shipment_order_no')->where('del_time',0)
|
|
|
+ $list = $list->select('top_order_no','order_no as box_no','crt_time','shipment_order_no')->where('del_time',0)
|
|
|
->get()->toArray();
|
|
|
|
|
|
+ foreach ($list as $key => $value){
|
|
|
+ $list[$key]['crt_time'] = date('Y-m-d H:i:s',$value['crt_time']);
|
|
|
+ }
|
|
|
+
|
|
|
return [true,$list];
|
|
|
}
|
|
|
|