diff --git a/Model/Tiobon.Web.pdm b/Model/Tiobon.Web.pdm index 548f070b..f91c0b15 100644 --- a/Model/Tiobon.Web.pdm +++ b/Model/Tiobon.Web.pdm @@ -1,5 +1,5 @@ - + @@ -32619,11 +32619,11 @@ Ghra_staff_InsureBase IsRequired 1728541179 Administrator -1728542518 +1730267455 Administrator 必填项 -0 -int +'false' +bit 63671F63-B09A-457C-A9EC-FD66F897CCC2 @@ -33677,8 +33677,9 @@ Ghra_staff_InsureBase PhotoUrl 1729495889 Administrator -1729496067 +1730265858 Administrator +头像 nvarchar(1000) 1000 diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index d6e1f64d..e34e94a4 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -154,13 +154,26 @@ public class Ghrh_ResumeController : BaseController - /// 查询简历是否存在 + /// 查询招聘表单信息接口 /// /// [HttpPost("Query/{id}/{langId}"), AllowAnonymous] public async Task> Query(long id, int langId) => await _service.Query(id, langId); #endregion + + #region 简历提交接口 + /// + /// 简历提交接口 + /// + /// + /// + /// + /// + [HttpPost("Update/{id}/{status}"), AllowAnonymous] + public async Task Submit(long id, string status, [FromBody] ResumeFormColumnSubmit resume) => await _service.Submit(id, status, resume); + + #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 49f59afe..dd7a75e2 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -6235,6 +6235,11 @@ 职称类型/级别 + + + 直间接 + + 备注 @@ -15401,6 +15406,11 @@ 职称类型/级别 + + + 直间接 + + 备注 diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index fc1e61d3..239b4da3 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1219,10 +1219,19 @@ - 查询简历是否存在 + 查询招聘表单信息接口 + + + 简历提交接口 + + + + + + 教育背景(Controller) diff --git a/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs b/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs index f64c5899..de6bbc98 100644 --- a/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs +++ b/Tiobon.Core.Common/DB/Dapper/Extensions/EntityProperties.cs @@ -540,7 +540,7 @@ public static class EntityProperties return type.Name; } public static void GetOnlyList(this T entity, out List names, out List values, out List descriptions) - { + { names = new List(); values = new List(); @@ -637,6 +637,22 @@ public static class EntityProperties } return type.Name; } + public static object GetPropertyValue(this T t, string field) + { + object value = null; + if (t == null) + return value; + + PropertyInfo[] properties = t.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); + + if (properties.Length <= 0) + return value; + + var property = properties.Where(x => x.Name == field).FirstOrDefault(); + if (property != null) value = property.GetValue(t, null); + + return value; + } } diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index e2a10ff3..3d7fd9d5 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -25,5 +25,7 @@ namespace Tiobon.Core.IServices Task>> QueryCompanyInfo(string companySpecCode); Task> Query(long id, int langId); + + Task Submit(long id, string status, ResumeFormColumnSubmit resume); } } \ No newline at end of file diff --git a/Tiobon.Core.Model/Base/Ghrh/Ghrh_Resume.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghrh/Ghrh_Resume.Dto.Base.cs index 2e785dae..c35a4547 100644 --- a/Tiobon.Core.Model/Base/Ghrh/Ghrh_Resume.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghrh/Ghrh_Resume.Dto.Base.cs @@ -341,6 +341,12 @@ namespace Tiobon.Core.Model.Models [Display(Name = "TitleType"), Description("职称类型/级别"), MaxLength(2000, ErrorMessage = "职称类型/级别 不能超过 32 个字符")] public string TitleType { get; set; } + /// + /// 直间接 + /// + [Display(Name = "StaffType1"), Description("直间接"), MaxLength(2000, ErrorMessage = "直间接 不能超过 32 个字符")] + public string StaffType1 { get; set; } + /// /// 备注 /// diff --git a/Tiobon.Core.Model/Base/Ghrh/Ghrh_ResumeInfoColumn.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghrh/Ghrh_ResumeInfoColumn.Dto.Base.cs index bb8fdd53..f4cb1d8b 100644 --- a/Tiobon.Core.Model/Base/Ghrh/Ghrh_ResumeInfoColumn.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghrh/Ghrh_ResumeInfoColumn.Dto.Base.cs @@ -99,7 +99,7 @@ namespace Tiobon.Core.Model.Models /// /// 必填项 /// - public int? IsRequired { get; set; } + public bool? IsRequired { get; set; } /// /// 可编辑 diff --git a/Tiobon.Core.Model/Models/Ghrh/Ghrh_Resume.cs b/Tiobon.Core.Model/Models/Ghrh/Ghrh_Resume.cs index 41bb642d..fb89600a 100644 --- a/Tiobon.Core.Model/Models/Ghrh/Ghrh_Resume.cs +++ b/Tiobon.Core.Model/Models/Ghrh/Ghrh_Resume.cs @@ -343,6 +343,12 @@ namespace Tiobon.Core.Model.Models [Display(Name = "TitleType"), Description("职称类型/级别"), MaxLength(2000, ErrorMessage = "职称类型/级别 不能超过 32 个字符")] public string TitleType { get; set; } + /// + /// 直间接 + /// + [Display(Name = "StaffType1"), Description("直间接"), MaxLength(2000, ErrorMessage = "直间接 不能超过 32 个字符")] + public string StaffType1 { get; set; } + /// /// 备注 /// diff --git a/Tiobon.Core.Model/Models/Ghrh/Ghrh_ResumeInfoColumn.cs b/Tiobon.Core.Model/Models/Ghrh/Ghrh_ResumeInfoColumn.cs index 8f836665..4b444507 100644 --- a/Tiobon.Core.Model/Models/Ghrh/Ghrh_ResumeInfoColumn.cs +++ b/Tiobon.Core.Model/Models/Ghrh/Ghrh_ResumeInfoColumn.cs @@ -101,7 +101,7 @@ namespace Tiobon.Core.Model.Models /// /// 必填项 /// - public int? IsRequired { get; set; } + public bool? IsRequired { get; set; } /// /// 可编辑 diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs index 6cd081e9..548e8ace 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs @@ -1,4 +1,6 @@ -namespace Tiobon.Core.Model.ViewModels.Extend; +using Tiobon.Core.Model.Models; + +namespace Tiobon.Core.Model.ViewModels.Extend; public class ResumeTemplateGroupColumn { @@ -28,6 +30,7 @@ public class ResumeFormColumn public string tabKey { get; set; } public string tabName { get; set; } public string type { get; set; } + public string children1 { get; set; } public List children { get; set; } } @@ -42,5 +45,15 @@ public class ResumeFormColumnChildren public string label { get; set; } public string multipleSelect { get; set; } public string @required { get; set; } + public string placeholder { get; set; } public int sortNo { get; set; } } + +public class ResumeFormColumnSubmit +{ + public EditGhrh_ResumeInput a1 { get; set; } + public EditGhrh_ResumeInput a2 { get; set; } + public List a3 { get; set; } + public List a4 { get; set; } + public List a5 { get; set; } +} diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 1d0d57a4..2564c503 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -5,6 +5,7 @@ using SqlSugar; using System.Dynamic; using Tiobon.Core.Common; using Tiobon.Core.Common.Caches; +using Tiobon.Core.Common.DB.Dapper.Extensions; using Tiobon.Core.Common.Helper; using Tiobon.Core.IRepository.Base; using Tiobon.Core.IServices; @@ -400,7 +401,7 @@ public class Ghrh_ResumeServices : BaseServices> Query(long id, int langId) { dynamic obj = new ExpandoObject(); @@ -409,448 +410,185 @@ public class Ghrh_ResumeServices : BaseServices>(columnStr); + string sql = @"DECLARE @ID BIGINT = 1 + +BEGIN + DECLARE + @MasterTemplateID INT = 0, + @TemplateType INT -- 母版设定ID + SELECT @TemplateType = TemplateType + FROM Ghrh_ResumeTemplate + WHERE ID = @ID + SELECT @MasterTemplateID = ID + FROM Ghrh_ResumeTemplate + WHERE IsEnable = 1 AND TemplateType = 1 + + SELECT * + FROM (SELECT a.ID, + a.ID + ResumeTemplateInfoGroupID, + b.ID + ResumeInfoGroupID, + b.GroupName + tabName, + b.GroupType + tabKey, + b.TableName, + b.TablePKIDName, -- 是否可挑选栏位 + ISNULL (a.IsDisplay, 0) + isDisplay, + isnull (a.SortNo, b.SortNo) + SortNo, + CASE WHEN b.GroupType = 'Base' THEN 'list' ELSE 'block' END + AS type, + -- case when ISNULL(a.IsDisplay,0)=0 then '' + CASE + WHEN 1 = 2 + THEN + '' + ELSE + CASE + WHEN b.GroupType = 'Base' -- 读取各模板设定 + THEN + isnull + ( + (SELECT pp.ColumnName field, + pp.ResumeInfoColumnName label, + pp.IsRequired required, + pp.ColumnType elementType, + CASE + WHEN pp.DataSourceType = + 'ParaDetailNo' + THEN + (SELECT 'TBParaDetail_' + + ParaTypeNo + + '_' + + ParaMasterNo + FROM Ghrs_ParaMaster + WHERE ParaMasterId = + pp.DataSource) + ELSE + NULL + END dataSource, + pp.DataType dataType, + pp.MultipleSelect multipleSelect, + kk.SortNo sortNo, + pp.Placeholder placeholder, + pp.Editable editable + FROM Ghrh_ResumeTemplateInfoGroupColumn kk, + Ghrh_ResumeInfoColumn pp + WHERE kk.ResumeTemplateInfoGroupID = a.ID + -- a.ResumeTemplateInfoGroupID + AND kk.ResumeInfoColumnID = pp.ID + AND kk.IsDisplay = 1 + AND pp.IsEnable = 1 + AND kk.IsEnable = 1 + order by kk.SortNo + FOR JSON PATH, INCLUDE_NULL_VALUES), + '') + WHEN b.GroupType = 'Photo' -- 读取各模板设定 + THEN + (SELECT PhotoType + FROM Ghrh_ResumeTemplate + WHERE ResumeTemplateID = @MasterTemplateID + FOR JSON PATH, INCLUDE_NULL_VALUES) + WHEN b.GroupType NOT IN ('Base', 'Photo') -- 读取母版的设定 + THEN + isnull + ( + (SELECT pp.ColumnName field, + pp.ResumeInfoColumnName label, + pp.IsRequired required, + pp.ColumnType elementType, + CASE + WHEN pp.DataSourceType = + 'ParaDetailNo' + THEN + (SELECT 'TBParaDetail_' + + ParaTypeNo + + '_' + + ParaMasterNo + FROM Ghrs_ParaMaster + WHERE ParaMasterId = + pp.DataSource) + ELSE + NULL + END dataSource, + pp.DataType dataType, + pp.MultipleSelect multipleSelect, + kk.SortNo sortNo, + pp.Placeholder placeholder, + pp.Editable editable + FROM Ghrh_ResumeTemplateInfoGroupColumn kk, + Ghrh_ResumeInfoColumn pp + WHERE kk.ResumeTemplateID = + @MasterTemplateID + AND kk.ResumeInfoGroupId = b.Id + -- b.ResumeInfoGroupId + AND pp.Id = kk.ResumeInfoColumnId + AND kk.IsDisplay = 1 + AND pp.IsEnable = 1 + AND kk.IsEnable = 1 + order by kk.SortNo + FOR JSON PATH, INCLUDE_NULL_VALUES), + '') + END + END + children1 + FROM Ghrh_ResumeInfoGroup b + LEFT JOIN Ghrh_ResumeTemplateInfoGroup a + ON a.ResumeInfoGroupId = b.ID + AND a.IsEnable = 1 + AND a.ResumeTemplateID = @ID + WHERE b.IsEnable = 1) a + WHERE a.IsDisplay = 1 + -- order by ISNULL(a.IsDisplay,0) desc,isnull(a.SortNo,b.SortNo) -- 显示的放上面, 不显示的放下面, 再按照序号排序 + ORDER BY a.SortNo ASC +END"; + var columns = await Db.Ado.SqlQueryAsync(sql); + columns.ForEach(x => + { + if (x.children1.IsNotEmptyOrNull()) + x.children = JsonHelper.JsonToObj>(x.children1); + + x.children1 = null; + }); + obj.Columns = columns; #endregion #region Data - dynamic resumeData = new ExpandoObject(); - resumeData.PhotoUrl = entity?.PhotoUrl; - resumeData.StaffName = entity?.StaffName; - resumeData.IdCardNo = entity?.IdCardNo; - resumeData.Mobile = entity?.Mobile; - resumeData.Gender = entity?.Gender; - resumeData.Nation = entity?.Nation; - resumeData.NativePlace = entity?.NativePlace; - resumeData.MaritalStatus = entity?.MaritalStatus; - resumeData.PoliticStatus = entity?.PoliticStatus; - Data.a1 = resumeData; - - resumeData = new ExpandoObject(); - resumeData.CertificateType = entity?.CertificateType; - resumeData.RegisteredType = entity?.RegisteredType; - resumeData.IDCardBegin = entity?.IDCardBegin; - resumeData.IDCardEnd = entity?.IDCardEnd; - resumeData.RegisteredAddress = entity?.RegisteredAddress; - resumeData.NowAddress = entity?.NowAddress; - resumeData.TitleType = entity?.TitleType; - resumeData.IsStay = entity?.IsStay; - resumeData.CarNo = entity?.CarNo; - - Data.a2 = resumeData; - Data.a3 = await _ghre_ResumeHomeServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);//家庭关系 - Data.a4 = await _ghre_ResumeEduBGServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);//教育背景 - Data.a5 = await _ghre_ResumeWorkExpServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);//工作经历 + + sql = @"DECLARE @ResumeTemplateID BIGINT = 1 + + SELECT pp.ColumnName field + FROM Ghrh_ResumeTemplateInfoGroupColumn kk, Ghrh_ResumeInfoColumn pp + WHERE kk.ResumeTemplateInfoGroupID = + (SELECT b.Id + FROM Ghrh_ResumeInfoGroup a + JOIN Ghrh_ResumeTemplateInfoGroup b + ON b.ResumeInfoGroupId = a.ID + WHERE a.GroupType = 'Base' + AND a.IsEnable = 1 + AND b.ResumeTemplateID = @ResumeTemplateID) + -- a.ResumeTemplateInfoGroupID + AND kk.ResumeInfoColumnID = pp.ID + AND kk.IsDisplay = 1 + AND pp.IsEnable = 1 + AND kk.IsEnable = 1 + ORDER BY kk.SortNo"; + + var columnNames = await Db.Ado.SqlQueryAsync(sql); + columnNames = columnNames.Distinct().ToList(); + var dicts = new Dictionary(); + columnNames.ForEach(x => + { + var value = entity.GetPropertyValue(x); + dicts.Add(x, value); + }); + Data.Base = dicts; + Data.Family = await _ghre_ResumeHomeServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);//家庭关系 + Data.Education = await _ghre_ResumeEduBGServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);//教育背景 + Data.WorkExp = await _ghre_ResumeWorkExpServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);//工作经历 obj.Data = Data; #endregion @@ -868,8 +606,24 @@ public class Ghrh_ResumeServices : BaseServices + { + "本人诚实告知未思有各类传染性疾病,若经体检后发现有不符合本公司要求的项目,本人愿意放弃此次应征机会!", + "本人正式入职之前,已不与任何单位存在劳动关系,并承诺在工作中不使用曾经服务过的工作单位的技术和商业秘密,如有违背,由此引起的法律纠纷及经济责任由本人承担。" + }; + obj.Promise = promiseList; + #endregion + return ServiceResult.OprateSuccess("查询成功", obj); } #endregion + + #region 简历提交接口 + public async Task Submit(long id, string status, ResumeFormColumnSubmit resume) + { + return ServiceResult.OprateSuccess(); + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs index 34db3634..3eee1da8 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeTemplateServices.cs @@ -518,7 +518,7 @@ END"; @DataType NVARCHAR (1000), @DataSourceType NVARCHAR (1000), @DataSource NVARCHAR (1000), - @IsRequired NVARCHAR (1000), + @IsRequired BIT, @IsChangeColumn NVARCHAR (1000), @IsQuickJoinColumn NVARCHAR (1000), @Editable NVARCHAR (1000), diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 49f59afe..dd7a75e2 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -6235,6 +6235,11 @@ 职称类型/级别 + + + 直间接 + + 备注 @@ -15401,6 +15406,11 @@ 职称类型/级别 + + + 直间接 + + 备注 diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index fc1e61d3..239b4da3 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1219,10 +1219,19 @@ - 查询简历是否存在 + 查询招聘表单信息接口 + + + 简历提交接口 + + + + + + 教育背景(Controller)