重构财务台账工具与异常优先页面(05-30-finance-ledger-tools-redesign)
这个提交包含在:
@@ -222,6 +222,9 @@ async function loadBatchWithItems(tx, batchId) {
|
||||
items: {
|
||||
orderBy: [{ created_at: "asc" }, { id: "asc" }],
|
||||
},
|
||||
_count: {
|
||||
select: { receipt_attachments: true },
|
||||
},
|
||||
},
|
||||
});
|
||||
if (!batch) {
|
||||
@@ -332,6 +335,7 @@ function mapBatch(batch, openRiskFlags = []) {
|
||||
reviewComment: batch.review_comment ?? null,
|
||||
secondaryReviewComment: batch.secondary_review_comment ?? null,
|
||||
executionSummaryJson: batch.execution_summary_json ?? null,
|
||||
receiptAttachmentCount: batch._count?.receipt_attachments ?? 0,
|
||||
createdAt: batch.created_at?.toISOString?.() ?? null,
|
||||
createdBy: batch.created_by ?? null,
|
||||
reviewedAt: batch.reviewed_at?.toISOString?.() ?? null,
|
||||
@@ -761,7 +765,10 @@ async function paymentBatchesRoutes(fastify) {
|
||||
...(query.entityType ? { entity_type: query.entityType } : {}),
|
||||
...(query.status ? { status: query.status } : {}),
|
||||
},
|
||||
include: { items: { orderBy: [{ created_at: "asc" }, { id: "asc" }] } },
|
||||
include: {
|
||||
items: { orderBy: [{ created_at: "asc" }, { id: "asc" }] },
|
||||
_count: { select: { receipt_attachments: true } },
|
||||
},
|
||||
orderBy: [{ created_at: "desc" }, { id: "desc" }],
|
||||
});
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户