Merge branch 'master' of /data/git/tiantian2

master
root 5 years ago
commit 40b23dcb06

@ -93,6 +93,15 @@ class StatisticsController extends CommonController
$query->ofProject($project_id);
})->sum("total");
$counts["paramedic_has_order"] = (new Paramedic())->ofProject($project_id)->whereHas("orders",function($query) {
$query->where("status", Orders::STATUS_ONGOING);
})->count();
$counts["orders_ongoing_in_today"] = (new Orders())->ofProject($project_id)->whereHas("audits", function($query) {
$query->whereRaw();
})->count();
return response()->json(compact("counts"));
}

Loading…
Cancel
Save