Commit 1d651642 by 杨树贤

修改限制

parent 37d4da9f
......@@ -196,9 +196,9 @@ class SkuApiController extends Controller
if (!$setType) {
$this->response(-1, '请选择设置类型');
}
if ($setType == 1 && empty($supplierGroup)) {
$this->response(-1, '批量设置必须选择对应的供应商性质');
}
// if ($setType == 1 && empty($supplierGroup)) {
// $this->response(-1, '批量设置必须选择对应的供应商性质');
// }
if ($setType == 2 && empty($supplierCode)) {
$this->response(-2, '单个设置必须选择对应的供应商编码');
}
......
......@@ -1251,7 +1251,7 @@ class DataService
$supplierCount = SupplierChannelModel::where('is_type', 0)->where('supplier_group', '!=', 4)->whereNotIn('supplier_name', config('field.SkipChangeSupplierTypeNames'))->where('sku_num', '>', 0)->count();
$yunxinSupplierCodes = SupplierChannelModel::where('is_type', 0)->where('stockup_type', 'like', '%5%')->where('sku_num', '>', 0)->pluck('supplier_code');
//找出哪些是云芯上传的
$yunxinUploadSupplierCodes = SkuUploadLogModel::whereIn('supplier_code',$yunxinSupplierCodes)->where('source',2)->pluck('supplier_code')->groupBy('supplier_code')->toArray();
$yunxinUploadSupplierCodes = SkuUploadLogModel::whereIn('supplier_code',$yunxinSupplierCodes)->where('source',2)->pluck('supplier_code')->unique()->toArray();
$skuNumYunxin = SupplierChannelModel::whereIn('supplier_code',$yunxinUploadSupplierCodes)->sum('sku_num');
dump("上架供应商数(不含代购,原厂):" . $supplierCount);
dump("上架云芯供应商数:" . count($yunxinUploadSupplierCodes));
......
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