From aa875d659aae032feb4736c04d2b761b7bca6901 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Fri, 20 Dec 2024 13:45:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghrh/Ghrh_OfferApplyOrderController.cs | 2 +- .../DB/Dapper/Extensions/EntityProperties.cs | 13 +++++++++ .../Ghrh/IGhrh_OfferApplyOrderServices.cs | 2 +- .../Ghrh/Ghrh_OfferApplyOrderServices.cs | 29 +++++++++++++++++-- .../Ghrh/Ghrh_ResumeServices.cs | 10 +++++++ Tiobon.Core/Tiobon.Core.Model.xml | 10 +++++++ 6 files changed, 61 insertions(+), 5 deletions(-) diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_OfferApplyOrderController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_OfferApplyOrderController.cs index 79419813..6d84725e 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_OfferApplyOrderController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_OfferApplyOrderController.cs @@ -31,7 +31,7 @@ public class Ghrh_OfferApplyOrderController : BaseController简历ID /// [HttpPost, Route("TempAdd/{resumeId}")] - public async Task TempAdd(long resumeId, InsertGhrh_OfferApplyOrderInput entity) => await _service.TempAdd(resumeId, entity); + public async Task> TempAdd(long resumeId, InsertGhrh_OfferApplyOrderInput entity) => await _service.TempAdd(resumeId, entity); #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs b/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs index 33b6b505..5977bf22 100644 --- a/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs +++ b/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs @@ -6,6 +6,7 @@ using System.Linq.Expressions; using System.Reflection; using System.Text; using Tiobon.Core.Model; +using Tiobon.Core.Model.Models; namespace Tiobon.Core.Common.DB.Dapper.Extensions; @@ -646,8 +647,20 @@ public static class EntityProperties return value; } + public static PropertyInfo[] GetPropertyList(this T t) + { + if (t == null) + return default; + + PropertyInfo[] properties = t.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); + + return properties; + } + + //PropertyInfo[] propertyInfo = typeof(Ghrh_OfferApplyOrder).GetProperties().ToArray(); + //Dictionary dictProperties = propertyInfo.GetColumType(true); } public class ArrayEntity diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_OfferApplyOrderServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_OfferApplyOrderServices.cs index aa855d54..669e67e1 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_OfferApplyOrderServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_OfferApplyOrderServices.cs @@ -11,5 +11,5 @@ public interface IGhrh_OfferApplyOrderServices : IBaseServices> QueryResume(long resumeId); - Task TempAdd(long resumeId, InsertGhrh_OfferApplyOrderInput entity); + Task> TempAdd(long resumeId, InsertGhrh_OfferApplyOrderInput entity); } \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_OfferApplyOrderServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_OfferApplyOrderServices.cs index 2a6aeae3..cf1b213a 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_OfferApplyOrderServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_OfferApplyOrderServices.cs @@ -1,4 +1,7 @@ -namespace Tiobon.Core.Services; +using AgileObjects.AgileMapper.Extensions.Internal; +using NPOI.Util.Collections; + +namespace Tiobon.Core.Services; /// /// 录用审批单 (服务) @@ -172,12 +175,13 @@ public class Ghrh_OfferApplyOrderServices : BaseServices TempAdd(long resumeId, InsertGhrh_OfferApplyOrderInput entity) + public async Task> TempAdd(long resumeId, InsertGhrh_OfferApplyOrderInput entity) { entity.OrderNo = await GenerateContinuousSequence("Ghrh_OfferApplyOrder", "OrderNo", "LYSQ"); entity.ApplicantId = GetStaffId(); entity.ApplyTime = DateTime.Now; + entity.WorkState = 1; var id = await base.Add(entity); #region 写入数据,并判断是否有错误 @@ -197,7 +201,7 @@ public class Ghrh_OfferApplyOrderServices : BaseServices.OprateSuccess("保存成功", id); } public override async Task Update(long Id, EditGhrh_OfferApplyOrderInput editModel) @@ -280,6 +284,25 @@ public class Ghrh_OfferApplyOrderServices : BaseServices x.ResumeId == resumeId); if (applyOrder != null) { + + obj.DeptId = applyOrder.DeptId; + obj.TitleId = applyOrder.TitleId; + obj.Channel = applyOrder.Channel; + obj.StaffName = applyOrder.StaffName; + obj.DeIdCardNoptId = applyOrder.IdCardNo; + obj.InDate = applyOrder.InDate; + obj.StaffType = applyOrder.StaffType; + obj.GradeId = applyOrder.GradeId; + obj.JobId = applyOrder.JobId; + obj.ProbationMonths = applyOrder.ProbationMonths; + obj.ReportId = applyOrder.ReportId; + obj.JobResponsibility = applyOrder.JobResponsibility; + obj.WorkAddress = applyOrder.WorkAddress; + obj.JobProbationSalaryId = applyOrder.ProbationSalary; + obj.ProbationAfterSalary = applyOrder.ProbationAfterSalary; + obj.JobPeriodMasterIdId = applyOrder.PeriodMasterId; + obj.JobId = applyOrder.JobId; + obj.Items = await Db.Queryable().Where(x => x.OrderId == applyOrder.Id).ToListAsync(); } diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 7e9ce465..5f167633 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -539,6 +539,16 @@ public class Ghrh_ResumeServices : BaseServices>(str); + + var menus = Db.Ado.SqlQuery(@"SELECT MenuNo +FROM Ghrs_Menu +WHERE ParentMenuId = (SELECT MenuId + FROM Ghrs_Menu + WHERE MenuNo = 'F_ResumeMaintenance') + AND IsEnable = 1"); + + tabs = tabs.Where(x => menus.Contains(x.MenuName)).ToList(); + return ServiceResult>.OprateSuccess("查询成功!", tabs); } #endregion diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 5095fb1c..671dc563 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -28242,6 +28242,16 @@ 面试地点 + + + 是否可以改期 + + + + + 是否可以取消 + + 教育背景(Dto.View1)