Commit 6f6a7e4e by 杨树贤

优化调试

parent 7141c53b
......@@ -1128,9 +1128,19 @@ class DataService
'add_time' => time(),
'admin_id' => 1000 // 系统管理员
]);
\dump('创建跟单联系人: ' . $followerCodeId . ' 供应商ID : ' . $supplierId . ' 供应商名称 : ' . $supplierInfo['name']);
if ($updateData) {
SupplierContactModel::insert($contactData);
//先判断是否存在相同的采购员
$sameContactId = SupplierChannelModel::where('supplier_id', $supplierId)
->where('channel_user_type', 1)->value('contact_id');
if ($sameContactId) {
\dump('已经存在普通采购员,要转换为跟单采购员: ' . $followerCodeId . ' 供应商ID : ' . $supplierId . ' 供应商名称 : ' . $supplierInfo['name']);
if ($updateData) {
SupplierContactModel::where('contact_id', $sameContactId)->update($contactData);
}
} else {
\dump('创建跟单联系人: ' . $followerCodeId . ' 供应商ID : ' . $supplierId . ' 供应商名称 : ' . $supplierInfo['name']);
if ($updateData) {
SupplierContactModel::insert($contactData);
}
}
}
}
......
......@@ -97,7 +97,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
});
Route::match(['get', 'post'], '/test', function () {
DataService::initHistoricalSupplierData(false,6);
DataService::initHistoricalSupplierData(false,3);
if (request()->get('delete')) {
}
// DataService::initSupplierReceiptNationId();
......
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