实现业务附件受控入库 V1(05-28-business-attachment-governance-v1)
这个提交包含在:
@@ -1,4 +1,5 @@
|
||||
import { apiRequestBlob, apiRequestData, type ApiBlobResponse } from "./http";
|
||||
import { buildAttachmentFileUrl, type AttachmentGovernanceFields } from "../lib/attachmentGovernance";
|
||||
import type { RiskFlag } from "./feeControl";
|
||||
|
||||
export type PaymentBatchEntityType = "reimbursement" | "travel_order";
|
||||
@@ -64,6 +65,7 @@ export type PaymentBatchReceiptAttachment = {
|
||||
mimeType: string;
|
||||
fileSize: number;
|
||||
fileSha256: string;
|
||||
} & AttachmentGovernanceFields & {
|
||||
uploadedBy: {
|
||||
id: string;
|
||||
employeeNo: string;
|
||||
@@ -162,8 +164,9 @@ export function paymentBatchReceiptAttachmentFileUrl(batchId: string, attachment
|
||||
export async function downloadPaymentBatchReceiptAttachment(
|
||||
batchId: string,
|
||||
attachmentId: string,
|
||||
reason?: string,
|
||||
): Promise<ApiBlobResponse> {
|
||||
return apiRequestBlob(paymentBatchReceiptAttachmentFileUrl(batchId, attachmentId));
|
||||
return apiRequestBlob(buildAttachmentFileUrl(paymentBatchReceiptAttachmentFileUrl(batchId, attachmentId), reason));
|
||||
}
|
||||
|
||||
export async function deletePaymentBatchReceiptAttachment(batchId: string, attachmentId: string) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户