feat: 添加第12课课评、班级总结及学生画像更新

- K4周日1900班第12课《花朵随心画》课评(梁境城、钟嘉逸、王睿意补课)
- AICODE03/CSP03各班级第12课课评及班级总结
- 更新多班级学生画像
- 课评生成技能优化
This commit is contained in:
chengzi
2026-05-24 20:48:34 +08:00
parent 682bc4e93a
commit 3b75170862
515 changed files with 66389 additions and 1424 deletions

View File

@@ -0,0 +1,337 @@
{
"query_range": "2026-05-15 至 2026-05-17",
"teacher_name": "橙子(程城)",
"overall_attendance_rate": {
"code": 0,
"message": "success",
"data": {
"开始日期": "2026-05-15",
"结束日期": "2026-05-17",
"校区ID": null,
"总行数": 0,
"总老师数": 0,
"数据": []
}
},
"daily_course_details": [
{
"date": "2026-05-15",
"courses": [
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-15",
"teaching_time_period": "17:00-18:30",
"teaching_time": "2026-05-15 17:00-18:30",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "711613098653442048",
"class_name": "AICODE03AI编程创新课03",
"lesson_id": "458101220725301248",
"lesson_name": "少儿编程课程",
"timetable_id": "711613098653442048",
"student_count": 1,
"student_names": [
"李梓宁"
],
"attendance": {
"attended": 1,
"makeup_attended": 0,
"on_leave": 0,
"absent": 0,
"other": 0
},
"students": []
},
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-15",
"teaching_time_period": "19:00-20:30",
"teaching_time": "2026-05-15 19:00-20:30",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "706276363459398656",
"class_name": "KITTEN04KITTEN图形化04",
"lesson_id": "458101220725301248",
"lesson_name": "少儿编程课程",
"timetable_id": "706276363459398656",
"student_count": 4,
"student_names": [
"彭煜腾",
"王晨语",
"郭艺嘉",
"陈圆振"
],
"attendance": {
"attended": 4,
"makeup_attended": 0,
"on_leave": 0,
"absent": 0,
"other": 0
},
"students": []
}
]
},
{
"date": "2026-05-16",
"courses": [
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-16",
"teaching_time_period": "08:30-10:30",
"teaching_time": "2026-05-16 08:30-10:30",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "706546755952542720",
"class_name": "CSP03信息学奥赛03",
"lesson_id": "508681560023731200",
"lesson_name": "信奥C++课程",
"timetable_id": "706546755952542720",
"student_count": 6,
"student_names": [
"李若瑜",
"杨林轩",
"欧俊宇",
"汪子杰",
"谢明泓(am)",
"谭锦程"
],
"attendance": {
"attended": 5,
"makeup_attended": 1,
"on_leave": 0,
"absent": 0,
"other": 0
},
"students": []
},
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-16",
"teaching_time_period": "14:00-16:00",
"teaching_time": "2026-05-16 14:00-16:00",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "706563777704854528",
"class_name": "CSP03信息学奥赛03",
"lesson_id": "508681560023731200",
"lesson_name": "信奥C++课程",
"timetable_id": "706563777704854528",
"student_count": 5,
"student_names": [
"廖梓琪",
"张雨禾",
"苏俊宇",
"郑子煜",
"魏铭轩"
],
"attendance": {
"attended": 4,
"makeup_attended": 0,
"on_leave": 1,
"absent": 0,
"other": 0
},
"students": []
},
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-16",
"teaching_time_period": "19:00-20:30",
"teaching_time": "2026-05-16 19:00-20:30",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "706568273734486016",
"class_name": "AICODE03AI编程创新课03",
"lesson_id": "458101220725301248",
"lesson_name": "少儿编程课程",
"timetable_id": "706568273734486016",
"student_count": 5,
"student_names": [
"李承泽",
"王子墨",
"谭俊研",
"陈嘉博",
"黄彦棋"
],
"attendance": {
"attended": 4,
"makeup_attended": 0,
"on_leave": 1,
"absent": 0,
"other": 0
},
"students": []
}
]
},
{
"date": "2026-05-17",
"courses": [
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-17",
"teaching_time_period": "08:45-10:15",
"teaching_time": "2026-05-17 08:45-10:15",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "706617195534338048",
"class_name": "AICODE03AI编程创新课03",
"lesson_id": "458101220725301248",
"lesson_name": "少儿编程课程",
"timetable_id": "706617195534338048",
"student_count": 4,
"student_names": [
"卢皓霖",
"朱浩铭(am)",
"杨翊弘",
"黄俊博"
],
"attendance": {
"attended": 1,
"makeup_attended": 0,
"on_leave": 3,
"absent": 0,
"other": 0
},
"students": []
},
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-17",
"teaching_time_period": "10:30-12:30",
"teaching_time": "2026-05-17 10:30-12:30",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "706617285669913600",
"class_name": "CSP03信息学奥赛03",
"lesson_id": "508681560023731200",
"lesson_name": "信奥C++课程",
"timetable_id": "706617285669913600",
"student_count": 3,
"student_names": [
"卢华琛",
"唐钎宸",
"王佳琳"
],
"attendance": {
"attended": 2,
"makeup_attended": 0,
"on_leave": 1,
"absent": 0,
"other": 0
},
"students": []
},
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-17",
"teaching_time_period": "14:00-15:30",
"teaching_time": "2026-05-17 14:00-15:30",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "706627666098341888",
"class_name": "AICODE03AI编程创新课03",
"lesson_id": "458101220725301248",
"lesson_name": "少儿编程课程",
"timetable_id": "706627666098341888",
"student_count": 4,
"student_names": [
"余浩宸",
"吴浩睿",
"林俊宇",
"贺楚悦(am)"
],
"attendance": {
"attended": 2,
"makeup_attended": 0,
"on_leave": 2,
"absent": 0,
"other": 0
},
"students": []
},
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-17",
"teaching_time_period": "16:00-17:00",
"teaching_time": "2026-05-17 16:00-17:00",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "706627047266568192",
"class_name": "AICODE01代码编程入门课01",
"lesson_id": "458101220725301248",
"lesson_name": "少儿编程课程",
"timetable_id": "706627047266568192",
"student_count": 1,
"student_names": [
"叶钧洋"
],
"attendance": {
"attended": 1,
"makeup_attended": 0,
"on_leave": 0,
"absent": 0,
"other": 0
},
"students": []
},
{
"school_id": "29663705",
"school_name": "编程猫新翼广场校区",
"teaching_date": "2026-05-17",
"teaching_time_period": "17:00-19:00",
"teaching_time": "2026-05-17 17:00-19:00",
"teacher_id": "635533865053641728",
"teacher_name": "橙子(程城)",
"assistant_id": "",
"assistant_name": "",
"class_id": "722229590709308416",
"class_name": "CSP03信息学奥赛03",
"lesson_id": "508681560023731200",
"lesson_name": "信奥C++课程",
"timetable_id": "722229590709308416",
"student_count": 1,
"student_names": [
"王佳琳"
],
"attendance": {
"attended": 0,
"makeup_attended": 1,
"on_leave": 0,
"absent": 0,
"other": 0
},
"students": []
}
]
}
]
}

