fix: 免审验收容错与成本中心归一回填超时修复
- worker:等级升级计数移出验收事务,瞬时错误重试一次,最终失败转人工待办且不再返回 500 - worker:待验收阶段修改验收资料时保留 reviewMode/evidenceStatus/evidenceDueAt - cost-center:迁移 107 新增人工待归一覆盖部分索引(生产实测候选聚合 19.6s → 391ms) - cost-center:归一人工商品/按工单回填商品/模板预览前端超时放宽到 300s - cost-center:批处理接口语句超时放宽到 60s(SET LOCAL,在线接口仍为 15s)
This commit is contained in:
@@ -106,6 +106,36 @@ export async function createWorkerAcceptanceAdminNotification(input: {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 免审核自动结算没跑完(多为库被回填/批量同步压到 statement_timeout):
|
||||
* 验收资料已落库、订单留在待验收,给后台落一条高优先级待办,督促人工验收。
|
||||
*/
|
||||
export async function createWorkOrderAutoAcceptFailureAdminNotification(input: {
|
||||
workOrderId: number
|
||||
workOrderNo: string
|
||||
productName: string
|
||||
workerName: string
|
||||
reason?: string
|
||||
}) {
|
||||
return createConfiguredWorkerPlatformNotification('acceptance_submitted', {
|
||||
notificationType: 'worker_auto_accept_failed',
|
||||
priority: 'high',
|
||||
entityType: 'work_order',
|
||||
entityId: input.workOrderId,
|
||||
dedupeKey: `work_order_auto_accept_failed:${input.workOrderId}`,
|
||||
title: 'VIP 免审自动验收失败,已转人工',
|
||||
body: [
|
||||
`订单:${input.workOrderNo || input.workOrderId}`,
|
||||
`商品:${input.productName || '-'}`,
|
||||
`打手:${input.workerName || '-'}`,
|
||||
`原因:${input.reason || '结算超时'}`,
|
||||
'处理:请在待验收列表人工验收',
|
||||
].join(';'),
|
||||
actionPath: `${ADMIN_WORKER_PLATFORM_PATH}?tab=orders`,
|
||||
now: new Date().toISOString(),
|
||||
})
|
||||
}
|
||||
|
||||
/** 整单(含拼单全部份额)验收完成:单独一条完成通知,不与待验收待办混用。 */
|
||||
export async function createWorkOrderFullyAcceptedAdminNotification(input: {
|
||||
workOrderId: number
|
||||
|
||||
Reference in New Issue
Block a user