From a062d568b4fdb16165ffbc478107b094322a9723 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 22 Jan 2025 14:47:01 +0800 Subject: [PATCH] =?UTF-8?q?HR=E6=8E=A8=E8=8D=90-=E9=9D=A2=E8=AF=95?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E7=8E=87=E6=8A=A5=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Api/Controllers/ReportController.cs | 12 +++++++++++- Tiobon.Core.Api/Tiobon.Core.xml | 7 +++++++ Tiobon.Core.IServices/IReportServices.cs | 2 +- Tiobon.Core.Services/ReportServices.cs | 11 ++++++----- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/Tiobon.Core.Api/Controllers/ReportController.cs b/Tiobon.Core.Api/Controllers/ReportController.cs index 7d2134ff..000a8a6f 100644 --- a/Tiobon.Core.Api/Controllers/ReportController.cs +++ b/Tiobon.Core.Api/Controllers/ReportController.cs @@ -46,6 +46,16 @@ public class ReportController : BaseControllerlangId /// [HttpPost("QueryESSInterviewPassRate/{langId}")] - public async Task> QueryESSInterviewPassRate(int langId) => await _service.QueryESSInterviewPassRate(langId); + public async Task> QueryESSInterviewPassRate(int langId) => await _service.QueryInterviewPassRate(langId, App.User.StaffId); + #endregion + + #region HR推荐-简历筛选通过率 + /// + /// HR推荐-简历筛选通过率 + /// + /// langId + /// + [HttpPost("QueryInterviewPassRate/{langId}")] + public async Task> QueryInterviewPassRate(int langId) => await _service.QueryInterviewPassRate(langId); #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 826e4ff8..0b2072c7 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -604,6 +604,13 @@ langId + + + HR推荐-简历筛选通过率 + + langId + + 分页获取 diff --git a/Tiobon.Core.IServices/IReportServices.cs b/Tiobon.Core.IServices/IReportServices.cs index eef9fafd..672054f4 100644 --- a/Tiobon.Core.IServices/IReportServices.cs +++ b/Tiobon.Core.IServices/IReportServices.cs @@ -14,5 +14,5 @@ public interface IReportServices : IBaseServices> QueryESSResumeScreenPassRate(int langId = 1); - Task> QueryESSInterviewPassRate(int langId = 1); + Task> QueryInterviewPassRate(int langId = 1, int? staffId = null); } diff --git a/Tiobon.Core.Services/ReportServices.cs b/Tiobon.Core.Services/ReportServices.cs index 487bd3ef..7aa3c6cd 100644 --- a/Tiobon.Core.Services/ReportServices.cs +++ b/Tiobon.Core.Services/ReportServices.cs @@ -133,13 +133,13 @@ public partial class ReportServices : BaseServices - /// 面试官-面试通过率:面试官面试通过人数 / 已面试人数 × 100% + /// 面试官/HR推荐 - 面试通过率:面试官面试通过人数 / 已面试人数 × 100% /// /// /// - public async Task> QueryESSInterviewPassRate(int langId = 1) + public async Task> QueryInterviewPassRate(int langId = 1, int? staffId = null) { dynamic data = new ExpandoObject(); @@ -157,7 +157,8 @@ public partial class ReportServices : BaseServices() - .Where(x => x.StaffId == App.User.StaffId && x.CreateTime >= startDate && x.CreateTime < endDate) + .WhereIF(staffId != null, x => x.StaffId == staffId) + .Where(x => x.CreateTime >= startDate && x.CreateTime < endDate) .Select(x => x.OrderId) .Distinct() .ToListAsync(); @@ -215,5 +216,5 @@ public partial class ReportServices : BaseServices.OprateSuccess("获取成功", data); } - #endregion + #endregion }