本批“工作流调度”迁移完成:

GET /api/admin/workflow-instances
PATCH /api/admin/workflow-instances/{id}/transfer
PATCH /api/admin/workflow-instances/{id}/supervise
覆盖资料变更、报名审核、考点变更、批量报名号和成绩复议五类流程,并实现同级转交、范围校验、超级管理员监督回退及业务状态同步重置。
This commit is contained in:
biss committed 2026-07-23 10:21:24 +08:00
1 parent 7fd20caf3e
commit 2589305f3c
15 files changed
+697 -13

No files matched your search

@@ -0,0 +1,10 @@
using System.Text.Json.Nodes;
namespace Eis.Application.Administration;
public interface IAdminWorkflowService
{
Task<AdminEndpointResult> GetAsync(string sessionToken, CancellationToken cancellationToken);
Task<AdminEndpointResult> TransferAsync(string sessionToken, string instanceId, JsonObject body, CancellationToken cancellationToken);
Task<AdminEndpointResult> SuperviseAsync(string sessionToken, string instanceId, JsonObject body, CancellationToken cancellationToken);
}
@@ -167,7 +167,7 @@ internal sealed class AdminAccountBatchService(
}));
}
private static JsonObject BatchView(AdminAccountBatchSnapshot snapshot, AccountBatch batch, IReadOnlyList<AccountBatchItem>? itemOverride = null, AccountWorkflowInstance? instanceOverride = null, IReadOnlyList<AccountWorkflowAction>? extraActions = null)
internal static JsonObject BatchView(AdminAccountBatchSnapshot snapshot, AccountBatch batch, IReadOnlyList<AccountBatchItem>? itemOverride = null, AccountWorkflowInstance? instanceOverride = null, IReadOnlyList<AccountWorkflowAction>? extraActions = null)
{
var items = (itemOverride ?? snapshot.Items.Where(item => item.BatchId == batch.Id).ToArray()).OrderBy(item => item.Position).ToArray();
var quotas = items.GroupBy(item => item.ClassId).Select(group => { var schoolClass = snapshot.Classes.FirstOrDefault(item => item.Id == group.Key); return new JsonObject { ["classId"] = group.Key, ["className"] = schoolClass?.Name ?? "未知班级", ["grade"] = schoolClass?.Grade ?? "", ["count"] = group.Count() }; }).ToArray();
@@ -308,7 +308,7 @@ internal sealed class AdminCenterService(
};
}
private static JsonObject ChangeJson(
internal static JsonObject ChangeJson(
AdminAccountBatchSnapshot workflow,
AdminCenterSnapshot centers,
AdminCenterChange item,
Loaded 3 of 15 files, more files were not shown because too many files have changed in this diff. Show more