添加statcalc 学生就业时常入参

This commit is contained in:
2026-09-23 12:14:22 +08:00
parent 7d8d14fec1
commit 2ce8fdacf6
+2 -2
View File
@@ -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 [