Commit 111b4b5f by 杨树贤

同步供应商的的采购员换成金蝶的编码

parent df20c204
Showing with 3 additions and 3 deletions
...@@ -49,7 +49,7 @@ class SyncSupplierService ...@@ -49,7 +49,7 @@ class SyncSupplierService
} }
$contactModel = new SupplierContactModel(); $contactModel = new SupplierContactModel();
$contact = $contactModel->where('supplier_id', $supplier['supplier_id'])->orderBy('contact_id', 'asc')->first(); $contact = $contactModel->where('supplier_id', $supplier['supplier_id'])->orderBy('contact_id', 'asc')->first();
$purchases = $this->getPurchases($supplier['channel_uid']); $purchases = $this->getUserCodeSn($supplier['channel_uid']);
$message = [ $message = [
'name' => $supplier['supplier_name'], 'name' => $supplier['supplier_name'],
'PTID' => $supplier['supplier_code'], 'PTID' => $supplier['supplier_code'],
...@@ -92,14 +92,14 @@ class SyncSupplierService ...@@ -92,14 +92,14 @@ class SyncSupplierService
} }
//获取采购人员列表 //获取采购人员列表
private function getPurchases($purchaseUid) private function getUserCodeSn($purchaseUid)
{ {
$purchaseUid = explode(',', $purchaseUid); $purchaseUid = explode(',', $purchaseUid);
if (empty($purchaseUid)) { if (empty($purchaseUid)) {
return []; return [];
} }
$adminIds = DB::connection()->table('lie_intracode')->whereIn('code_id', $purchaseUid)->pluck('admin_id'); $adminIds = DB::connection()->table('lie_intracode')->whereIn('code_id', $purchaseUid)->pluck('admin_id');
return DB::connection()->table('user_info')->whereIn('userId', $adminIds)->pluck('name'); return DB::connection()->table('user_info')->whereIn('userId', $adminIds)->pluck('code_sn');
} }
/** /**
......
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