Commit 3c5bd95f by 杨树贤

编辑操作不去校验供应商是否存在,因为无法修改

parent f2d5e764
......@@ -298,9 +298,6 @@ class SupplierApiController extends Controller
//如果是编辑操作,则要忽略非当前
if ($supplierId) {
if (in_array($supplierId, config('field.NeedSkipSupplierNameCheckIds'))) {
$this->response(0, '供应商名称合理');
}
$originSupplierName = $model->where('supplier_id', $supplierId)->value('supplier_name');
$existedSupplierName = $model->where('supplier_name', $supplierName)->where('supplier_name', '!=',
$originSupplierName)
......
......@@ -68,13 +68,9 @@ class SupplierValidator
}
$count = SupplierChannelModel::where('supplier_name', $validateData['supplier_name'])->count();
} else {
$count = SupplierChannelModel::where('supplier_name', $validateData['supplier_name'])
->where('supplier_id', '!=', $supplierId)->count();
//特殊处理下一些已经重复的供应商,历史数据问题
if (in_array($supplierId, config('field.NeedSkipSupplierNameCheckIds'))) {
//对接一体化以后,名称不能修改了,所以直接为0
$count = 0;
}
}
if ($count) {
return "该供应商名称已经存在,请核验后再提交";
}
......@@ -276,13 +272,9 @@ class SupplierValidator
$companyNameCount = SupplierChannelModel::where('register_company_name',
$validateData['register_company_name'])->where('register_company_name', '!=', '')->count();
} else {
$count = SupplierChannelModel::where('supplier_name', $validateData['supplier_name'])
->where('supplier_id', '!=', $supplierId)->count();
//特殊处理下一些已经重复的供应商,历史数据问题
if (in_array($supplierId, config('field.NeedSkipSupplierNameCheckIds'))) {
//对接一体化以后,名称不能修改了,所以直接为0
$count = 0;
}
}
if ($count) {
$errorMessageList[] = "该供应商名称已经存在,请核验后再提交";
}
......
......@@ -179,18 +179,5 @@ return [
'分销平台' => '分销平台',
'代工厂' => '代工厂',
],
//需要跳过重复校验的供应商ID
'NeedSkipSupplierNameCheckIds' => [
2619,
7443,
195,
12263,
4983,
33,
3454,
2895,
3299,
4634
],
'NeedCheckCompanyRegion' => [2, 4]
];
\ No newline at end of file
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