重构财务台账工具与异常优先页面(05-30-finance-ledger-tools-redesign)

这个提交包含在:
2026-05-30 12:22:06 +08:00
父节点 c4edb12bb8
当前提交 51a1347827
共修改 17 个文件,包含 305 行新增和 117 行删除
+8 -1
查看文件
@@ -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" }],
});