From 2ce8fdacf6e06969d60f0678fabb6e1022b9f0cf Mon Sep 17 00:00:00 2001 From: yb <739325183@qq.com> Date: Wed, 23 Sep 2026 12:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0statcalc=20=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=B0=B1=E4=B8=9A=E6=97=B6=E5=B8=B8=E5=85=A5=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StatCalc/api/statcalc_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StatCalc/api/statcalc_api.py b/StatCalc/api/statcalc_api.py index d82bf7b..79a352b 100644 --- a/StatCalc/api/statcalc_api.py +++ b/StatCalc/api/statcalc_api.py @@ -74,10 +74,10 @@ def salarytop5(num:int,db=Depends(get_db)): return [{'学生姓名': row[2], '学生班级编号': row[3], '就业时间': str(row[0].offer_recived_time) if row[0].offer_recived_time else None, '公司': row[1]} for row in q] @statcalc_api.get('/statcalc/job',summary='学生就业时长') -def worktime(db=Depends(get_db)): +def worktime(stuid:int,db=Depends(get_db)): q = db.query(Employments, Students.name.label('sname')) \ .join(Students, Employments.stuid == Students.id) \ - .filter(Employments.is_deleted == 0) \ + .filter(Employments.stuid == stuid,Employments.is_deleted == 0) \ .all() return [