fix(approval): isolate runs by corp, handle execution error, bundle hose-aipro alias, and bump to v0.7.1
This commit is contained in:
1 parent
77bd125ef3
commit
9fa4cfe38f
15 files changed
+156
-62
No files matched your search
@@ -101,7 +101,7 @@ export async function handleApprovalCommand(
|
||||
throw new Error("请提供单号或单据 ID: hose-use approval audit checklist <单号>");
|
||||
}
|
||||
|
||||
const { run, findings } = service.getAuditChecklist(targetSn);
|
||||
const { run, findings } = service.getAuditChecklist(targetSn, corpId);
|
||||
if (!run || findings.length === 0) {
|
||||
const errorMsg =
|
||||
`[审批链路阻断] 单据 [${targetSn}] 尚未注入任何明细级审核要点(要点列表为空)!\n` +
|
||||
@@ -195,7 +195,7 @@ export async function handleApprovalCommand(
|
||||
}
|
||||
|
||||
try {
|
||||
const updatedFindings = service.evaluateAuditPoints(targetSn, updates);
|
||||
const updatedFindings = service.evaluateAuditPoints(targetSn, updates, corpId);
|
||||
const headers = ["#", "严格程度", "审核要点内容", "核验状态", "事实证据与说明"];
|
||||
const rows = updatedFindings.map((f, i) => [
|
||||
i + 1,
|
||||
@@ -308,7 +308,7 @@ export async function handleApprovalCommand(
|
||||
}
|
||||
|
||||
// 检查当前是否已注入要点
|
||||
const { run } = service.getAuditChecklist(targetSn);
|
||||
const { run } = service.getAuditChecklist(targetSn, corpId);
|
||||
if (!run) {
|
||||
// 自动触发第一步:注入并出审核要点
|
||||
return await handleApprovalCommand(
|
||||
|
||||
Reference in new issue
Block a user