feat: add A-card operations frontend and backend foundation
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
import { MODELS, categoryName, type ModelCategoryId } from "./modelData";
|
||||
|
||||
export type WorkflowStage = {
|
||||
stage: number;
|
||||
title: string;
|
||||
businessDuty: string;
|
||||
modelDuty: string;
|
||||
};
|
||||
|
||||
export type WorkflowFile = {
|
||||
name: string;
|
||||
uploadedBy: string;
|
||||
uploadedAt: string;
|
||||
confirmed: boolean;
|
||||
};
|
||||
|
||||
export type WorkflowInstance = {
|
||||
workflowId: string;
|
||||
title: string;
|
||||
bank: string;
|
||||
category: ModelCategoryId;
|
||||
modelId: string;
|
||||
initiatedBy: string;
|
||||
initiatedAt: string;
|
||||
currentStage: number;
|
||||
completedAt?: string;
|
||||
reusedModel?: string;
|
||||
deadline?: string;
|
||||
plannedTestAt?: string;
|
||||
plannedOnlineAt?: string;
|
||||
stalledDays?: number;
|
||||
files: Partial<Record<number, WorkflowFile[]>>;
|
||||
};
|
||||
|
||||
export type KnowledgeDocument = WorkflowFile & {
|
||||
workflowId: string;
|
||||
workflowTitle: string;
|
||||
bank: string;
|
||||
modelName: string;
|
||||
modelVersion: string;
|
||||
modelId: string;
|
||||
stage: string;
|
||||
commonModel: boolean;
|
||||
};
|
||||
|
||||
export type UsageRecord = {
|
||||
person: string;
|
||||
team: "业务团队" | "模型团队" | "管理员";
|
||||
logins: number;
|
||||
requests: number;
|
||||
reportsRead: number;
|
||||
reportsDownloaded: number;
|
||||
lastLoginAt: string;
|
||||
};
|
||||
|
||||
export const WORKFLOW_STAGES: WorkflowStage[] = [
|
||||
{ stage: 1, title: "需求提出", businessDuty: "通过平台提出需求,平台通知模型团队", modelDuty: "首次响应需求" },
|
||||
{ stage: 2, title: "方案设计", businessDuty: "在最晚反馈时间前反馈模型设计方案意见", modelDuty: "提交模型设计方案并设置最晚反馈时间" },
|
||||
{ stage: 3, title: "开发迭代", businessDuty: "无需确认开发材料", modelDuty: "通过模型平台开发或迭代,提交最终开发结果材料" },
|
||||
{ stage: 4, title: "模型验证", businessDuty: "支持上传业务验证材料", modelDuty: "提交新老模型对比数据及预计评审时间" },
|
||||
{ stage: 5, title: "评审决议", businessDuty: "确认最终评审材料并设置测试或陪跑预计日期", modelDuty: "提交会议结论、修改意见结果与最终材料" },
|
||||
{ stage: 6, title: "测试陪跑", businessDuty: "确认测试文件和一致性报告", modelDuty: "提交模型测试文件、一致性报告等材料" },
|
||||
{ stage: 7, title: "部署上线", businessDuty: "确认后设置预计上线时间", modelDuty: "确认模型正式上线并登记是否为通用模型" },
|
||||
];
|
||||
|
||||
export const WORKFLOWS: WorkflowInstance[] = [
|
||||
{
|
||||
workflowId: "F1", title: "南岭银行 · 标准A卡 迭代", bank: "南岭银行", category: "std", modelId: "NL-STD-001",
|
||||
initiatedBy: "业务团队 张明", initiatedAt: "2026-07-28", currentStage: 4, deadline: "2026-08-08", stalledDays: 12,
|
||||
files: {
|
||||
2: [{ name: "NL标准A卡_模型设计方案_v2.docx", uploadedBy: "模型团队 李伟", uploadedAt: "2026-08-04", confirmed: true }],
|
||||
3: [{ name: "开发结果材料_入模变量与效果.xlsx", uploadedBy: "模型团队 李伟", uploadedAt: "2026-08-14", confirmed: false }],
|
||||
},
|
||||
},
|
||||
{
|
||||
workflowId: "F2", title: "滨海银行 · 新增标准A卡", bank: "滨海银行", category: "std", modelId: "BH-STD-001",
|
||||
initiatedBy: "业务团队 张明", initiatedAt: "2026-06-12", currentStage: 6, plannedTestAt: "2026-07-30",
|
||||
files: {
|
||||
2: [{ name: "BH标准A卡_设计方案.docx", uploadedBy: "模型团队 王芳", uploadedAt: "2026-06-20", confirmed: true }],
|
||||
3: [{ name: "开发结果_变量清单.xlsx", uploadedBy: "模型团队 王芳", uploadedAt: "2026-07-08", confirmed: true }],
|
||||
4: [{ name: "新老模型对比数据.xlsx", uploadedBy: "模型团队 王芳", uploadedAt: "2026-07-15", confirmed: true }],
|
||||
5: [
|
||||
{ name: "评审会议纪要_20260722.docx", uploadedBy: "模型团队 王芳", uploadedAt: "2026-07-23", confirmed: true },
|
||||
{ name: "最终评审材料.pptx", uploadedBy: "模型团队 王芳", uploadedAt: "2026-07-23", confirmed: true },
|
||||
],
|
||||
6: [
|
||||
{ name: "模型测试文件.zip", uploadedBy: "模型团队 王芳", uploadedAt: "2026-07-28", confirmed: false },
|
||||
{ name: "一致性报告.pdf", uploadedBy: "模型团队 王芳", uploadedAt: "2026-07-28", confirmed: false },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
workflowId: "F3", title: "华东银行 · 反欺诈评分 重构", bank: "华东银行", category: "afd", modelId: "HD-AFD-001",
|
||||
initiatedBy: "业务团队 陈静", initiatedAt: "2026-08-11", currentStage: 1, files: {},
|
||||
},
|
||||
{
|
||||
workflowId: "H1", title: "华东银行 · 标准A卡 新增(复用通用版)", bank: "华东银行", category: "std", modelId: "HD-STD-001",
|
||||
initiatedBy: "业务团队 张明", initiatedAt: "2026-03-04", currentStage: 8, completedAt: "2026-04-02", reusedModel: "标准A卡通用版 v2.3", plannedTestAt: "2026-03-18", plannedOnlineAt: "2026-04-02", files: {},
|
||||
},
|
||||
{
|
||||
workflowId: "H2", title: "云岭银行 · 标准A卡 新增(复用通用版)", bank: "云岭银行", category: "std", modelId: "YL-STD-001",
|
||||
initiatedBy: "业务团队 张明", initiatedAt: "2026-01-06", currentStage: 8, completedAt: "2026-02-05", reusedModel: "标准A卡通用版 v2.3", plannedTestAt: "2026-01-20", plannedOnlineAt: "2026-02-05", files: {},
|
||||
},
|
||||
{
|
||||
workflowId: "H3", title: "江城银行 · 大额A卡 新增", bank: "江城银行", category: "big", modelId: "JC-BIG-001",
|
||||
initiatedBy: "业务团队 张明", initiatedAt: "2025-11-12", currentStage: 8, completedAt: "2026-01-08", plannedTestAt: "2025-12-15", plannedOnlineAt: "2026-01-08", files: {},
|
||||
},
|
||||
{
|
||||
workflowId: "H4", title: "南岭银行 · 白户A卡 迭代", bank: "南岭银行", category: "bai", modelId: "NL-BAI-001",
|
||||
initiatedBy: "业务团队 陈静", initiatedAt: "2026-04-02", currentStage: 8, completedAt: "2026-05-22", plannedTestAt: "2026-04-28", plannedOnlineAt: "2026-05-22", files: {},
|
||||
},
|
||||
{
|
||||
workflowId: "H5", title: "通汇银行 · 白户A卡 新增(复用通用版)", bank: "通汇银行", category: "bai", modelId: "TH-BAI-001",
|
||||
initiatedBy: "业务团队 张明", initiatedAt: "2026-01-15", currentStage: 8, completedAt: "2026-02-11", reusedModel: "白户A卡通用版 v1.4", plannedTestAt: "2026-02-01", plannedOnlineAt: "2026-02-11", files: {},
|
||||
},
|
||||
];
|
||||
|
||||
export const USAGE_RECORDS: UsageRecord[] = [
|
||||
{ person: "张明", team: "业务团队", logins: 42, requests: 6, reportsRead: 18, reportsDownloaded: 11, lastLoginAt: "2026-08-21" },
|
||||
{ person: "陈静", team: "业务团队", logins: 9, requests: 1, reportsRead: 4, reportsDownloaded: 1, lastLoginAt: "2026-08-11" },
|
||||
{ person: "周伟", team: "业务团队", logins: 3, requests: 0, reportsRead: 1, reportsDownloaded: 0, lastLoginAt: "2026-07-30" },
|
||||
{ person: "李伟", team: "模型团队", logins: 88, requests: 0, reportsRead: 36, reportsDownloaded: 24, lastLoginAt: "2026-08-21" },
|
||||
{ person: "王芳", team: "模型团队", logins: 76, requests: 0, reportsRead: 31, reportsDownloaded: 19, lastLoginAt: "2026-08-20" },
|
||||
{ person: "朱瑞", team: "模型团队", logins: 21, requests: 0, reportsRead: 9, reportsDownloaded: 5, lastLoginAt: "2026-08-14" },
|
||||
{ person: "王芳", team: "管理员", logins: 76, requests: 0, reportsRead: 31, reportsDownloaded: 19, lastLoginAt: "2026-08-20" },
|
||||
];
|
||||
|
||||
export function workflowDocuments(): KnowledgeDocument[] {
|
||||
return WORKFLOWS.flatMap((workflow) => Object.entries(workflow.files).flatMap(([stage, files]) => {
|
||||
const model = MODELS.find((item) => item.modelId === workflow.modelId);
|
||||
const stageName = WORKFLOW_STAGES.find((item) => item.stage === Number(stage))?.title ?? "未知环节";
|
||||
return (files ?? []).map((file) => ({
|
||||
...file,
|
||||
workflowId: workflow.workflowId,
|
||||
workflowTitle: workflow.title,
|
||||
bank: workflow.bank,
|
||||
modelName: categoryName(workflow.category),
|
||||
modelVersion: model?.version ?? "—",
|
||||
modelId: workflow.modelId,
|
||||
stage: stageName,
|
||||
commonModel: Boolean(model?.commonModel),
|
||||
}));
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user