统计分析模块更新,待测试,试运行通过,外键已绑定完毕。
This commit is contained in:
@@ -39,7 +39,9 @@ def get_class_count(g , db):
|
||||
from scores.model.score_model import Score
|
||||
|
||||
def get_score_80(db):
|
||||
q = db.query(Score).filter(Score.score>=80).all()
|
||||
q = (db.query(Score)
|
||||
.filter(Score.score>=80)
|
||||
.all())
|
||||
return q
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from scores.dao.score_dao import get_scores_dao,add_scores_dao,update_scores_dao
|
||||
from scores.model.score_model import Score
|
||||
from scores.schema.score_request import ScoreRequest, ScoreResponse,ScoreQuery
|
||||
|
||||
score_api = APIRouter(tags=['成绩'])
|
||||
score_api = APIRouter()
|
||||
|
||||
@score_api.get('/Score',summary='成绩查询',description=f'查询条件为空即查询所有成绩')
|
||||
def get_scores(score:ScoreQuery=Depends(),db=Depends(get_db)):
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ Scores_API = APIRouter()
|
||||
Scores_API.include_router(score_api)
|
||||
|
||||
# 自测接口
|
||||
app = FastAPI(title='成绩管理系统')
|
||||
app = FastAPI(tags=['成绩'],title='成绩管理系统')
|
||||
app.include_router(score_api)
|
||||
|
||||
Base.metadata.create_all(engine)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import datetime
|
||||
from datetime import date
|
||||
|
||||
from fastapi import APIRouter,Depends,HTTPException,Query
|
||||
from stu_jiuye.dao import *
|
||||
@@ -15,10 +15,10 @@ def get_stuinfo( #查询学生就业信息
|
||||
,min_salary:int|None=Query(None,description='最小薪资范围')
|
||||
,max_salary:int|None=Query(None,description='最大薪资范围')
|
||||
,somewhere:str|None=Query(None,description='公司地区')
|
||||
,employment_open_start: datetime.date | None = Query(None,description='就业开放起始时间')
|
||||
,employment_open_end: datetime.date | None = Query(None,description='就业开放结束时间')
|
||||
,offer_recived_start: datetime.date | None = Query(None,description='offer下发起始时间')
|
||||
,offer_recived_end: datetime.date | None = Query(None,description='offer下发结束时间')
|
||||
,employment_open_start: date | None = Query(None,description='就业开放起始时间')
|
||||
,employment_open_end: date | None = Query(None,description='就业开放结束时间')
|
||||
,offer_recived_start: date | None = Query(None,description='offer下发起始时间')
|
||||
,offer_recived_end: date | None = Query(None,description='offer下发结束时间')
|
||||
,db=Depends(get_db)
|
||||
): #查询条件
|
||||
r=get_emp_dao( #调用函数
|
||||
|
||||
Reference in New Issue
Block a user