|
|
@ -130,7 +130,7 @@ async function exportOvertimeStatistic (ctx) { |
|
|
|
.concat(overtimeTypeHeader) |
|
|
|
.concat(sumOvertimeTypeHeader) |
|
|
|
|
|
|
|
const fileName = `加班统计_${startDate ? moment(startDate).format('YYYY-MM-DD') : ''}-${endDate ? moment(endDate).format('YYYY-MM-DD') : ''}_${moment().format('YYYYMMDDHHmmss')}` + '.csv' |
|
|
|
const fileName = `加班统计_${startDate ? moment(startDate).format('YYYY-MM-DD') : ''}${startDate && endDate ? '-' : ''}${endDate ? moment(endDate).format('YYYY-MM-DD') : ''}${startDate || endDate ? '_' : ''}${moment().format('YYYYMMDDHHmmss')}` + '.csv' |
|
|
|
const filePath = await simpleExcelDown({ data: returnD, header, fileName: fileName }) |
|
|
|
const fileData = fs.readFileSync(filePath); |
|
|
|
|
|
|
@ -151,7 +151,7 @@ async function vacateType (ctx) { |
|
|
|
try { |
|
|
|
const { models } = ctx.fs.dc; |
|
|
|
const { clickHouse } = ctx.app.fs |
|
|
|
|
|
|
|
|
|
|
|
const vacateTypeRes = await clickHouse.hr.query(` |
|
|
|
SELECT type FROM vacate GROUP BY type ORDER BY type DESC |
|
|
|
`).toPromise()
|
|
|
|