Commit e6777273 by 杨树贤

修复冲突

parents c8df72e5 111b4b5f
...@@ -1262,7 +1262,7 @@ class DataService ...@@ -1262,7 +1262,7 @@ class DataService
$first = $stockInItem['stock_in_item_id']; $first = $stockInItem['stock_in_item_id'];
dd($first, $stockInItem['stock_in_id']); dd($first, $stockInItem['stock_in_id']);
StockInItemModel::where('stock_in_item_id', $first)->update([ StockInItemModel::where('stock_in_item_id', $first)->update([
'item_status' => 1 'item_status' => 1``
]); ]);
StockInModel::where('stock_in_id', $stockInItem['stock_in_id'])->update([ StockInModel::where('stock_in_id', $stockInItem['stock_in_id'])->update([
'erp_stock_in_sn' => '', 'erp_stock_in_sn' => '',
...@@ -1271,4 +1271,9 @@ class DataService ...@@ -1271,4 +1271,9 @@ class DataService
} }
dd(count((array_column($stockInItems, 'stock_in_item_id')))); dd(count((array_column($stockInItems, 'stock_in_item_id'))));
} }
public function deleteSupplierAccount()
{
SupplierAccountModel::where('id', 54)->delete();
}
} }
\ No newline at end of file
...@@ -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');
} }
/** /**
......
...@@ -67,7 +67,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function () ...@@ -67,7 +67,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
}); });
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
// (new \App\Http\Services\DataService())->initialMainBrandsLimit(); (new \App\Http\Services\DataService())->deleteSupplierAccount();
// \App\Model\SupplierChannelModel::where('supplier_name', '深圳市金开盛电子有限公司')->update([ // \App\Model\SupplierChannelModel::where('supplier_name', '深圳市金开盛电子有限公司')->update([
// 'status' => 2, // 'status' => 2,
// 'update_time' => time(), // 'update_time' => time(),
......
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