本阶段迁移已完成。
Excel:班级、账号、考生、缴费、考场、成绩、志愿、录取、报到及正式录取名册均改为 ClosedXML 原生处理,支持模板、校验、筛选和导入预检。[SystemWorkbook.cs](C:\\Users\\BI\\Documents\\EIS-dotnet\\src\\Eis.Infrastructure\\Spreadsheets\\SystemWorkbook.cs) 文书:录取通知书模板、成绩单/准考证/通知书业务数据与防伪验真已脱离 Node;保留现有前端排版导出效果。[AdminAdmissionService.Documents.cs](C:\\Users\\BI\\Documents\\EIS-dotnet\\src\\Eis.Infrastructure\\Administration\\AdminAdmissionService.Documents.cs) 缓存:完成 Redis 命名空间版本缓存、有界本地回退、请求合并和并发失效保护;公开数据及成绩写入后立即失效。[ApplicationCache.cs](C:\\Users\\BI\\Documents\\EIS-dotnet\\src\\Eis.Infrastructure\\Caching\\ApplicationCache.cs) 迁移清单已更新为完成。[MIGRATION.md](C:\\Users\\BI\\Documents\\EIS-dotnet\\MIGRATION.md)
This commit is contained in:
@@ -1111,6 +1111,37 @@ try {
|
||||
$resultExport.RawContentLength -lt 1000) {
|
||||
throw 'Native result workbook export is invalid'
|
||||
}
|
||||
foreach ($excelResource in @('classes', 'class_admins', 'account_quotas', 'candidates', 'payments', 'centers')) {
|
||||
$excelExport = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/excel/$excelResource" -WebSession $nativeSession
|
||||
if ($excelExport.Headers['X-EIS-Implementation'] -ne 'aspnet-core' -or
|
||||
$excelExport.Headers['Content-Type'] -notmatch 'spreadsheetml' -or
|
||||
$excelExport.RawContentLength -lt 1000) {
|
||||
throw "Native '$excelResource' workbook export is invalid"
|
||||
}
|
||||
}
|
||||
$accountResultTemplate = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/excel/account_results?template=1" -WebSession $nativeSession
|
||||
if ($accountResultTemplate.Headers['X-EIS-Implementation'] -ne 'aspnet-core' -or
|
||||
$accountResultTemplate.Headers['Content-Type'] -notmatch 'spreadsheetml' -or
|
||||
$accountResultTemplate.RawContentLength -lt 1000) {
|
||||
throw "Native 'account_results' workbook template is invalid"
|
||||
}
|
||||
foreach ($ledgerKind in @('preferences', 'placements')) {
|
||||
$ledgerExport = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admin/admissions/$ledgerKind/export" -WebSession $nativeSession
|
||||
if ($ledgerExport.Headers['X-EIS-Implementation'] -ne 'aspnet-core' -or
|
||||
$ledgerExport.Headers['Content-Type'] -notmatch 'spreadsheetml' -or
|
||||
$ledgerExport.RawContentLength -lt 1000) {
|
||||
throw "Native admission '$ledgerKind' ledger workbook export is invalid"
|
||||
}
|
||||
}
|
||||
$admissionSchoolSession = [Microsoft.PowerShell.Commands.WebRequestSession]::new()
|
||||
$admissionSchoolLoginBody = @{ username = 'admission_1_admin'; password = '12345678' } | ConvertTo-Json -Compress
|
||||
Invoke-RestMethod -Uri "$nativeAuthBaseUrl/api/auth/login" -Method Post -ContentType 'application/json' -Body $admissionSchoolLoginBody -WebSession $admissionSchoolSession | Out-Null
|
||||
foreach ($admissionSchoolRoute in @('notice-template', 'reporting', 'placements')) {
|
||||
$admissionSchoolResponse = Invoke-WebRequest -Uri "$nativeAuthBaseUrl/api/admission/$admissionSchoolRoute" -WebSession $admissionSchoolSession
|
||||
if ($admissionSchoolResponse.Headers['X-EIS-Implementation'] -ne 'aspnet-core') {
|
||||
throw "Native admission-school route '$admissionSchoolRoute' did not use ASP.NET Core"
|
||||
}
|
||||
}
|
||||
$legacyResultsAfterWrites = Invoke-WebRequest -Uri "$legacyBaseUrl$resultsUri" -WebSession $session
|
||||
$nativeResultsAfterWrites = Invoke-WebRequest -Uri "$nativeAuthBaseUrl$resultsUri" -WebSession $nativeSession
|
||||
Assert-JsonEquivalent -Expected $legacyResultsAfterWrites.Content -Actual $nativeResultsAfterWrites.Content -Label 'Result writes follow-up'
|
||||
|
||||
Reference in New Issue
Block a user