From 5cea327e1c16993e26308add9ad080da0747cb29 Mon Sep 17 00:00:00 2001 From: zhaobing Date: Fri, 7 Jul 2023 10:18:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E7=B3=BB=E7=BB=9F=E5=8F=AF=E7=94=A8?= =?UTF-8?q?=E6=80=A7=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/operationData/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/controllers/operationData/index.js b/api/app/lib/controllers/operationData/index.js index 9b7ccae..6ff2d71 100644 --- a/api/app/lib/controllers/operationData/index.js +++ b/api/app/lib/controllers/operationData/index.js @@ -44,7 +44,7 @@ async function getSystemAvailability(ctx) { try { const res = await sequelize.query( `SELECT substring(to_char(w.wmonth,'yyyy-mm'),1,7) wmonth, - COALESCE((w.seconds-e.counts)/w.seconds,0) ability + COALESCE((w.seconds-e.counts)/w.seconds,1) ability from ( SELECT to_char(maintenance_record.occurrence_time, 'yyyy-MM') months, SUM(maintenance_record.interrupt_duration) counts