From 95e9cb423a3c73a3693fe90290be986023718ae9 Mon Sep 17 00:00:00 2001 From: xiaozhou233 Date: Sat, 4 Jul 2026 19:20:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0TDS=E5=92=8C=E6=B5=8A?= =?UTF-8?q?=E5=BA=A6=E8=AF=84=E5=88=86=E6=A0=87=E5=87=86=EF=BC=8C=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=98=88=E5=80=BC=E4=BB=A5=E6=9B=B4=E5=87=86=E7=A1=AE?= =?UTF-8?q?=E5=9C=B0=E5=8F=8D=E6=98=A0=E6=B0=B4=E8=B4=A8=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-server/score.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api-server/score.py b/api-server/score.py index df68d26..31592cc 100644 --- a/api-server/score.py +++ b/api-server/score.py @@ -11,26 +11,26 @@ def score_ph(ph: float): def score_tds(tds: float): - if tds < 300: + if tds < 15: return 30, "优秀" - if tds < 500: + if tds < 35: return 25, "良好" - if tds < 1000: + if tds < 70: return 15, "一般" return 0, "较差" def score_turbidity(turbidity: float): - if turbidity < 5: + if turbidity < 100: return 30, "优秀" - if turbidity < 25: + if turbidity < 300: return 20, "一般" - if turbidity < 100: + if turbidity < 500: return 10, "较差" return 0, "异常"