|
@ -74,10 +74,10 @@ module.exports = function (app, opts) { |
|
|
|
|
|
|
|
|
let overtimeCountStatisticWhere = [] |
|
|
let overtimeCountStatisticWhere = [] |
|
|
if (overtimeCountStatisticStartDate) { |
|
|
if (overtimeCountStatisticStartDate) { |
|
|
overtimeCountStatisticWhere.push(`overtime.start_time >= '${moment(overtimeCountStatisticStartDate).format('YYYY-MM-DD')}'`) |
|
|
overtimeCountStatisticWhere.push(`overtime.start_time >= '${moment(overtimeCountStatisticStartDate).startOf('day').format('YYYY-MM-DD HH:mm:ss')}'`) |
|
|
} |
|
|
} |
|
|
if (overtimeCountStatisticendDate) { |
|
|
if (overtimeCountStatisticendDate) { |
|
|
overtimeCountStatisticWhere.push(`overtime.end_time <= '${moment(overtimeCountStatisticendDate).format('YYYY-MM-DD')}'`) |
|
|
overtimeCountStatisticWhere.push(`overtime.end_time <= '${moment(overtimeCountStatisticendDate).endOf('day').format('YYYY-MM-DD HH:mm:ss')}'`) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let vacateDayStatisticWhere = [] |
|
|
let vacateDayStatisticWhere = [] |
|
@ -155,7 +155,7 @@ module.exports = function (app, opts) { |
|
|
) AS overtimeDayStatistic |
|
|
) AS overtimeDayStatistic |
|
|
ON overtimeDayStatistic.pepUserId = member.pep_user_id`: ''}
|
|
|
ON overtimeDayStatistic.pepUserId = member.pep_user_id`: ''}
|
|
|
|
|
|
|
|
|
${overtimeCountStatistic? ` |
|
|
${overtimeCountStatistic ? ` |
|
|
LEFT JOIN ( |
|
|
LEFT JOIN ( |
|
|
SELECT |
|
|
SELECT |
|
|
overtime.pep_user_id AS pepUserId, |
|
|
overtime.pep_user_id AS pepUserId, |
|
|