|
@ -375,7 +375,7 @@ async function overTimeStatistics (ctx) { |
|
|
let returnD = { |
|
|
let returnD = { |
|
|
...(statisticRes.length ? statisticRes[0] : {}), |
|
|
...(statisticRes.length ? statisticRes[0] : {}), |
|
|
data: dataRes, |
|
|
data: dataRes, |
|
|
dayStatisticData: statisticDayRes |
|
|
dayStatisticData: statisticDayRes.sort((a,b)=>moment(a.day)-moment(b.day)) |
|
|
} |
|
|
} |
|
|
ctx.status = 200; |
|
|
ctx.status = 200; |
|
|
ctx.body = returnD |
|
|
ctx.body = returnD |
|
@ -465,7 +465,7 @@ async function vacateStatistics (ctx) { |
|
|
let returnD = { |
|
|
let returnD = { |
|
|
statistic: statisticRes, |
|
|
statistic: statisticRes, |
|
|
data: dataRes, |
|
|
data: dataRes, |
|
|
dayStatisticData: statisticDayRes |
|
|
dayStatisticData: statisticDayRes.sort((a,b)=>moment(a.day)-moment(b.day)) |
|
|
} |
|
|
} |
|
|
ctx.status = 200; |
|
|
ctx.status = 200; |
|
|
ctx.body = returnD |
|
|
ctx.body = returnD |
|
|