From ad156f38cc16993ee990e4bff34218f0d2c6a4d2 Mon Sep 17 00:00:00 2001 From: 13507605001 Date: Mon, 12 Dec 2022 11:26:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=95=E7=A4=BA=E9=A2=84=E8=AD=A6=E6=95=B0?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/home/views.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/home/views.py b/apps/home/views.py index 1e066d8..15526eb 100644 --- a/apps/home/views.py +++ b/apps/home/views.py @@ -99,6 +99,12 @@ def get_warning_list(): } return jsonify(Utils.true_return(data=data)) +# 获取预警数量接口 +@home_router.route("/home_warning_num", methods=["POST"]) +def get_warning_num(): + num = BllWarning().execute("select count(*) num from rms_warning").fetchone().num + return jsonify(Utils.true_return(data=num)) + # 修改预警状态,根据预警id进行 @home_router.route("/update_warning_tp", methods=["GET", "POST"])