Commit 0e015fc6 by 杨树贤

先同步修改的

parent 3e63a66a
Showing with 2 additions and 2 deletions
...@@ -657,7 +657,6 @@ class DataService ...@@ -657,7 +657,6 @@ class DataService
12577 => 'INELTEK Industrieelektronik und Technologien Ges.m.b.H.', 12577 => 'INELTEK Industrieelektronik und Technologien Ges.m.b.H.',
]; ];
foreach ($map as $key => $value) { foreach ($map as $key => $value) {
dd($key, $value);
SupplierChannelModel::where('supplier_id', $key)->update(['supplier_name' => $value]); SupplierChannelModel::where('supplier_id', $key)->update(['supplier_name' => $value]);
(new SyncSupplierService())->syncSupplierToUnited($key); (new SyncSupplierService())->syncSupplierToUnited($key);
} }
...@@ -665,7 +664,8 @@ class DataService ...@@ -665,7 +664,8 @@ class DataService
public function reSyncSupplierToErp() public function reSyncSupplierToErp()
{ {
$suppliers = SupplierChannelModel::select(['supplier_id','supplier_name'])->where('is_type', 0)->get()->toArray(); // $suppliers = SupplierChannelModel::select(['supplier_id','supplier_name'])->where('is_type', 0)->get()->toArray();
$suppliers = \DB::connection('web')->select('SELECT a.* FROM lie_supplier_channel a INNER JOIN (SELECT supplier_name FROM lie_supplier_channel GROUP BY supplier_name HAVING COUNT(supplier_id) > 1) b ON a.supplier_name = b.supplier_name ORDER BY supplier_name DESC');
foreach ($suppliers as $supplier) { foreach ($suppliers as $supplier) {
if (!empty($supplier['supplier_name'])) { if (!empty($supplier['supplier_name'])) {
echo "同步供应商到金蝶 : " . $supplier['supplier_name'] . PHP_EOL; echo "同步供应商到金蝶 : " . $supplier['supplier_name'] . PHP_EOL;
......
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