Commit 87adb5a7 by 杨树贤

优化同步

parent 2aa2c508
Showing with 6 additions and 1 deletions
...@@ -181,8 +181,13 @@ class SyncSupplierService ...@@ -181,8 +181,13 @@ class SyncSupplierService
//$sourceSn不为空的话,就是代表这是第一次新增的供应商,所以会回传供应商id过来 //$sourceSn不为空的话,就是代表这是第一次新增的供应商,所以会回传供应商id过来
if ($sourceSn) { if ($sourceSn) {
$data['supplier_name'] = $syncResult['company_name']; $data['supplier_name'] = $syncResult['company_name'];
return SupplierChannelModel::where('supplier_id', $supplierId) $result = SupplierChannelModel::where('supplier_id', $supplierId)
->update($data); ->update($data);
if ($result) {
//再次同步供应商到金蝶
$this->syncSupplierToErp($supplierId);
}
return $result;
} else { } else {
return SupplierChannelModel::where('group_code', $groupCode) return SupplierChannelModel::where('group_code', $groupCode)
->update($data); ->update($data);
......
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