|
|
@ -2,6 +2,7 @@ |
|
|
|
using AgileObjects.AgileMapper; |
|
|
|
using AgileObjects.AgileMapper; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using SqlSugar; |
|
|
|
using SqlSugar; |
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq.Expressions; |
|
|
|
using System.Linq.Expressions; |
|
|
|
using Tiobon.Core.Common; |
|
|
|
using Tiobon.Core.Common; |
|
|
|
using Tiobon.Core.Common.Caches; |
|
|
|
using Tiobon.Core.Common.Caches; |
|
|
@ -201,6 +202,59 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override async Task<Ghrh_ResumeDto> QueryById(object objId) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var result = await base.QueryById(objId); |
|
|
|
|
|
|
|
List<Ghrh_ResumeDto> list = [result]; |
|
|
|
|
|
|
|
var ids = list.Select(x => x.Id).ToList(); |
|
|
|
|
|
|
|
var titleIds = list.Where(x => x.TitleId != null).Select(x => x.TitleId.Value).Distinct().ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var titles = await Db.Queryable<Ghra_Title>().Where(x => x.TitleID != null && titleIds.Contains(x.TitleID.Value)).ToListAsync(); |
|
|
|
|
|
|
|
var eduBGs = await _ghre_ResumeEduBGServices.QueryDto(x => x.ResumeId != null && ids.Contains(x.ResumeId.Value)); |
|
|
|
|
|
|
|
var workExps = await _ghre_ResumeWorkExpServices.QueryDto(x => x.ResumeId != null && ids.Contains(x.ResumeId.Value)); |
|
|
|
|
|
|
|
eduBGs.ForEach(async x => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
x.DegreeLevelLabel = await GetParaLabel("EducationalBGLevel", x.DegreeLevel); |
|
|
|
|
|
|
|
x.BeginDate1 = DateTimeHelper.ConvertToDayString(x.BeginDate); |
|
|
|
|
|
|
|
x.EndDate1 = DateTimeHelper.ConvertToDayString(x.EndDate); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
workExps.ForEach(x => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
x.BeginDate1 = DateTimeHelper.ConvertToDayString(x.BeginDate); |
|
|
|
|
|
|
|
x.EndDate1 = DateTimeHelper.ConvertToDayString(x.EndDate); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var tagIds = new List<long>(); |
|
|
|
|
|
|
|
list.ForEach(x => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (x.Tags.IsNotEmptyOrNull()) |
|
|
|
|
|
|
|
tagIds.AddRange(JsonHelper.JsonToObj<List<long>>(x.Tags)); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tagIds = tagIds.Distinct().ToList(); |
|
|
|
|
|
|
|
var tags = await _ghre_ResumeTagServices.QueryDto(x => tagIds.Contains(x.Id)); |
|
|
|
|
|
|
|
list.ForEach(async x => |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (x.TitleId != null) x.TitleName = titles.Where(o => o.TitleID == x.TitleId).FirstOrDefault()?.TitleName; |
|
|
|
|
|
|
|
x.GenderLabel = await GetParaLabel("Gender", x.Gender); |
|
|
|
|
|
|
|
x.EducationLabel = await GetParaLabel("EducationalBGLevel", x.Education); |
|
|
|
|
|
|
|
x.NationLabel = await GetParaLabel("A02", x.Nation); |
|
|
|
|
|
|
|
x.MaritalStatusLabel = await GetParaLabel("A03", x.MaritalStatus); |
|
|
|
|
|
|
|
x.PoliticStatusLabel = await GetParaLabel("A04", x.PoliticStatus); |
|
|
|
|
|
|
|
x.UrgentRelationLabel = await GetParaLabel("SocialRelationType", x.UrgentRelation); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x.EduBG = eduBGs.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
|
|
|
|
x.WorkExp = workExps.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
|
|
|
|
if (x.Tags.IsNotEmptyOrNull()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var tagIds1 = JsonHelper.JsonToObj<List<long>>(x.Tags); |
|
|
|
|
|
|
|
x.TagList = tags.Where(o => tagIds1.Contains(o.Id)).Select(o => o.TagName).ToList(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return list[0]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#region 获取简历Tabs接口 |
|
|
|
#region 获取简历Tabs接口 |
|
|
|
public ServiceResult<List<ResumeViewTab>> QueryViewTab() |
|
|
|
public ServiceResult<List<ResumeViewTab>> QueryViewTab() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -311,4 +365,25 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 查询简历公司新增 |
|
|
|
|
|
|
|
public async Task<ServiceResult<Dictionary<string, string>>> QueryCompanyInfo(string companySpecCode) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var url = await Db.Ado.GetStringAsync("SELECT LogoUrl FROM Ghrs_LoginPageSetting"); |
|
|
|
|
|
|
|
Dictionary<string, string> dict = new Dictionary<string, string>() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
{ "CompanyName", AppSettings.app(new string[] { "Resume", "CompanyName" }) }, |
|
|
|
|
|
|
|
{ "LoginDesc", AppSettings.app(new string[] { "Resume", "LoginDesc" }) }, |
|
|
|
|
|
|
|
{ "LoginTitle", AppSettings.app(new string[] { "Resume", "LoginTitle" }) }, |
|
|
|
|
|
|
|
{ "StaffName", "姓名" }, |
|
|
|
|
|
|
|
{ "Mobile", "手机号" }, |
|
|
|
|
|
|
|
{ "IdCardNo", "身份证后六位" }, |
|
|
|
|
|
|
|
{ "AgainLoginText", "二次登录" }, |
|
|
|
|
|
|
|
{ "LoginBtnText", "登录" }, |
|
|
|
|
|
|
|
{ "LogoUrl", url } |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
return ServiceResult<Dictionary<string, string>>.OprateSuccess("查询成功", dict); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
} |
|
|
|
} |