generated-scene: add scheduled monitoring runtime and helper lifecycle hardening

This commit is contained in:
木炎
2026-05-06 09:47:12 +08:00
parent 6cdd71b682
commit 8162118e6d
183 changed files with 103674 additions and 130 deletions

View File

@@ -0,0 +1,63 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Paginated Enrichment Timeout Warning Expansion Fixture</title>
</head>
<body>
<script>
const sourceUrl = "http://yx.gs.sgcc.com.cn";
async function getTicketTimeoutWarningPage(pageNum, pageSize) {
return $.ajax({
url: "http://yx.gs.sgcc.com.cn/workorder/ticketTimeoutWarningPage",
type: "POST",
contentType: "application/json",
data: JSON.stringify({ pageNum, pageSize, sourceTypes: ["95598"], warningType: "timeout" })
});
}
async function getTicketTimeoutWarningDetail(ticketNo) {
return $.ajax({
url: "http://yx.gs.sgcc.com.cn/workorder/ticketTimeoutWarningDetail",
type: "POST",
contentType: "application/json",
data: JSON.stringify({ ticketNo })
});
}
async function executeTask() {
const rows = [];
let pageNum = 1;
const pageSize = 40;
while (pageNum < 12) {
const response = await getTicketTimeoutWarningPage(pageNum, pageSize);
const list = response.rows || [];
if (!list.length) break;
for (const item of list) {
const detail = await querySecondary(item.ticketNo);
rows.push({
ticketNo: item.ticketNo,
riskLevel: detail.riskLevel,
timeoutHours: detail.timeoutHours
});
}
pageNum += 1;
}
const aggregated = rows.filter(
row => row.riskLevel !== "LOW" && row.timeoutHours > 0 && row.ticketNo
);
exportExcel(aggregated);
return aggregated;
}
async function querySecondary(ticketNo) {
return getTicketTimeoutWarningDetail(ticketNo);
}
function exportExcel(rows) {
return rows.length;
}
</script>
</body>
</html>