|
|
@ -1,4 +1,5 @@ |
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
using Org.BouncyCastle.Utilities; |
|
|
|
|
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
|
|
|
|
|
|
|
@ -67,7 +68,42 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
_ghrh_HumanRequestServices = ghrh_HumanRequestServices; |
|
|
|
_ghrh_HumanRequestServices = ghrh_HumanRequestServices; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// 字典映射、全称、单位转换等 |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
/// <param name="view"></param> |
|
|
|
|
|
|
|
private async Task SetLabel(Ghrh_ResumeDto x) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (x != null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
x.ResumeId = x.Id; |
|
|
|
|
|
|
|
x.TitleLabel = x.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.CertificateTypeLabel = await GetParaLabel("D51", x.CertificateType); |
|
|
|
|
|
|
|
x.RegisteredTypeLabel = await GetParaLabel("A08", x.RegisteredType); |
|
|
|
|
|
|
|
x.ApplyStatusLabel = await GetParaLabel("ResumeApplyStatus", x.ApplyStatus); |
|
|
|
|
|
|
|
x.ChannelLabel = await GetParaLabel("ResumeApplyStatus", x.Channel); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 计算年龄 |
|
|
|
|
|
|
|
if (x.Birthday != null && x.Birthday > DateTime.MinValue) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
DateTime birthdate = (DateTime)x.Birthday; |
|
|
|
|
|
|
|
DateTime now = DateTime.Now; |
|
|
|
|
|
|
|
int age = now.Year - birthdate.Year; |
|
|
|
|
|
|
|
if (now.Month < birthdate.Month || (now.Month == birthdate.Month && now.Day < birthdate.Day)) |
|
|
|
|
|
|
|
age--; |
|
|
|
|
|
|
|
x.Age = age; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
x.Birthday1 = DateTimeHelper.ConvertToDayString(x.Birthday); |
|
|
|
|
|
|
|
x.WorkYears = x.WorkYears ?? 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
public override async Task<ServicePageResult<Ghrh_ResumeDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) |
|
|
|
public override async Task<ServicePageResult<Ghrh_ResumeDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var query = Db.Queryable<Ghrh_Resume>(); |
|
|
|
var query = Db.Queryable<Ghrh_Resume>(); |
|
|
@ -235,18 +271,8 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
var tags = await _ghrh_ResumeTagServices.QueryDto(x => tagIds.Contains(x.Id)); |
|
|
|
var tags = await _ghrh_ResumeTagServices.QueryDto(x => tagIds.Contains(x.Id)); |
|
|
|
list.ForEach(async x => |
|
|
|
list.ForEach(async x => |
|
|
|
{ |
|
|
|
{ |
|
|
|
x.ResumeId = x.Id; |
|
|
|
|
|
|
|
if (x.TitleId != null) x.TitleName = titles.Where(o => o.TitleID == x.TitleId).FirstOrDefault()?.TitleName; |
|
|
|
if (x.TitleId != null) x.TitleName = titles.Where(o => o.TitleID == x.TitleId).FirstOrDefault()?.TitleName; |
|
|
|
x.TitleLabel = x.TitleName; |
|
|
|
await SetLabel(x); |
|
|
|
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.CertificateTypeLabel = await GetParaLabel("D51", x.CertificateType); |
|
|
|
|
|
|
|
x.RegisteredTypeLabel = await GetParaLabel("A08", x.RegisteredType); |
|
|
|
|
|
|
|
x.ApplyStatusLabel = await GetParaLabel("ResumeApplyStatus", x.ApplyStatus); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x.EduBG = eduBGs.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
x.EduBG = eduBGs.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
x.WorkExp = workExps.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
x.WorkExp = workExps.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
@ -257,19 +283,8 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
x.TagList = tags.Where(o => tagIds1.Contains(o.Id)).Select(o => o.TagName).ToList(); |
|
|
|
x.TagList = tags.Where(o => tagIds1.Contains(o.Id)).Select(o => o.TagName).ToList(); |
|
|
|
x.TagString = string.Join(",", x.TagList); |
|
|
|
x.TagString = string.Join(",", x.TagList); |
|
|
|
} |
|
|
|
} |
|
|
|
x.WorkYears = x.WorkYears ?? 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 计算年龄 |
|
|
|
|
|
|
|
if (x.Birthday != null && x.Birthday > DateTime.MinValue) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
DateTime birthdate = (DateTime)x.Birthday; |
|
|
|
|
|
|
|
DateTime now = DateTime.Now; |
|
|
|
|
|
|
|
int age = now.Year - birthdate.Year; |
|
|
|
|
|
|
|
if (now.Month < birthdate.Month || (now.Month == birthdate.Month && now.Day < birthdate.Day)) |
|
|
|
|
|
|
|
age--; |
|
|
|
|
|
|
|
x.Age = age; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var order = orders.Where(o => o.ResumeId == x.ResumeId).FirstOrDefault(); |
|
|
|
var order = orders.Where(o => o.ResumeId == x.ResumeId).FirstOrDefault(); |
|
|
|
if (order != null) |
|
|
|
if (order != null) |
|
|
@ -319,15 +334,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
list.ForEach(async x => |
|
|
|
list.ForEach(async x => |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (x.TitleId != null) x.TitleName = titles.Where(o => o.TitleID == x.TitleId).FirstOrDefault()?.TitleName; |
|
|
|
if (x.TitleId != null) x.TitleName = titles.Where(o => o.TitleID == x.TitleId).FirstOrDefault()?.TitleName; |
|
|
|
x.GenderLabel = await GetParaLabel("Gender", x.Gender); |
|
|
|
await SetLabel(x); |
|
|
|
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.CertificateTypeLabel = await GetParaLabel("D51", x.CertificateType); |
|
|
|
|
|
|
|
x.RegisteredTypeLabel = await GetParaLabel("A08", x.RegisteredType); |
|
|
|
|
|
|
|
x.ApplyStatusLabel = await GetParaLabel("ResumeApplyStatus", x.ApplyStatus); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
x.EduBG = eduBGs.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
x.EduBG = eduBGs.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
x.WorkExp = workExps.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
x.WorkExp = workExps.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
@ -336,19 +343,6 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
var tagIds1 = JsonHelper.JsonToObj<List<long>>(x.Tags); |
|
|
|
var tagIds1 = JsonHelper.JsonToObj<List<long>>(x.Tags); |
|
|
|
x.TagList = tags.Where(o => tagIds1.Contains(o.Id)).Select(o => o.TagName).ToList(); |
|
|
|
x.TagList = tags.Where(o => tagIds1.Contains(o.Id)).Select(o => o.TagName).ToList(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#region 计算年龄 |
|
|
|
|
|
|
|
if (x.Birthday != null && x.Birthday > DateTime.MinValue) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
DateTime birthdate = (DateTime)x.Birthday; |
|
|
|
|
|
|
|
DateTime now = DateTime.Now; |
|
|
|
|
|
|
|
int age = now.Year - birthdate.Year; |
|
|
|
|
|
|
|
if (now.Month < birthdate.Month || (now.Month == birthdate.Month && now.Day < birthdate.Day)) |
|
|
|
|
|
|
|
age--; |
|
|
|
|
|
|
|
x.Age = age; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
x.Birthday1 = DateTimeHelper.ConvertToDayString(x.Birthday); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return list[0]; |
|
|
|
return list[0]; |
|
|
|