|
|
@ -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 |
|
|
|