Commit 3f126e3e by 杨树贤

补充数据

parent e1c83451
......@@ -1602,4 +1602,62 @@ class DataService
return;
}
}
public static function fix($updateData = false)
{
$supplierCodeList = [
'L0015311',
'L0014902',
'L0007892',
'L0015391',
'L0004594',
'L0014414',
'L0013216',
'L0014052',
'L0014991',
'L0015322',
'L0014105',
'L0014984',
'L0016275',
'L0017038',
'L0014268',
'L0015126',
'L0012353',
'L0013837',
'L0014588',
'L0014671',
'L0012496',
'L0015328',
'L0011949',
'L0013003',
'L0014165',
'L0013219',
'L0014807',
'L0007738',
'L0018362',
'L0017297',
'L0018108',
'L0006485',
'L0015690',
'L0014859'
];
foreach ($supplierCodeList as $key => $value) {
$supplierId = SupplierChannelModel::where('supplier_code', $value)->value('supplier_id');
//去找出对应的跟单员
$contact = SupplierChannelModel::where('supplier_id', $supplierId)
->where('channel_user_type', 4)->first();
if (empty($contact)) {
\dump("供应商{$value}没有找到跟单员");
continue;
}
$contact['can_check_uids'] = 10326;
$contact['channel_user_type'] = 1;
unset($contact['contact_id']);
if ($updateData) {
SupplierContactModel::insert($contact);
}
\dump("供应商{$value}新增跟单员记录");
}
}
}
......@@ -97,7 +97,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route::match(['get', 'post'], '/test', function () {
DataService::replaceInventoryUser(false,10);
DataService::fix(false);
// DataService::fixSupplierContacts(false,10);
// DataService::initInventoryNotInXsl(true);
if (request()->get('delete')) {
......
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