From 6f1d642f57bc8e8ec10918359f12256a00ad692a Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 3 Dec 2024 12:03:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96=E8=AF=84?= =?UTF-8?q?=E4=BC=B0=E5=8D=95=E8=A1=A8=E5=8D=95=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghrh/Ghrh_ResumeController.cs | 11 +++ Tiobon.Core.Api/Tiobon.Core.xml | 7 ++ .../Ghrh/IGhrh_ResumeServices.cs | 2 + .../ViewModels/Extend/ResumeViewTab.cs | 4 +- .../Ghrh/Ghrh_ResumeServices.cs | 89 +++++++++++++++++++ 5 files changed, 112 insertions(+), 1 deletion(-) diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index 03c01c3a..3462f0e3 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -449,4 +449,15 @@ public class Ghrh_ResumeController : BaseController + /// 获取安排面试表单信息 + /// + /// 简历ID + /// + [HttpPost, Route("QueryAssessForm/{id}")] + public async Task> QueryAssessForm(long id) => await _service.QueryAssessForm(id); + + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index c4babebd..7eaf1c28 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1508,6 +1508,13 @@ 简历ID + + + 获取安排面试表单信息 + + 简历ID + + 教育背景(Controller) diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index 3d99952c..1143b302 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -70,4 +70,6 @@ public interface IGhrh_ResumeServices : IBaseServices OverTimeDeleteResume(); Task> Download(List ids); + + Task> QueryAssessForm(long id); } \ No newline at end of file diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs index e5a86e2b..fb22c72a 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs @@ -189,7 +189,7 @@ public class ResumeScheduleInterviewResult /// 部门负责人邮箱 /// public string DeptManagerEmail { get; set; } - + /// /// 上轮面试官 /// @@ -206,6 +206,8 @@ public class ResumeScheduleInterviewResult public string LastInterviewContent { get; set; } } + + public class ResumeRecommendFormStaff { /// diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index eaa39dac..5ba1f16f 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -42,6 +42,7 @@ public class Ghrh_ResumeServices : BaseServices private readonly IGhrh_InterviewLogServices _ghrh_InterviewLogServices; private readonly IGhrh_HumanRequestServices _ghrh_HumanRequestServices; + private readonly IGhrh_AssessConfigServices _ghrh_AssessConfigServices; private readonly IWebHostEnvironment Env; private readonly IConverter _converter; private readonly IWebHostEnvironment _hostingEnvironment; @@ -57,6 +58,7 @@ public class Ghrh_ResumeServices : BaseServices> QueryAssessForm(long id) + { + dynamic result = new ExpandoObject(); + + var items = await _ghrh_AssessConfigServices.QueryFilterPage(new QueryBody() + { + pageNum = 1, + pageSize = 0 + }, null); + #region Header + + var header = new JArray(); + JObject obj = new(); + for (int i = 0; i < 2; i++) + { + obj = new(); + obj.Add(new JProperty("title", "标准")); + obj.Add(new JProperty("field", "Type" + (i + 1) + "Text")); + obj.Add(new JProperty("align", "center")); + obj.Add(new JProperty("width", i == 0 ? 80 : 120)); + obj.Add(new JProperty("fixed", null)); + header.Add(obj); + } + + var entity = await base.QueryById(id); + if (entity == null) + return ServiceResult.OprateFailed("无效的简历ID!"); + + var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id); + if (order == null) + return ServiceResult.OprateFailed("无效的简历ID!"); + + var records = await _ghrh_InterviewRecordServices.Query(x => x.OrderId == order.Id, "Round ASC"); + + + for (int i = 0; i < records.Count; i++) + { + var x = records[i]; + var staff = await Db.Queryable().Where(o => o.StaffID == x.StaffId).FirstAsync(); + obj = new(); + obj.Add(new JProperty("title", $"第轮{x.Round}面试\n{staff?.StaffName}\n {x.InterviewTime}")); + obj.Add(new JProperty("field", "Score" + (i + 1))); + obj.Add(new JProperty("align", "center")); + obj.Add(new JProperty("width", 120)); + obj.Add(new JProperty("fixed", null)); + header.Add(obj); + } + + obj = new(); + obj.Add(new JProperty("title", "评价")); + obj.Add(new JProperty("field", "EvaluateContent")); + obj.Add(new JProperty("align", "center")); + obj.Add(new JProperty("width", 120)); + obj.Add(new JProperty("fixed", null)); + header.Add(obj); + + result.Header = header; + #endregion + + #region Body + var body = new JArray(); + items.result.DT_TableDataT1.ForEach(x => + { + obj = new(); + obj.Add(new JProperty("Type1", x.ItemClass)); + obj.Add(new JProperty("Type1Text", x.ItemClassLabel)); + obj.Add(new JProperty("Type2", x.Id)); + obj.Add(new JProperty("Type2Text", x.ItemName)); + + for (int i = 0; i < records.Count; i++) + { + var record = records[i]; + obj.Add(new JProperty("Score" + (i + 1), null)); + obj.Add(new JProperty("CanEdit" + (i + 1), null)); + } + obj.Add(new JProperty("EvaluateContent", null)); + body.Add(obj); + }); + result.Body = body; + #endregion + + return ServiceResult.OprateSuccess("查询成功", result); + } + #endregion + #region 通用方法 /// /// 记录日志