R111/A3-A6 强化发票查重和状态治理
这个提交包含在:
@@ -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;
|
||||
|
||||
在新工单中引用
屏蔽一个用户