ww664853070 2 years ago
parent
commit
e74ab3d398
  1. 12
      api/app/lib/controllers/attendance/index.js
  2. 1
      doc/scripts/PEP V3.5.0/01 update_member-birthday-typetoVarchar.sql

12
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

1
doc/scripts/PEP V3.5.0/01 update_member-birthday-typetoVarchar.sql

@ -0,0 +1 @@
alter table member alter column birthday type varchar(20) using birthday::varchar(20);
Loading…
Cancel
Save