From 30b2184b61c12af31301b78b7a00774f933b5e63 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 13 Nov 2024 15:19:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=AE=80=E5=8E=86=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/Tiobon.Web.pdm | 7 ++-- .../Controllers/Ghrh/Ghrh_ResumeController.cs | 14 ++++++++ Tiobon.Core.Api/Tiobon.Core.Model.xml | 34 +++++++++++++++++-- Tiobon.Core.Api/Tiobon.Core.xml | 8 +++++ .../Ghrh/IGhrh_ResumeServices.cs | 2 ++ .../Base/Ghrh/Ghrh_InterviewOrder.Dto.Base.cs | 5 ++- Tiobon.Core.Model/Consts.cs | 13 +++++++ .../Models/Ghrh/Ghrh_InterviewOrder.cs | 5 ++- .../ViewModels/Extend/ResumeViewTab.cs | 30 ++++++++++++++-- Tiobon.Core.Services/BASE/BaseServices.cs | 4 +++ .../Ghrh/Ghrh_InterviewOrderServices.cs | 20 ++++++++++- .../Ghrh/Ghrh_ResumeServices.cs | 25 +++++++++++++- 12 files changed, 151 insertions(+), 16 deletions(-) diff --git a/Model/Tiobon.Web.pdm b/Model/Tiobon.Web.pdm index 187f9c4e..5f23d777 100644 --- a/Model/Tiobon.Web.pdm +++ b/Model/Tiobon.Web.pdm @@ -1,5 +1,5 @@ - + @@ -39608,11 +39608,10 @@ Ghra_staff_InsureBase RecommendId 1731476437 Administrator -1731477359 +1731481029 Administrator 推荐人ID -nvarchar(2000) -2000 +long 924E8CAA-4918-4516-8CEC-89B70362C55B diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index 9301b8b8..26387a88 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -200,4 +200,18 @@ public class Ghrh_ResumeController : BaseController + /// 推荐 + /// + /// 信息 + /// 简历Id + /// + [HttpPost, Route("Recommend/{id}")] + public async Task Recommend([FromBody] ResumeRecommendForm body, long id) + { + return await _service.Recommend(id, body); + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 228df0e9..8b9dcb52 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -6263,7 +6263,7 @@ 推荐人ID - + @@ -16484,7 +16484,7 @@ 推荐人ID - + @@ -21557,6 +21557,16 @@ 已作废 + + + 面试工单-状态 + + + + + 已推荐 + + 无任何权限 @@ -22117,6 +22127,26 @@ Type Description balabala + + + 人力需求维护ID + + + + + 面试官列表 + + + + + 员工ID + + + + + 邮箱 + + 留言信息展示类 diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 2f77aed9..d086e0a2 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1344,6 +1344,14 @@ status + + + 推荐 + + 信息 + 简历Id + + 教育背景(Controller) diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index f4a8abac..fa476d67 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -32,4 +32,6 @@ public interface IGhrh_ResumeServices : IBaseServices> QueryResult(long id, int langId); Task> Export(QueryBody filter, string condition, bool? IsEnable = true); + + Task Recommend(long id, ResumeRecommendForm recommend); } \ No newline at end of file diff --git a/Tiobon.Core.Model/Base/Ghrh/Ghrh_InterviewOrder.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghrh/Ghrh_InterviewOrder.Dto.Base.cs index 4c032861..6351d355 100644 --- a/Tiobon.Core.Model/Base/Ghrh/Ghrh_InterviewOrder.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghrh/Ghrh_InterviewOrder.Dto.Base.cs @@ -46,9 +46,8 @@ public class Ghrh_InterviewOrderBase /// /// 推荐人ID - /// - [Display(Name = "RecommendId"), Description("推荐人ID"), MaxLength(2000, ErrorMessage = "推荐人ID 不能超过 2000 个字符")] - public string RecommendId { get; set; } + /// + public long? RecommendId { get; set; } /// /// 简历接收人ids diff --git a/Tiobon.Core.Model/Consts.cs b/Tiobon.Core.Model/Consts.cs index 5e0d3016..cf65e116 100644 --- a/Tiobon.Core.Model/Consts.cs +++ b/Tiobon.Core.Model/Consts.cs @@ -282,4 +282,17 @@ public class Consts public const string Disable = "Disable"; } #endregion + + #region 面试工单 + /// + /// 面试工单-状态 + /// + public static class DIC_INTERVIEW_ORDER_STATUS + { + /// + /// 已推荐 + /// + public const string HasRecommended = "HasRecommended"; + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Model/Models/Ghrh/Ghrh_InterviewOrder.cs b/Tiobon.Core.Model/Models/Ghrh/Ghrh_InterviewOrder.cs index 6d45373d..eb54b7a8 100644 --- a/Tiobon.Core.Model/Models/Ghrh/Ghrh_InterviewOrder.cs +++ b/Tiobon.Core.Model/Models/Ghrh/Ghrh_InterviewOrder.cs @@ -47,9 +47,8 @@ public class Ghrh_InterviewOrder : BasePoco /// /// 推荐人ID - /// - [Display(Name = "RecommendId"), Description("推荐人ID"), MaxLength(2000, ErrorMessage = "推荐人ID 不能超过 2000 个字符")] - public string RecommendId { get; set; } + /// + public long? RecommendId { get; set; } /// /// 简历接收人ids diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs index e7862aa6..330d1657 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs @@ -61,7 +61,33 @@ public class ResumeFormColumnSubmit public List WorkExp { get; set; } public List Attachment { get; set; } - + +} + +public class ResumeRecommendForm +{ + /// + /// 人力需求维护ID + /// + public long RequestId { get; set; } + + /// + /// 面试官列表 + /// + public List InterviewStaffs { get; set; } +} +public class ResumeRecommendFormStaff +{ + /// + /// 员工ID + /// + public long StaffId { get; set; } + + /// + /// 邮箱 + /// + + public string Email { get; set; } } public class ResumeAttachment @@ -75,6 +101,6 @@ public class ResumeAttachment } -public class ResumePhotoAttachment: ResumeAttachment +public class ResumePhotoAttachment : ResumeAttachment { } \ No newline at end of file diff --git a/Tiobon.Core.Services/BASE/BaseServices.cs b/Tiobon.Core.Services/BASE/BaseServices.cs index c8856d3c..f7daecd2 100644 --- a/Tiobon.Core.Services/BASE/BaseServices.cs +++ b/Tiobon.Core.Services/BASE/BaseServices.cs @@ -1404,6 +1404,10 @@ public class BaseServices : IBaseServ StaffId = Convert.ToInt32(StaffId1); return StaffId; } + public async Task GetUser() + { + return await Db.Queryable().FirstAsync(); + } #region 获取部门列表 public static void LoopToAppendChildren(List depts, List depts1, Ghro_Dept dept) diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_InterviewOrderServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_InterviewOrderServices.cs index ea086a21..903acd84 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_InterviewOrderServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_InterviewOrderServices.cs @@ -6,10 +6,28 @@ public class Ghrh_InterviewOrderServices : BaseServices, IGhrh_InterviewOrderServices { private readonly IBaseRepository _dal; - public Ghrh_InterviewOrderServices(ICaching caching, IBaseRepository dal) + private readonly IGhrh_InterviewLogServices _ghrh_InterviewLogServices; + public Ghrh_InterviewOrderServices(ICaching caching, + IGhrh_InterviewLogServices ghrh_InterviewLogServices, + IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; base._caching = caching; + _ghrh_InterviewLogServices = ghrh_InterviewLogServices; + } + + + public override async Task Add(InsertGhrh_InterviewOrderInput entity) + { + var result = await base.Add(entity); + var usser = await GetUser(); + await _ghrh_InterviewLogServices.Add(new InsertGhrh_InterviewLogInput() + { + OrderId = result, + RemarkSz = $"用户【{usser?.UserName ?? App.User.ID.ToString()}】推荐了简历!" + }); + + return result; } } \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 2ddab7f3..f52a8387 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -1,4 +1,7 @@ -namespace Tiobon.Core.Services; +using Tiobon.Core.IServices; +using static Tiobon.Core.Model.Consts; + +namespace Tiobon.Core.Services; /// /// 个人简历 (服务) @@ -16,6 +19,7 @@ public class Ghrh_ResumeServices : BaseServices dal, IGhrh_ResumeEduBGServices ghre_ResumeEduBGServices, @@ -24,6 +28,7 @@ public class Ghrh_ResumeServices : BaseServices Recommend(long id, ResumeRecommendForm recommend) + { + await _ghrh_InterviewOrderServices.Add(new InsertGhrh_InterviewOrderInput() + { + ResumeId = id, + RequestId = recommend.RequestId, + RecommendTime = DateTime.Now, + RecommendId = App.User.ID, + ReceiverIds = JsonHelper.ObjToJson(recommend), + Status = DIC_INTERVIEW_ORDER_STATUS.HasRecommended + }); + + return ServiceResult.OprateSuccess(); + } + #endregion } \ No newline at end of file