|
@@ -58,7 +58,7 @@ class handleCxData extends command
|
|
|
->field('id,status')->findOrEmpty();
|
|
|
$all_branch = Db::name('customer_info')
|
|
|
->whereIn('companyNo', $data['customer_code'])
|
|
|
- ->column('branch', 'companyNo');
|
|
|
+ ->column('branch,parent', 'companyNo');
|
|
|
//已存在
|
|
|
if (!empty($exists_qrd)) {
|
|
|
if ($exists_qrd['status'] == 0) {
|
|
@@ -133,8 +133,8 @@ class handleCxData extends command
|
|
|
'diff_weight' => $data['diff_weight'],//工差重量,
|
|
|
'diff_fee' => $data['diff_fee'],//工差金额,
|
|
|
'area' => $data['customer_name'],//公司,
|
|
|
- 'customerAttr' => $data['platform_id'],//客户属性,
|
|
|
- 'branch' => $all_branch[$data['customer_code']] ?? '',//分公司,从客户表中查
|
|
|
+ 'customerAttr' =>$all_branch[$data['customer_code']]['parent'] ?? '',//客户属性,
|
|
|
+ 'branch' => $all_branch[$data['customer_code']]['branch'] ?? '',//分公司,从客户表中查
|
|
|
'cgdNo' => $data['cgdNo'],//采购单号,
|
|
|
'thNum' => $data['th_num'],//退货数量,
|
|
|
'th_fee' => $data['th_fee'],//退货金额,
|
|
@@ -218,8 +218,8 @@ class handleCxData extends command
|
|
|
'diff_weight' => $data['diff_weight'],//工差重量,
|
|
|
'diff_fee' => $data['diff_fee'],//工差金额,
|
|
|
'area' => $data['customer_name'],//公司,
|
|
|
- 'customerAttr' => $data['platform_id'],//客户属性,
|
|
|
- 'branch' => $all_branch[$data['customer_code']] ?? '',//分公司,从客户表中查
|
|
|
+ 'customerAttr' => $all_branch[$data['customer_code']]['parent'],//客户属性,
|
|
|
+ 'branch' => $all_branch[$data['customer_code']]['branch'] ?? '',//分公司,从客户表中查
|
|
|
'cgdNo' => $data['cgdNo'],//采购单号,
|
|
|
'thNum' => $data['th_num'],//退货数量,
|
|
|
'th_fee' => $data['th_fee'],//退货金额,
|