Commit aa0e3662 by 杨树贤

再次修改yunxin统计

parent 20422f3e
Showing with 6 additions and 3 deletions
......@@ -1244,14 +1244,17 @@ class DataService
$dataManagerSupplierCodeList = DataManageModel::where('is_type', 0)->where('canal', '!=', '')->pluck('canal')->toArray();
//sku上架总数含api接口
$skuNum1 = SupplierChannelModel::where('is_type', 0)->where('supplier_group', '!=', 4)->whereNotIn('supplier_name', config('field.SkipChangeSupplierTypeNames'))->sum('sku_num');
$skuNumYunxin = SupplierChannelModel::where('is_type', 0)->where('stockup_type', 'like', '%5%')->sum('sku_num');
//sku上架总数,不含api接口
$skuNum2 = SupplierChannelModel::where('is_type', 0)->where('supplier_group', '!=', 4)->whereNotIn('supplier_name', config('field.SkipChangeSupplierTypeNames'))->whereNotIn('supplier_code', $dataManagerSupplierCodeList)->sum('sku_num');
//有上架sku的供应商
$supplierCount = SupplierChannelModel::where('is_type', 0)->where('supplier_group', '!=', 4)->whereNotIn('supplier_name', config('field.SkipChangeSupplierTypeNames'))->where('sku_num', '>', 0)->count();
$supplierYunxinCount = SupplierChannelModel::where('is_type', 0)->where('stockup_type', 'like', '%5%')->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)->pluck('supplier_code')->groupBy('supplier_code')->where('source',2)->toArray();
$skuNumYunxin = SupplierChannelModel::whereIn('supplier_code',$yunxinUploadSupplierCodes)->sum('sku_num');
dump("上架供应商数(不含代购,原厂):" . $supplierCount);
dump("上架云芯供应商数:" . $supplierYunxinCount);
dump("上架云芯供应商数:" . count($yunxinUploadSupplierCodes));
dump("SKU 上架总条数(含API接口):" . $skuNum1);
dump("SKU上架总条数(只含云芯):" . $skuNumYunxin);
dump("SKU 上架条数(不含API接口):" . $skuNum2);
......
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