新增时间搜索

This commit is contained in:
liu 2024-06-14 17:53:31 +08:00
parent 46ba3cb31f
commit 189c872815

View File

@ -563,6 +563,11 @@ class WorkbenchLogic extends BaseLogic
//总的营业额的统计 总的利润的统计 总的成本合集的统计 总的加到保证金的
$all = StoreOrder::where(['paid'=>YesNoEnum::YES,'store_id'=>$params['store_id']]);
if(isset($params['month']) && $params['month']){
$all = StoreOrder::where(['paid'=>YesNoEnum::YES,'store_id'=>$params['store_id']])
->whereMonth('create_time', $params['month'])
;
}
$turnover_all = $all
->sum('pay_price');
$profit_all = $all