学籍异动:休学、复学、退学申请及辅导员→学院→教务处分级审批。
毕业审核:批次计算、缺失课程检查、人工复核、结果发布。 学位授予:毕业资格与 GPA 计算、人工调整、发布授予结果。 毕业离校:离校事项配置、责任角色分工、逐项办理及批次关闭。
This commit is contained in:
1 parent
7493ab4a60
commit
b0eaa20da6
34 files changed
+11137
-8
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
面向普通高校的教务管理系统。后端使用 ASP.NET Core 10、EF Core 10,前端使用 Vue 3、TypeScript 和 Element Plus。
|
||||
|
||||
当前已实现系统登录与角色权限、基础数据、用户管理、教师档案、学生档案、课程库、培养方案、教学任务、排课课表、学生选课、成绩管理、考试考场和首页统计。人员及课程列表支持组合筛选、服务端分页和完整增删改查;培养方案支持课程模块、专业年级版本、复制新版本、发布锁定和旧版本归档;教学任务支持学期课程开设、多教师、合班、容量校验、发布与结课;排课支持单双周、周次节次、教室容量、教师/行政班/教室冲突校验和版本化发布;选课支持批次时间窗、投放范围、容量与学分上限、重复课程与课表冲突校验、退课截止时间和实时教学班名单;成绩管理支持分项比例、批量录入、特殊考试状态、自动总评与绩点、教师提交、学院审核、校级发布和学生成绩单;考试管理支持考试计划、场次、考场容量、监考教师、考生名单以及考场/监考/学生时间冲突校验。
|
||||
当前已实现系统登录与角色权限、基础数据、用户管理、教师档案、学生档案、课程库、培养方案、教学任务、排课课表、学生选课、成绩管理、考试考场、学籍异动、毕业审核、学位授予、毕业离校和首页统计。人员及课程列表支持组合筛选、服务端分页和完整增删改查;培养方案支持课程模块、专业年级版本、复制新版本、发布锁定和旧版本归档;教学任务支持学期课程开设、多教师、合班、容量校验、发布与结课;排课支持单双周、周次节次、教室容量、教师/行政班/教室冲突校验和版本化发布;选课支持批次时间窗、投放范围、容量与学分上限、重复课程与课表冲突校验、退课截止时间和实时教学班名单;成绩管理支持分项比例、批量录入、特殊考试状态、自动总评与绩点、教师提交、学院审核、校级发布和学生成绩单;考试管理支持考试计划、场次、考场容量、监考教师、考生名单以及考场/监考/学生时间冲突校验;学籍异动支持休学、复学、退学申请,辅导员、学院、学校三级顺序审核,学生撤回,以及最终审批后自动同步学籍状态;毕业审核按入学年级匹配已发布培养方案,以正式成绩计算总学分、必修通过和未解决不及格课程,支持学院范围查看、人工复核、校级锁定发布和学生结果查询;学位授予以已发布毕业资格为来源,按正式成绩加权平均绩点生成规则结论,支持学院人工复核、校级发布锁定和学生结果查询;毕业离校支持自定义事项与责任部门,按校级、学院、辅导员角色分工办理,强制数据范围校验,学生进度查询,以及必办事项全部完成后的批次锁定。
|
||||
|
||||
权限采用后端强制校验的角色与数据范围模型。多角色账号按 `All > College > Class > Self` 取最高数据范围:校级角色可访问全校数据,院系管理员限定本学院,辅导员通过稳定的账号 ID 绑定所带行政班,教师和学生限定本人及当前教学关系;前端菜单和路由限制仅作为交互辅助,不替代 API 授权。
|
||||
|
||||
|
||||
@@ -328,6 +328,416 @@ try {
|
||||
throw 'Personal exam schedule is not visible to student or invigilator.'
|
||||
}
|
||||
|
||||
$statusOptions = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/student-status-changes/options' `
|
||||
-Headers $studentHeaders
|
||||
$statusChanges = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/student-status-changes' `
|
||||
-Headers $studentHeaders
|
||||
$openStatusChange = @($statusChanges) |
|
||||
Where-Object { $_.state -in @('Submitted', 'CounselorApproved', 'CollegeApproved') } |
|
||||
Select-Object -First 1
|
||||
if ($null -eq $openStatusChange) {
|
||||
$statusChangeType = if ($statusOptions.status -eq 'Active') {
|
||||
'Suspension'
|
||||
}
|
||||
elseif ($statusOptions.status -eq 'Suspended') {
|
||||
'Resumption'
|
||||
}
|
||||
else {
|
||||
throw "Smoke-test student status '$($statusOptions.status)' cannot start a reversible change."
|
||||
}
|
||||
$statusChangeBody = @{
|
||||
type = $statusChangeType
|
||||
reason = '端到端验证学籍异动三级审核流程。'
|
||||
} | ConvertTo-Json
|
||||
$createdStatusChange = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri 'http://localhost:5255/api/student-status-changes' `
|
||||
-Headers $studentHeaders `
|
||||
-ContentType 'application/json' `
|
||||
-Body $statusChangeBody
|
||||
$statusChanges = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/student-status-changes' `
|
||||
-Headers $studentHeaders
|
||||
$openStatusChange = @($statusChanges) |
|
||||
Where-Object { $_.id -eq $createdStatusChange.id } |
|
||||
Select-Object -First 1
|
||||
}
|
||||
$expectedStudentStatus = $openStatusChange.targetStatus
|
||||
$approvalBody = @{ approved = $true; comment = '端到端审核通过。' } | ConvertTo-Json
|
||||
|
||||
if ($openStatusChange.state -eq 'Submitted') {
|
||||
$prematureCollegeReview = Invoke-WebRequest `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/student-status-changes/$($openStatusChange.id)/review" `
|
||||
-Headers $collegeHeaders `
|
||||
-ContentType 'application/json' `
|
||||
-Body $approvalBody `
|
||||
-SkipHttpErrorCheck
|
||||
if ($prematureCollegeReview.StatusCode -ne 409) {
|
||||
throw 'College reviewer was able to bypass the counselor stage.'
|
||||
}
|
||||
$counselorLoginBody = @{
|
||||
userName = 'counselor'
|
||||
password = 'Counselor@123456'
|
||||
} | ConvertTo-Json
|
||||
$counselorLogin = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri 'http://localhost:5255/api/auth/login' `
|
||||
-ContentType 'application/json' `
|
||||
-Body $counselorLoginBody
|
||||
$counselorHeaders = @{ Authorization = "Bearer $($counselorLogin.token)" }
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/student-status-changes/$($openStatusChange.id)/review" `
|
||||
-Headers $counselorHeaders `
|
||||
-ContentType 'application/json' `
|
||||
-Body $approvalBody |
|
||||
Out-Null
|
||||
$openStatusChange.state = 'CounselorApproved'
|
||||
}
|
||||
if ($openStatusChange.state -eq 'CounselorApproved') {
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/student-status-changes/$($openStatusChange.id)/review" `
|
||||
-Headers $collegeHeaders `
|
||||
-ContentType 'application/json' `
|
||||
-Body $approvalBody |
|
||||
Out-Null
|
||||
$openStatusChange.state = 'CollegeApproved'
|
||||
}
|
||||
if ($openStatusChange.state -eq 'CollegeApproved') {
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/student-status-changes/$($openStatusChange.id)/review" `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $approvalBody |
|
||||
Out-Null
|
||||
}
|
||||
$completedStatusChanges = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/student-status-changes' `
|
||||
-Headers $studentHeaders
|
||||
$completedStatusChange = @($completedStatusChanges) |
|
||||
Where-Object { $_.id -eq $openStatusChange.id } |
|
||||
Select-Object -First 1
|
||||
$updatedStatusOptions = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/student-status-changes/options' `
|
||||
-Headers $studentHeaders
|
||||
if ($completedStatusChange.state -ne 'Approved' -or
|
||||
$updatedStatusOptions.status -ne $expectedStudentStatus) {
|
||||
throw 'Student status change was not finalized or did not update the student record.'
|
||||
}
|
||||
|
||||
$graduationBatches = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/graduation-audits/batches' `
|
||||
-Headers $headers
|
||||
$graduationBatch = @($graduationBatches) |
|
||||
Where-Object { $_.name -eq '2030届端到端毕业资格审核' } |
|
||||
Select-Object -First 1
|
||||
if ($null -eq $graduationBatch) {
|
||||
$graduationBatchBody = @{
|
||||
name = '2030届端到端毕业资格审核'
|
||||
graduationYear = 2030
|
||||
enrollmentYear = 2026
|
||||
notes = '用于验证培养方案、成绩快照、人工复核与结果发布。'
|
||||
} | ConvertTo-Json
|
||||
$createdGraduationBatch = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri 'http://localhost:5255/api/graduation-audits/batches' `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $graduationBatchBody
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/batches/$($createdGraduationBatch.id)/calculate" `
|
||||
-Headers $headers |
|
||||
Out-Null
|
||||
$graduationBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/batches/$($createdGraduationBatch.id)" `
|
||||
-Headers $headers
|
||||
$studentGraduationResult = @($graduationBatch.results) |
|
||||
Where-Object { $_.studentNumber -eq '202601001' } |
|
||||
Select-Object -First 1
|
||||
if ($null -eq $studentGraduationResult) {
|
||||
throw 'Calculated graduation batch does not contain the smoke-test student.'
|
||||
}
|
||||
$overrideDecisionBody = @{
|
||||
conclusion = 'Eligible'
|
||||
comment = '端到端验证人工复核调整。'
|
||||
} | ConvertTo-Json
|
||||
Invoke-RestMethod `
|
||||
-Method Put `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/results/$($studentGraduationResult.id)" `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $overrideDecisionBody |
|
||||
Out-Null
|
||||
$restoreDecisionBody = @{
|
||||
conclusion = 'Ineligible'
|
||||
comment = '恢复规则结论后发布测试结果。'
|
||||
} | ConvertTo-Json
|
||||
Invoke-RestMethod `
|
||||
-Method Put `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/results/$($studentGraduationResult.id)" `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $restoreDecisionBody |
|
||||
Out-Null
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/batches/$($graduationBatch.id)/publish" `
|
||||
-Headers $headers |
|
||||
Out-Null
|
||||
}
|
||||
else {
|
||||
$graduationBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/batches/$($graduationBatch.id)" `
|
||||
-Headers $headers
|
||||
}
|
||||
$graduationBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/batches/$($graduationBatch.id)" `
|
||||
-Headers $headers
|
||||
$studentGraduationResult = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/graduation-audits/my-result' `
|
||||
-Headers $studentHeaders
|
||||
if ($graduationBatch.status -ne 'Published' -or
|
||||
$studentGraduationResult.conclusion -ne 'Ineligible') {
|
||||
throw 'Published graduation result is not visible to the student.'
|
||||
}
|
||||
|
||||
$graduationBatches = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/graduation-audits/batches' `
|
||||
-Headers $headers
|
||||
$degreeSourceBatch = @($graduationBatches) |
|
||||
Where-Object { $_.name -eq '2030届学位授予资格演示' } |
|
||||
Select-Object -First 1
|
||||
if ($null -eq $degreeSourceBatch) {
|
||||
$degreeSourceBody = @{
|
||||
name = '2030届学位授予资格演示'
|
||||
graduationYear = 2030
|
||||
enrollmentYear = 2026
|
||||
notes = '为未关联登录账号的演示学生生成学位授予前置资格。'
|
||||
} | ConvertTo-Json
|
||||
$createdDegreeSource = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri 'http://localhost:5255/api/graduation-audits/batches' `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $degreeSourceBody
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/batches/$($createdDegreeSource.id)/calculate" `
|
||||
-Headers $headers |
|
||||
Out-Null
|
||||
$degreeSourceDetail = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/batches/$($createdDegreeSource.id)" `
|
||||
-Headers $headers
|
||||
$degreeSourceResult = @($degreeSourceDetail.results) |
|
||||
Where-Object { $_.studentNumber -eq '202601002' } |
|
||||
Select-Object -First 1
|
||||
$degreeSourceDecision = @{
|
||||
conclusion = 'Eligible'
|
||||
comment = '演示学生经校级专项复核符合毕业条件。'
|
||||
} | ConvertTo-Json
|
||||
Invoke-RestMethod `
|
||||
-Method Put `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/results/$($degreeSourceResult.id)" `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $degreeSourceDecision |
|
||||
Out-Null
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/graduation-audits/batches/$($createdDegreeSource.id)/publish" `
|
||||
-Headers $headers |
|
||||
Out-Null
|
||||
}
|
||||
|
||||
$degreeBatches = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/degree-awards/batches' `
|
||||
-Headers $headers
|
||||
$degreeBatch = @($degreeBatches) |
|
||||
Where-Object { $_.name -eq '2030届端到端学位授予审核' } |
|
||||
Select-Object -First 1
|
||||
if ($null -eq $degreeBatch) {
|
||||
$degreeBatchBody = @{
|
||||
name = '2030届端到端学位授予审核'
|
||||
graduationYear = 2030
|
||||
degreeName = '工学学士'
|
||||
minimumGradePoint = 0
|
||||
notes = '验证毕业资格来源、绩点快照、人工复核与发布锁定。'
|
||||
} | ConvertTo-Json
|
||||
$createdDegreeBatch = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri 'http://localhost:5255/api/degree-awards/batches' `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $degreeBatchBody
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/degree-awards/batches/$($createdDegreeBatch.id)/calculate" `
|
||||
-Headers $headers |
|
||||
Out-Null
|
||||
$degreeBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/degree-awards/batches/$($createdDegreeBatch.id)" `
|
||||
-Headers $headers
|
||||
$degreeResult = @($degreeBatch.results) | Select-Object -First 1
|
||||
if ($null -eq $degreeResult -or $degreeResult.conclusion -ne 'Granted') {
|
||||
throw 'Degree-award calculation did not include the eligible graduated student.'
|
||||
}
|
||||
$degreeRejectBody = @{
|
||||
conclusion = 'NotGranted'
|
||||
comment = '端到端验证学位结论人工调整。'
|
||||
} | ConvertTo-Json
|
||||
Invoke-RestMethod `
|
||||
-Method Put `
|
||||
-Uri "http://localhost:5255/api/degree-awards/results/$($degreeResult.id)" `
|
||||
-Headers $collegeHeaders `
|
||||
-ContentType 'application/json' `
|
||||
-Body $degreeRejectBody |
|
||||
Out-Null
|
||||
$degreeRestoreBody = @{
|
||||
conclusion = 'Granted'
|
||||
comment = '恢复规则结论并完成授予发布。'
|
||||
} | ConvertTo-Json
|
||||
Invoke-RestMethod `
|
||||
-Method Put `
|
||||
-Uri "http://localhost:5255/api/degree-awards/results/$($degreeResult.id)" `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $degreeRestoreBody |
|
||||
Out-Null
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/degree-awards/batches/$($degreeBatch.id)/publish" `
|
||||
-Headers $headers |
|
||||
Out-Null
|
||||
}
|
||||
$degreeBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/degree-awards/batches/$($degreeBatch.id)" `
|
||||
-Headers $headers
|
||||
$collegeDegreeBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/degree-awards/batches/$($degreeBatch.id)" `
|
||||
-Headers $collegeHeaders
|
||||
if ($degreeBatch.status -ne 'Published' -or
|
||||
@($degreeBatch.results).Count -lt 1 -or
|
||||
@($collegeDegreeBatch.results).Count -lt 1) {
|
||||
throw 'Published degree-award results are not visible in the authorized college scope.'
|
||||
}
|
||||
|
||||
$clearanceBatches = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/graduation-clearance/batches' `
|
||||
-Headers $headers
|
||||
$clearanceBatch = @($clearanceBatches) |
|
||||
Where-Object { $_.name -eq '2030届端到端毕业离校手续' } |
|
||||
Select-Object -First 1
|
||||
if ($null -eq $clearanceBatch) {
|
||||
$clearanceBatchBody = @{
|
||||
name = '2030届端到端毕业离校手续'
|
||||
graduationYear = 2030
|
||||
notes = '验证校级、学院、辅导员分工办理与批次关闭。'
|
||||
items = @(
|
||||
@{
|
||||
code = 'FINANCE'
|
||||
name = '财务费用结清'
|
||||
responsibleUnit = '财务处'
|
||||
responsibleRole = 'AcademicAdmin'
|
||||
isRequired = $true
|
||||
},
|
||||
@{
|
||||
code = 'COLLEGE'
|
||||
name = '学院材料归档'
|
||||
responsibleUnit = '计算机学院'
|
||||
responsibleRole = 'CollegeAdmin'
|
||||
isRequired = $true
|
||||
},
|
||||
@{
|
||||
code = 'DORM'
|
||||
name = '宿舍退宿确认'
|
||||
responsibleUnit = '学生工作办公室'
|
||||
responsibleRole = 'Counselor'
|
||||
isRequired = $true
|
||||
}
|
||||
)
|
||||
} | ConvertTo-Json -Depth 5
|
||||
$createdClearanceBatch = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri 'http://localhost:5255/api/graduation-clearance/batches' `
|
||||
-Headers $headers `
|
||||
-ContentType 'application/json' `
|
||||
-Body $clearanceBatchBody
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/graduation-clearance/batches/$($createdClearanceBatch.id)/generate" `
|
||||
-Headers $headers |
|
||||
Out-Null
|
||||
$clearanceBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/graduation-clearance/batches/$($createdClearanceBatch.id)" `
|
||||
-Headers $headers
|
||||
if (@($clearanceBatch.records).Count -ne 3) {
|
||||
throw 'Graduation-clearance records were not generated for each configured item.'
|
||||
}
|
||||
$academicClearanceRecord = @($clearanceBatch.records) |
|
||||
Where-Object { $_.responsibleRole -eq 'AcademicAdmin' } |
|
||||
Select-Object -First 1
|
||||
$wrongRoleResponse = Invoke-WebRequest `
|
||||
-Method Put `
|
||||
-Uri "http://localhost:5255/api/graduation-clearance/records/$($academicClearanceRecord.id)" `
|
||||
-Headers $collegeHeaders `
|
||||
-ContentType 'application/json' `
|
||||
-Body (@{ status = 'Completed'; notes = '越权测试。' } | ConvertTo-Json) `
|
||||
-SkipHttpErrorCheck
|
||||
if ($wrongRoleResponse.StatusCode -ne 403) {
|
||||
throw 'College role was able to complete an academic-level clearance item.'
|
||||
}
|
||||
$counselorLoginBody = @{
|
||||
userName = 'counselor'
|
||||
password = 'Counselor@123456'
|
||||
} | ConvertTo-Json
|
||||
$counselorLogin = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri 'http://localhost:5255/api/auth/login' `
|
||||
-ContentType 'application/json' `
|
||||
-Body $counselorLoginBody
|
||||
$counselorHeaders = @{ Authorization = "Bearer $($counselorLogin.token)" }
|
||||
foreach ($record in @($clearanceBatch.records)) {
|
||||
$recordHeaders = switch ($record.responsibleRole) {
|
||||
'CollegeAdmin' { $collegeHeaders }
|
||||
'Counselor' { $counselorHeaders }
|
||||
default { $headers }
|
||||
}
|
||||
$recordBody = @{
|
||||
status = 'Completed'
|
||||
notes = "$($record.responsibleUnit)端到端办理完成。"
|
||||
} | ConvertTo-Json
|
||||
Invoke-RestMethod `
|
||||
-Method Put `
|
||||
-Uri "http://localhost:5255/api/graduation-clearance/records/$($record.id)" `
|
||||
-Headers $recordHeaders `
|
||||
-ContentType 'application/json' `
|
||||
-Body $recordBody |
|
||||
Out-Null
|
||||
}
|
||||
Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "http://localhost:5255/api/graduation-clearance/batches/$($clearanceBatch.id)/close" `
|
||||
-Headers $headers |
|
||||
Out-Null
|
||||
}
|
||||
$clearanceBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/graduation-clearance/batches/$($clearanceBatch.id)" `
|
||||
-Headers $headers
|
||||
$collegeClearanceBatch = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/graduation-clearance/batches/$($clearanceBatch.id)" `
|
||||
-Headers $collegeHeaders
|
||||
if ($clearanceBatch.status -ne 'Closed' -or
|
||||
@($clearanceBatch.records | Where-Object { $_.status -eq 'Pending' }).Count -ne 0 -or
|
||||
@($collegeClearanceBatch.records).Count -lt 1) {
|
||||
throw 'Graduation-clearance batch was not closed or is missing from college scope.'
|
||||
}
|
||||
|
||||
$frontend = Invoke-WebRequest -Uri 'http://localhost:5255/' -TimeoutSec 5
|
||||
$spaFallback = Invoke-WebRequest -Uri 'http://localhost:5255/base-data' -TimeoutSec 5
|
||||
$unknownApiParameters = @{
|
||||
@@ -361,6 +771,14 @@ try {
|
||||
TranscriptRecords = @($studentTranscript.records).Count
|
||||
ExamSessions = @($examDetail.sessions).Count
|
||||
ExamRoster = @($examRoster.students).Count
|
||||
StatusChanges = @($completedStatusChanges).Count
|
||||
StudentStatus = $updatedStatusOptions.status
|
||||
GraduationResults = @($graduationBatch.results).Count
|
||||
GraduationConclusion = $studentGraduationResult.conclusion
|
||||
DegreeResults = @($degreeBatch.results).Count
|
||||
DegreeConclusion = $degreeBatch.results[0].conclusion
|
||||
ClearanceRecords = @($clearanceBatch.records).Count
|
||||
ClearanceStatus = $clearanceBatch.status
|
||||
AccessUpdate = $true
|
||||
ScopeChecks = $scopeChecks -join ', '
|
||||
StaticIndex = $frontend.Content.Contains('明序教务管理系统')
|
||||
|
||||
@@ -51,6 +51,31 @@ public sealed class DashboardController(AppDbContext db) : ControllerBase
|
||||
GradeRecords = await db.GradeRecords.CountAsync(cancellationToken),
|
||||
ExamPlans = await db.ExamPlans.CountAsync(cancellationToken),
|
||||
ExamSessions = await db.ExamSessions.CountAsync(cancellationToken),
|
||||
StudentStatusChanges = await db.StudentStatusChanges
|
||||
.CountAsync(cancellationToken),
|
||||
PendingStudentStatusChanges = await db.StudentStatusChanges.CountAsync(
|
||||
x => x.State == StudentStatusChangeState.Submitted ||
|
||||
x.State == StudentStatusChangeState.CounselorApproved ||
|
||||
x.State == StudentStatusChangeState.CollegeApproved,
|
||||
cancellationToken),
|
||||
GraduationAuditBatches = await db.GraduationAuditBatches
|
||||
.CountAsync(cancellationToken),
|
||||
PublishedGraduationAuditBatches = await db.GraduationAuditBatches
|
||||
.CountAsync(
|
||||
x => x.Status == GraduationAuditBatchStatus.Published,
|
||||
cancellationToken),
|
||||
DegreeAwardBatches = await db.DegreeAwardBatches
|
||||
.CountAsync(cancellationToken),
|
||||
PublishedDegreeAwardBatches = await db.DegreeAwardBatches
|
||||
.CountAsync(
|
||||
x => x.Status == DegreeAwardBatchStatus.Published,
|
||||
cancellationToken),
|
||||
GraduationClearanceBatches = await db.GraduationClearanceBatches
|
||||
.CountAsync(cancellationToken),
|
||||
OpenGraduationClearanceBatches = await db.GraduationClearanceBatches
|
||||
.CountAsync(
|
||||
x => x.Status == GraduationClearanceBatchStatus.Open,
|
||||
cancellationToken),
|
||||
Users = await db.Users.CountAsync(cancellationToken)
|
||||
}
|
||||
};
|
||||
|
||||
Loaded 3 of 34 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user