Merge remote-tracking branch 'origin/conding' into conding
This commit is contained in:
@@ -178,7 +178,7 @@ def classify_salary(db):
|
||||
c+=1
|
||||
else:
|
||||
d+=1
|
||||
return {'5k以下': a, '5k-10k': b, '10k-15k': c, '15k': d}
|
||||
return {'5k以下': a, '5k-10k': b, '10k-15k': c, '15k以上': d}
|
||||
except:
|
||||
raise HTTPException(status_code=500,detail='查询异常!')
|
||||
|
||||
@@ -190,7 +190,7 @@ def avg_salary(db):
|
||||
.filter(Employment_info.salary>0,Employment_info.delete_status==0,Student_Model.delete_status==0)\
|
||||
.group_by(Student_Model.class_id)\
|
||||
.order_by(func.avg(Employment_info.salary).desc()).all()
|
||||
return l
|
||||
return [{'class_id':i[0],'avg_salaries':i[1]} for i in l]
|
||||
except:
|
||||
raise HTTPException(status_code=500,detail='统计异常!')
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ def add_teacher(teacher,session):
|
||||
return teacher
|
||||
except:
|
||||
session.rollback()
|
||||
# raise HTTPException(status_code=500,detail='添加异常!')
|
||||
return None
|
||||
|
||||
def get_teacher(id,session):
|
||||
|
||||
@@ -14,7 +14,7 @@ tags_metadata = [
|
||||
{"name": "学生就业管理模块"},
|
||||
{"name": "统计分析模块"},
|
||||
]
|
||||
app = FastAPI(title='沃林学⽣管理系统',openapi_tags=tags_metadata)
|
||||
app = FastAPI(title='沃林学生管理系统',openapi_tags=tags_metadata)
|
||||
|
||||
app.include_router(StudentAPI)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user