fix: resume incomplete SCADA presentations

This commit is contained in:
2026-11-12 10:38:55 +08:00
parent db87323b69
commit 0be30b80bb
12 changed files with 420 additions and 5 deletions
+6
View File
@@ -404,6 +404,12 @@ export class OperationalTaskClientError extends Error {
}
}
/** Feed a concrete Server coverage rejection back into the same active investigation. */
export function scadaPresentationContinuation(error: unknown): string | null {
if (!(error instanceof OperationalTaskClientError) || error.code !== "SCADA_PRESENTATION_INCOMPLETE") return null;
return `Server尚未接受本轮调查结束:${error.message}\n请按返回设备补充publish_task_presentation监测图,必要时更新publish_task_report。保留目标设备与真实缺测说明,完成后再结束本轮。`;
}
const parseJson = (text: string): unknown => {
if (!text.trim()) return {};
try {