已完成本轮迁移:管理后台、审批流和考务编排的业务 API 已全部由 ASP.NET Core 10 原生处理。
主要完成: 管理端招生工作台、指标资格、招生学校账号。 招生计划审核、分数优先多志愿投档、退档监督。 逐轮录取公示、报到审批、补录轮次推进、最低录取线公示。 成绩预览导入与管理员账号禁止物理删除。 新增迁移开关及健康状态:[MIGRATION.md (line 57)](C:\\Users\\BI\\Documents\\EIS-dotnet\\MIGRATION.md:57) 核心实现:[AdminAdmissionService.cs (line 10)](C:\\Users\\BI\\Documents\\EIS-dotnet\\src\\Eis.Infrastructure\\Administration\\AdminAdmissionService.cs:10) 原生路由:[NativeAdminReadEndpoints.cs (line 209)](C:\\Users\\BI\\Documents\\EIS-dotnet\\src\\Eis.Web\\Administration\\NativeAdminReadEndpoints.cs:209)
This commit is contained in:
@@ -485,6 +485,7 @@ try {
|
||||
ADMIN_NATIVE_EXAM_MANAGEMENT_ENABLED = 'true'
|
||||
ADMIN_NATIVE_ARRANGEMENTS_ENABLED = 'true'
|
||||
ADMIN_NATIVE_RESULTS_ENABLED = 'true'
|
||||
ADMIN_NATIVE_ADMISSIONS_ENABLED = 'true'
|
||||
ADMIN_NATIVE_ALLOW_MEMORY = 'true'
|
||||
LegacyNode__Enabled = 'true'
|
||||
LegacyNode__BaseUrl = $legacyBaseUrl
|
||||
@@ -851,6 +852,54 @@ try {
|
||||
throw 'Native admins route did not preserve the class-admin boundary'
|
||||
}
|
||||
|
||||
$legacyAdmissions = Invoke-WebRequest -Uri "$legacyBaseUrl/api/admin/admissions" -WebSession $session
|
||||
$nativeAdmissions = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/admissions" -WebSession $nativeSession
|
||||
if ($nativeAdmissions.Headers['X-EIS-Implementation'] -ne 'aspnet-core') {
|
||||
throw 'Native admission management did not use ASP.NET Core'
|
||||
}
|
||||
Assert-JsonEquivalent -Expected $legacyAdmissions.Content -Actual $nativeAdmissions.Content -Label 'Admission management workspace'
|
||||
$schoolAdmissionsForbidden = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/admissions" -WebSession $nativeSchoolSession -SkipHttpErrorCheck
|
||||
if ($schoolAdmissionsForbidden.StatusCode -ne 403) {
|
||||
throw 'Native admission management did not preserve the super-admin boundary'
|
||||
}
|
||||
$legacyQualifications = Invoke-WebRequest -Uri "$legacyBaseUrl/api/admin/indicator-qualifications" -WebSession $legacySchoolSession
|
||||
$nativeQualifications = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/indicator-qualifications" -WebSession $nativeSchoolSession
|
||||
if ($nativeQualifications.Headers['X-EIS-Implementation'] -ne 'aspnet-core') {
|
||||
throw 'Native indicator-qualification workspace did not use ASP.NET Core'
|
||||
}
|
||||
Assert-JsonEquivalent -Expected $legacyQualifications.Content -Actual $nativeQualifications.Content -Label 'Indicator qualification workspace'
|
||||
$invalidAdmissionSetting = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/admissions/missing-exam/setting" -Method Put -ContentType 'application/json' -Body '{}' -WebSession $nativeSession -SkipHttpErrorCheck
|
||||
if ($invalidAdmissionSetting.StatusCode -ne 404 -or $invalidAdmissionSetting.Headers['X-EIS-Implementation'] -ne 'aspnet-core') {
|
||||
throw 'Native admission setting did not reject a missing exam'
|
||||
}
|
||||
$nativeAdmissionState = $nativeAdmissions.Content | ConvertFrom-Json
|
||||
$admissionExam = @($nativeAdmissionState.exams | Select-Object -First 1)[0]
|
||||
$admissionSchool = @($nativeAdmissionState.admissionSchools | Select-Object -First 1)[0]
|
||||
if ($null -ne $admissionExam -and $null -ne $admissionSchool) {
|
||||
$invalidAdmissionPlanBody = @{
|
||||
examId = $admissionExam.id
|
||||
schoolId = $admissionSchool.id
|
||||
categories = @(
|
||||
@{
|
||||
code = 'invalid-specialty'
|
||||
name = '无效特长类别'
|
||||
quota = 1
|
||||
specialtyCategory = 'sports'
|
||||
specialtyType = 'vocal_music'
|
||||
indicatorAllocations = @()
|
||||
}
|
||||
)
|
||||
} | ConvertTo-Json -Depth 6 -Compress
|
||||
$invalidAdmissionPlan = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/admission-plans" -Method Post -ContentType 'application/json' -Body $invalidAdmissionPlanBody -WebSession $nativeSession -SkipHttpErrorCheck
|
||||
if ($invalidAdmissionPlan.StatusCode -ne 400 -or $invalidAdmissionPlan.Headers['X-EIS-Implementation'] -ne 'aspnet-core') {
|
||||
throw 'Native admission plan accepted a mismatched specialty category and type'
|
||||
}
|
||||
}
|
||||
$unsafeAdminDelete = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/admins/unsafe-delete" -Method Delete -WebSession $nativeSession -SkipHttpErrorCheck
|
||||
if ($unsafeAdminDelete.StatusCode -ne 405 -or $unsafeAdminDelete.Headers['X-EIS-Implementation'] -ne 'aspnet-core') {
|
||||
throw 'Native admin management did not preserve the no-delete safety boundary'
|
||||
}
|
||||
|
||||
$arrangementSessions = @(
|
||||
@{ Level = 'super'; Legacy = $session; Native = $nativeSession },
|
||||
@{ Level = 'school'; Legacy = $legacySchoolSession; Native = $nativeSchoolSession },
|
||||
@@ -973,6 +1022,21 @@ try {
|
||||
if ($invalidResult.StatusCode -ne 400) {
|
||||
throw 'Native result write accepted a score above the subject full score'
|
||||
}
|
||||
$invalidResultImportBody = @{
|
||||
rows = @(
|
||||
@{
|
||||
candidateNumber = ''
|
||||
examCode = ''
|
||||
subjectName = ''
|
||||
score = 0
|
||||
published = $false
|
||||
}
|
||||
)
|
||||
} | ConvertTo-Json -Depth 4 -Compress
|
||||
$invalidResultImport = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/results/import" -Method Post -ContentType 'application/json' -Body $invalidResultImportBody -WebSession $nativeSession -SkipHttpErrorCheck
|
||||
if ($invalidResultImport.StatusCode -ne 400 -or $invalidResultImport.Headers['X-EIS-Implementation'] -ne 'aspnet-core') {
|
||||
throw 'Native result import accepted an invalid preview row'
|
||||
}
|
||||
$score = [Math]::Min([double] $resultSubject.fullScore, 88.5)
|
||||
$bulkDraftBody = @{
|
||||
examId = $arrangementExam.id
|
||||
@@ -1832,6 +1896,7 @@ try {
|
||||
NativeAdminExamManagement = 'passed'
|
||||
NativeAdminArrangements = 'passed'
|
||||
NativeAdminResults = 'passed'
|
||||
NativeAdminAdmissions = 'passed'
|
||||
} | Format-List
|
||||
}
|
||||
finally {
|
||||
|
||||
Reference in New Issue
Block a user