Commit d4aa445f by 杨树贤

重新统计

parent 878ddf0f
Showing with 10 additions and 5 deletions
......@@ -1144,7 +1144,7 @@ class DataService
//获取非原厂,非api对接的,有sku的正式供应商列表
public function getOffShelfSupplierList()
{
$suppliers = SupplierChannelModel::where('sku_num', '>', 0)->where('supplier_group','!=',4)
$suppliers = SupplierChannelModel::where('sku_num', '>', 0)->where('supplier_group', '!=', 4)
->where('is_type', 0)->get()->toArray();
$supplierList = [];
foreach ($suppliers as $supplier) {
......@@ -1197,11 +1197,15 @@ class DataService
public function statisticsSkuNumber()
{
$dataManagerSupplierCodeList = DataManageModel::where('is_type', 0)->where('canal','!=','')->pluck('canal')->toArray();
$dataManagerSupplierCodeList = DataManageModel::where('is_type', 0)->where('canal', '!=', '')->pluck('canal')->toArray();
//sku上架总数含api接口
$skuNum1 = SupplierChannelModel::where('is_type',0)->sum('sku_num');
$skuNum1 = SupplierChannelModel::where('is_type', 0)->where('supplier_group','!=',4)->whereNotIn('supplier_name', config('field.SkipChangeSupplierTypeNames'))->sum('sku_num');
//sku上架总数,不含api接口
$skuNum2 = SupplierChannelModel::where('is_type',0)->whereNotIn('supplier_code',$dataManagerSupplierCodeList)->sum('sku_num');
dd($skuNum1,$skuNum2);
$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();
dump("上架供应商数(不含代购,原厂):".$supplierCount);
dump("SKU 上架总条数(含API接口):".$skuNum1);
dump("SKU 上架条数(不含API接口):".$skuNum2);
}
}
\ 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