weizong song 5 years ago
parent 49d29058fd
commit 27aa8400ac

@ -99,7 +99,9 @@ class StatisticsController extends CommonController
})->count();
$counts["orders_ongoing_in_today"] = (new Orders())->ofProject($project_id)->whereHas("audits", function($query) {
$query->whereRaw();
$query->whereRaw("DATEDIFF(`created_at`,now()) = 0")
->where("field_name","status")
->where("new_value", Orders::STATUS_ONGOING);
})->count();
return response()->json(compact("counts"));

Loading…
Cancel
Save