R111/A3-A6 强化发票查重和状态治理

这个提交包含在:
2026-05-08 10:05:27 +08:00
父节点 77fbfb5eb8
当前提交 0ab0740d1a
共修改 8 个文件,包含 888 行新增和 53 行删除
@@ -62,11 +62,20 @@ function buildPrisma({ processedTaskCount = 0 } = {}) {
},
invoice: {
id: INVOICE_ID,
owner_employee_id: OWNER_ID,
uploaded_by_employee_id: OWNER_ID,
status: "bound",
linked_reimbursement_id: REIMBURSEMENT_ID,
linked_item_id: ITEM_ID,
travel_order_id: null,
archived_reason: null,
file_sha256: "sha256-invoice",
invoice_code: "044001",
invoice_number: "12345678",
invoice_date: new Date("2026-05-01T00:00:00.000Z"),
seller_name: "测试销售方",
total_amount: "1683.00",
is_duplicate_override: false,
},
processedTaskCount,
};
@@ -111,6 +120,7 @@ function buildPrisma({ processedTaskCount = 0 } = {}) {
create: vi.fn(async () => ({ id: "history-1" })),
},
invoicePool: {
findMany: vi.fn(async () => []),
findUnique: vi.fn(async ({ where, select }) => {
if (!state.invoice || where.id !== state.invoice.id) {
return null;