From bfe5cc3ab27f92d9b3c75ca53fa4d0ebf66c0e2c Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Fri, 21 Oct 2022 12:31:36 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=A1=A3=E6=A1=88=E5=92=8C=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=8A=A0=E7=8F=AD=E6=97=B6=E9=97=B4=E4=B8=8D=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/member/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index 7f5f435..9aacd54 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -309,8 +309,8 @@ async function overTimeStatistics (ctx) { const timeOption = [] if (startDate && endDate) { timeOption.push( - `wpStory.create_at <= '${moment(endDate).endOf('day').format('YYYY-MM-DD HH:mm:ss')}' - AND wpStory.create_at >= '${moment(startDate).startOf('day').format('YYYY-MM-DD HH:mm:ss')}'` + `start_time <= '${moment(endDate).endOf('day').format('YYYY-MM-DD HH:mm:ss')}' + AND start_time >= '${moment(startDate).startOf('day').format('YYYY-MM-DD HH:mm:ss')}'` ) } const dataRes = await clickHouse.hr.query(` @@ -332,8 +332,8 @@ async function overTimeStatistics (ctx) { overtime INNER JOIN ${pepEmis}.workflow_process_history AS wpStory ON wpStory.id = overtime.pep_process_story_id - ${timeOption.length ? `AND ${timeOption.join(' AND ')}` : ''} WHERE overtime.pep_user_id = ${pepUserId} + ${timeOption.length ? `AND ${timeOption.join(' AND ')}` : ''} `).toPromise() const statisticRes = await clickHouse.hr.query(`