From 6d8ad6fa8cf2794c16586c72b76d1238eded757f Mon Sep 17 00:00:00 2001 From: geeker Date: Wed, 23 Sep 2026 09:38:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=BC=94=E7=A4=BA=E5=BE=AE?= =?UTF-8?q?=E8=B0=83=20-=20=E5=B1=95=E7=A4=BA=E5=89=8D=E7=AB=AFclass?= =?UTF-8?q?=E2=80=94=E2=80=94name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/00-overview.md | 2 +- pyproject.toml | 2 +- routers/stats.py | 6 ++++++ sms.db | Bin 65536 -> 65536 bytes static/index.html | 9 +++++---- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/00-overview.md b/docs/00-overview.md index a98abfc..77c0722 100644 --- a/docs/00-overview.md +++ b/docs/00-overview.md @@ -1,4 +1,4 @@ -# 学生管理系统 — 项目总览 +# 教育培训管理系统 — 项目总览 > 本文档汇总学生管理系统的架构、业务、数据库及运维部署设计,作为项目开发和维护的参考基准。 diff --git a/pyproject.toml b/pyproject.toml index ade1bd4..786c0c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "student-manage-system" version = "0.1.0" -description = "Add your description here" +description = "教培系统架构设计与开发" readme = "README.md" requires-python = ">=3.13" dependencies = [ diff --git a/routers/stats.py b/routers/stats.py index ea70f0e..f795daa 100644 --- a/routers/stats.py +++ b/routers/stats.py @@ -44,12 +44,16 @@ def score_stats(class_id: Optional[int] = None, score_num: Optional[str] = None, db.query( Score.num.label("score_num"), Student.class_id, + Class.num.label("class_num"), + Class.name.label("class_name"), func.avg(Score.score).label("avg_score"), func.max(Score.score).label("max_score"), func.min(Score.score).label("min_score"), func.count(Score.id).label("count"), ) .join(Student, Score.sid == Student.id) + # 添加班级名称 + .join(Class, Student.class_id == Class.id) .filter(Student.is_deleted == False, Score.is_deleted == False) .group_by(Score.num, Student.class_id) ) @@ -62,6 +66,8 @@ def score_stats(class_id: Optional[int] = None, score_num: Optional[str] = None, { "score_num": r.score_num, "class_id": r.class_id, + "class_num": r.class_num, + "class_name": r.class_name, "avg_score": float(r.avg_score), "max_score": float(r.max_score), "min_score": float(r.min_score), diff --git a/sms.db b/sms.db index 259ef1cc918ab6d61609196beafd30c613b7b238..a41728598201981d2790a1fe87be61a5c963cca9 100644 GIT binary patch delta 1169 zcmaiyZ%EW&9LKlY?#{bC+s_0KukOlDBKmXl*>3l5kTlNTnlF>y^rFk4NRsG{!kvik zlGH&|QfOJd$O;{iMxuCdg=RsBgkS|Ztq_U`>xD0R+*IgP8eD_G(41BpaYCrY5J-gMfy~B&$k7X>!!Z;b0Bjs39C0WHuF)rbVqHL$c@L+&t zi(N2D!5{bz3or-MFlp>K`V2fpOewv()TK{XV#Es76m&s_@KmTa_LeI`rh!Gl3e7{) zw!PIIWLm3FU$|tx$eLF>?X8KhESF=fTDOR;%jMYQC@P83SX7SU0wtp2n3$BLxFVlt zP%x;`9($pYtI}x1!W0F+U=e0vir5|j9x*|>Zp{p<&mKP*K<*|As)crbhOa;uxj~Nh z)_ATJeJ2vAE61(n&+b!nfJ7(Vl^U;0#-SR8p zu&flOBuYHIrDC??8dYimLt`jA~cTI}ziAIdKD_kPK?F7ynY-efk4#duPVC1cwt zahx#DwB7bHA-+s^ccdJA88Pr0`AS)`r11M8L%cQPU_y}4-90G>B*^TNV3|cBz3NGR zTWK`Elk*N!&?Kw~m-%J>I$wsaqcZL}r+SA;u5PcA;Sfy|>WuXpBi3@fB{f@-2x-0Y ztuIdHY75duRXHI_ik#SlZ$pt3L!F#pcXBYcieedlz&DtO5AYt|!E4CF7|C|W27x#| k|FMdUj;~Yum)STO?E}tYW<42w>Ph^6^G<7Cf0;@C1)3{F(*OVf delta 451 zcmaiuJxD@P7>4idUQ_S6_q^F8CgG()2(pGCaFEL8Y-ng~h}OuVrNO(j6{rWoh@zn% zh#>0V5<#LMQQ9C9A(%l?5J3@P4Gx|Dh9GEtdA{d+EK9X4HQpw-CcI&}b#HtfhE10w zbkPZ8Sug3_^gWV&uc}fT$`ao2h+9-q=C1xjBu1K9xw}VGXj(!N9W*WQEy~lOh^#57 zNO-{=Dqrkc3#&vrJ;dRcFhm!ObE89_Ci_IzhMkL!YlokkElvmbk5%m+g6Q`xipYRt z6HAy!3{ml56f8QG6iiM+1Fv{S4iBR03Kf)bhGW5OfaPKXifNlCCOB-~?s2eH6t*3N1IUqry zZznu>dZM~D_kP5=M^ diff --git a/static/index.html b/static/index.html index 332f8a2..9214fb4 100644 --- a/static/index.html +++ b/static/index.html @@ -3,7 +3,7 @@ - 学生管理系统 + 教育培训管理系统