fix(oa-board): honor canceled returned tasks

This commit is contained in:
jingchuan 2026-07-17 17:14:54 +08:00
parent 83b12fc11f
commit bb3445fdd1

View File

@ -1161,13 +1161,18 @@ function isNewerSourceTaskRow(nextRow: SourceTaskRow, currentRow: SourceTaskRow)
if (nextValue.createdAt !== currentValue.createdAt) {
return nextValue.createdAt > currentValue.createdAt
}
// 同一任务的状态变更沿用原创建时间,源表自增 ID 才能区分最新日志。
// 例如退回后写入的 CANCELED 必须覆盖此前的 RUNNING。
if (nextValue.rowId !== currentValue.rowId) {
return nextValue.rowId > currentValue.rowId
}
if (nextValue.statusPriority !== currentValue.statusPriority) {
return nextValue.statusPriority > currentValue.statusPriority
}
if (nextValue.resultPriority !== currentValue.resultPriority) {
return nextValue.resultPriority > currentValue.resultPriority
}
return nextValue.rowId > currentValue.rowId
return false
}
function buildTaskRecordsWithMappings(