1
This commit is contained in:
@@ -203,7 +203,8 @@ module.exports = {
|
||||
interviewCount,
|
||||
todayCount,
|
||||
weekCount,
|
||||
monthCount
|
||||
monthCount,
|
||||
totalJobCount
|
||||
] = await Promise.all([
|
||||
// 总计(如果提供了时间范围,则只统计该范围内的)
|
||||
apply_records.count({ where: baseWhere }),
|
||||
@@ -211,6 +212,7 @@ module.exports = {
|
||||
apply_records.count({ where: { ...baseWhere, applyStatus: 'failed' } }),
|
||||
apply_records.count({ where: { ...baseWhere, applyStatus: 'pending' } }),
|
||||
apply_records.count({ where: { ...baseWhere, feedbackStatus: 'interview' } }),
|
||||
|
||||
// 今日(如果提供了时间范围,则返回0,否则统计今日)
|
||||
startTime || endTime ? 0 : apply_records.count({
|
||||
where: {
|
||||
@@ -231,7 +233,14 @@ module.exports = {
|
||||
sn_code: final_sn_code,
|
||||
create_time: { [op.gte]: monthStart }
|
||||
}
|
||||
})
|
||||
}),
|
||||
// 总职位数
|
||||
job_postings.count({
|
||||
where: {
|
||||
sn_code: final_sn_code,
|
||||
create_time: { [op.gte]: todayStart }
|
||||
}
|
||||
}),
|
||||
]);
|
||||
|
||||
return ctx.success({
|
||||
@@ -243,6 +252,7 @@ module.exports = {
|
||||
todayCount,
|
||||
weekCount,
|
||||
monthCount,
|
||||
totalJobCount,
|
||||
successRate: totalCount > 0 ? ((successCount / totalCount) * 100).toFixed(2) : 0,
|
||||
interviewRate: totalCount > 0 ? ((interviewCount / totalCount) * 100).toFixed(2) : 0
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user