diff --git a/api/app/lib/controllers/attendance/index.js b/api/app/lib/controllers/attendance/index.js index c01ca40..96eb2cb 100644 --- a/api/app/lib/controllers/attendance/index.js +++ b/api/app/lib/controllers/attendance/index.js @@ -2,7 +2,7 @@ const moment = require('moment') const fs = require('fs'); -async function overtimeStatistic (ctx) { +async function overtimeStatistic(ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -47,7 +47,7 @@ async function overtimeStatistic (ctx) { } } -async function exportOvertimeStatistic (ctx) { +async function exportOvertimeStatistic(ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -92,7 +92,7 @@ async function exportOvertimeStatistic (ctx) { d['sum' + overtimeTypeKey] = overtimeStatistic.reduce((sum, o) => { if (o.compensate == overtimeTypeKey) { sum += o.duration / 3600 - totalDuration += o.duration / 3600 + // totalDuration += o.duration / 3600 } return sum }, 0) @@ -158,7 +158,7 @@ async function exportOvertimeStatistic (ctx) { } } -async function vacateType (ctx) { +async function vacateType(ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -178,7 +178,7 @@ async function vacateType (ctx) { } } -async function vacateStatistic (ctx) { +async function vacateStatistic(ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs @@ -224,7 +224,7 @@ async function vacateStatistic (ctx) { } } -async function exportVacateStatistic (ctx) { +async function exportVacateStatistic(ctx) { try { const { models } = ctx.fs.dc; const { clickHouse } = ctx.app.fs