356
data/package-lock.json generated Normal file
View File

@@ -0,0 +1,356 @@
{
"name": "ClassFeedback",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"axios": "^1.16.1",
"dotenv": "^17.4.2"
}
},
"node_modules/agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"license": "MIT",
"dependencies": {
"debug": "4"
},
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"license": "MIT"
},
"node_modules/axios": {
"version": "1.16.1",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.16.1.tgz",
"integrity": "sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.16.0",
"form-data": "^4.0.5",
"https-proxy-agent": "^5.0.1",
"proxy-from-env": "^2.1.0"
}
},
"node_modules/call-bind-apply-helpers": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"license": "MIT",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/debug": {
"version": "4.4.3",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz",
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"license": "MIT",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/dotenv": {
"version": "17.4.2",
"resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-17.4.2.tgz",
"integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz",
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.1",
"es-errors": "^1.3.0",
"gopd": "^1.2.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-define-property": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz",
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-object-atoms": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/es-set-tostringtag": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.6",
"has-tostringtag": "^1.0.2",
"hasown": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/follow-redirects": {
"version": "1.16.0",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.16.0.tgz",
"integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/RubenVerborgh"
}
],
"license": "MIT",
"engines": {
"node": ">=4.0"
},
"peerDependenciesMeta": {
"debug": {
"optional": true
}
}
},
"node_modules/form-data": {
"version": "4.0.5",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.5.tgz",
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-intrinsic": {
"version": "1.3.0",
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"license": "MIT",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
"es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"has-symbols": "^1.1.0",
"hasown": "^2.0.2",
"math-intrinsics": "^1.1.0"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/get-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz",
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
"license": "MIT",
"dependencies": {
"dunder-proto": "^1.0.1",
"es-object-atoms": "^1.0.0"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/gopd": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz",
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-symbols": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz",
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/has-tostringtag": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
"license": "MIT",
"dependencies": {
"has-symbols": "^1.0.3"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/hasown": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.3.tgz",
"integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==",
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
"license": "MIT",
"dependencies": {
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
},
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"license": "MIT",
"dependencies": {
"mime-db": "1.52.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
"node_modules/proxy-from-env": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-2.1.0.tgz",
"integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==",
"license": "MIT",
"engines": {
"node": ">=10"
}
}
}
}

6
data/package.json Normal file
View File

@@ -0,0 +1,6 @@
{
"dependencies": {
"axios": "^1.16.1",
"dotenv": "^17.4.2"
}
}

151
data/query_0515_0517.js Normal file
View File

@@ -0,0 +1,151 @@
const axios = require('axios');
require('dotenv').config({ path: 'E:/cc/4work_project/ClassFeedback/.env' });
const API_BASE_URL = process.env.API_BASE_URL;
const AUTHORIZATION = process.env.AUTHORIZATION;
// 查询整体出勤率
async function getTeacherAttendanceRate(beginDate, endDate) {
try {
console.log(`🔍 正在查询橙子老师 ${beginDate}${endDate} 整体出勤率...`);
const response = await axios.get(`${API_BASE_URL}/reports/teacher-attendance-rates`, {
headers: { 'Authorization': AUTHORIZATION },
params: {
teacher_name: '橙子(程城)',
begin_date: beginDate,
end_date: endDate
}
});
console.log('✅ 整体出勤率数据获取成功');
return response.data;
} catch (error) {
console.error('❌ 整体出勤率查询失败:', error.response ? error.response.data : error.message);
return null;
}
}
// 查询每日详细课程和学生出勤明细
async function getDailyTeachingSchedule(dates) {
const allData = [];
for (const date of dates) {
try {
console.log(`\n🔍 正在查询 ${date} 的课程明细...`);
const response = await axios.get(`${API_BASE_URL}/reports/teaching-schedule`, {
headers: { 'Authorization': AUTHORIZATION },
params: {
teacher_name: '橙子(程城)',
teaching_date: date
}
});
if (response.data.code === 0 && response.data.data.items.length > 0) {
allData.push({
date: date,
courses: response.data.data.items
});
console.log(`${date} 找到 ${response.data.data.items.length} 节课`);
// 打印每节课的学生出勤情况
response.data.data.items.forEach((course, idx) => {
console.log(`\n 📚 课程 ${idx + 1}: ${course.class_name || '未命名班级'}`);
console.log(` 时间: ${course.teaching_begin_time} - ${course.teaching_end_time}`);
console.log(` 学生明细:`);
if (course.students && course.students.length > 0) {
course.students.forEach(student => {
const status = student.attendance_status || '❓ 未知';
const remark = student.attendance_remark ? ` (${student.attendance_remark})` : '';
console.log(` - ${student.student_name}: ${status}${remark}`);
});
} else {
console.log(` (无学生数据)`);
}
});
} else {
console.log(` ${date} 没有课程安排`);
}
} catch (error) {
console.error(`❌ 查询 ${date} 失败:`, error.response ? error.response.data : error.message);
}
}
return allData;
}
// 主函数
async function main() {
const dates = ['2026-05-15', '2026-05-16', '2026-05-17'];
const beginDate = '2026-05-15';
const endDate = '2026-05-17';
console.log('========================================');
console.log(' 橙子老师 5月15日-5月17日 出勤查询');
console.log('========================================\n');
// 1. 获取整体出勤率
const overallRate = await getTeacherAttendanceRate(beginDate, endDate);
if (overallRate && overallRate.data && overallRate.data.数据) {
const data = overallRate.data.数据[0];
if (data) {
console.log('\n📊 整体出勤率摘要:');
console.log(` 校区: ${data.校区名称}`);
console.log(` 综合出勤率: ${(data.综合.一次出勤率 * 100).toFixed(2)}%`);
console.log(` 固定班应消耗课时: ${data.综合.固定班应消耗课时}`);
console.log(` 固定班实际到课课时: ${data.综合.固定班实际到课课时}`);
console.log(` 固定班请假课时: ${data.综合.固定班请假课时}`);
console.log(` 固定班旷课课时: ${data.综合.固定班旷课课时}`);
}
}
// 2. 获取每日明细
console.log('\n----------------------------------------');
console.log(' 每日课程及学生出勤明细');
console.log('----------------------------------------');
const dailyDetails = await getDailyTeachingSchedule(dates);
// 3. 汇总统计
console.log('\n========================================');
console.log(' 汇总统计');
console.log('========================================');
let totalStudents = 0;
let attendedStudents = 0;
let leaveStudents = 0;
let absentStudents = 0;
let makeupStudents = 0;
dailyDetails.forEach(day => {
day.courses.forEach(course => {
if (course.students) {
course.students.forEach(student => {
totalStudents++;
const status = student.attendance_status || '';
if (status.includes('出勤')) attendedStudents++;
else if (status.includes('请假')) leaveStudents++;
else if (status.includes('缺勤') || status.includes('旷课')) absentStudents++;
else if (status.includes('补课')) makeupStudents++;
});
}
});
});
console.log(`- 总学生人次: ${totalStudents}`);
console.log(`- 正常出勤: ${attendedStudents} 人次 (${totalStudents > 0 ? ((attendedStudents / totalStudents) * 100).toFixed(2) : 0}%)`);
console.log(`- 请假: ${leaveStudents} 人次 (${totalStudents > 0 ? ((leaveStudents / totalStudents) * 100).toFixed(2) : 0}%)`);
console.log(`- 旷课/缺勤: ${absentStudents} 人次 (${totalStudents > 0 ? ((absentStudents / totalStudents) * 100).toFixed(2) : 0}%)`);
console.log(`- 补课: ${makeupStudents} 人次 (${totalStudents > 0 ? ((makeupStudents / totalStudents) * 100).toFixed(2) : 0}%)`);
// 保存到文件
const fs = require('fs');
const result = {
query_range: '2026-05-15 至 2026-05-17',
teacher_name: '橙子(程城)',
overall_attendance_rate: overallRate,
daily_course_details: dailyDetails
};
const outputPath = 'E:/cc/4work_project/ClassFeedback/data/orange_attendance_0515_0517.json';
fs.writeFileSync(outputPath, JSON.stringify(result, null, 2));
console.log(`\n🎉 数据已保存到: ${outputPath}`);
}
main();