|
|
@ -1,4 +1,5 @@ |
|
|
|
using Tiobon.Core.Model.Models; |
|
|
|
using Microsoft.EntityFrameworkCore.ChangeTracking; |
|
|
|
|
|
|
|
using Tiobon.Core.Model.Models; |
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
namespace Tiobon.Core.Services; |
|
|
@ -195,6 +196,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
RefAsync<int> total = 0; |
|
|
|
RefAsync<int> total = 0; |
|
|
|
|
|
|
|
whereExpression.And(x => x.ApplicationStatus == "Submit"); |
|
|
|
var entitys = await query |
|
|
|
var entitys = await query |
|
|
|
.WhereIF(condition.IsNotEmptyOrNull(), condition) |
|
|
|
.WhereIF(condition.IsNotEmptyOrNull(), condition) |
|
|
|
.Where(whereExpression.ToExpression()) |
|
|
|
.Where(whereExpression.ToExpression()) |
|
|
@ -232,6 +234,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
{ |
|
|
|
{ |
|
|
|
//x.ResumeId = x.Id; |
|
|
|
//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; |
|
|
|
x.GenderLabel = await GetParaLabel("Gender", x.Gender); |
|
|
|
x.GenderLabel = await GetParaLabel("Gender", x.Gender); |
|
|
|
x.EducationLabel = await GetParaLabel("EducationalBGLevel", x.Education); |
|
|
|
x.EducationLabel = await GetParaLabel("EducationalBGLevel", x.Education); |
|
|
|
x.NationLabel = await GetParaLabel("A02", x.Nation); |
|
|
|
x.NationLabel = await GetParaLabel("A02", x.Nation); |
|
|
@ -248,6 +251,18 @@ 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 |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
return result; |
|
|
@ -934,11 +949,16 @@ END"; |
|
|
|
#region 简历提交接口 |
|
|
|
#region 简历提交接口 |
|
|
|
public async Task<ServiceResult> Submit(long id, string status, ResumeFormColumnSubmit resume) |
|
|
|
public async Task<ServiceResult> Submit(long id, string status, ResumeFormColumnSubmit resume) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
resume.Base.ApplicationStatus = status; |
|
|
|
resume.Base.ApplicationStatus = status; |
|
|
|
resume.Base.ApplicationTime = DateTime.Now; |
|
|
|
resume.Base.ApplicationTime = DateTime.Now; |
|
|
|
if (status == "Submit") |
|
|
|
if (status == "Submit") |
|
|
|
resume.Base.Status = DIC_INTERVIEW_ORDER_STATUS.WaitRecommended; |
|
|
|
resume.Base.Status = DIC_INTERVIEW_ORDER_STATUS.WaitRecommended; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var entity = await base.QueryById(id); |
|
|
|
|
|
|
|
if (entity != null && entity.Status != DIC_INTERVIEW_ORDER_STATUS.WaitRecommended) |
|
|
|
|
|
|
|
resume.Base.Status = entity.Status; |
|
|
|
|
|
|
|
|
|
|
|
if (resume.Base.PhotoUrls != null && resume.Base.PhotoUrls.Any()) |
|
|
|
if (resume.Base.PhotoUrls != null && resume.Base.PhotoUrls.Any()) |
|
|
|
resume.Base.PhotoUrl = resume.Base.PhotoUrls[0].RelativePath; |
|
|
|
resume.Base.PhotoUrl = resume.Base.PhotoUrls[0].RelativePath; |
|
|
|
await base.Update(id, resume.Base); |
|
|
|
await base.Update(id, resume.Base); |
|
|
@ -1247,9 +1267,17 @@ END"; |
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.HasRecommended || |
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.HasRecommended || |
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.WaitAppointment || |
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.WaitAppointment || |
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.WaitInterview || |
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.WaitInterview || |
|
|
|
|
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer || |
|
|
|
|
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.HasSendOffer || |
|
|
|
|
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.HasOffer || |
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.HasInterview))) |
|
|
|
x.Status == DIC_INTERVIEW_ORDER_STATUS.HasInterview))) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//await Db.Updateable<Ghrh_InterviewOrder>() |
|
|
|
|
|
|
|
// .SetColumns(it => it.IsEnable == 0) |
|
|
|
|
|
|
|
// .Where(it => it.ResumeId == id) |
|
|
|
|
|
|
|
// .ExecuteCommandAsync(); |
|
|
|
|
|
|
|
|
|
|
|
var orderId = await _ghrh_InterviewOrderServices.Add(new InsertGhrh_InterviewOrderInput() |
|
|
|
var orderId = await _ghrh_InterviewOrderServices.Add(new InsertGhrh_InterviewOrderInput() |
|
|
|
{ |
|
|
|
{ |
|
|
|
ResumeId = id, |
|
|
|
ResumeId = id, |
|
|
@ -1610,8 +1638,9 @@ END"; |
|
|
|
record.Status = DIC_INTERVIEW_ORDER_STATUS.HasInterview; |
|
|
|
record.Status = DIC_INTERVIEW_ORDER_STATUS.HasInterview; |
|
|
|
await _ghrh_InterviewRecordServices.Update(record, ["AssessTime", "Status", "IsPass", "InterviewResult"]); |
|
|
|
await _ghrh_InterviewRecordServices.Update(record, ["AssessTime", "Status", "IsPass", "InterviewResult"]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.HasInterview); |
|
|
|
|
|
|
|
|
|
|
|
await LogRecord(order.Id, "填写了面试评估,轮数:{order.Round},是否通过:{(input.IsPass == true ? \"通过\" : \"不通过\")},内容:{input.Content}!"); |
|
|
|
await LogRecord(order.Id, $"填写了面试评估,轮数:{order.Round},是否通过:{(input.IsPass == true ? "通过" : "不通过")},内容:{input.Content}!"); |
|
|
|
return ServiceResult.OprateSuccess(); |
|
|
|
return ServiceResult.OprateSuccess(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1772,6 +1801,28 @@ END"; |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 发起录用审批 |
|
|
|
|
|
|
|
public async Task<ServiceResult> ApplyOfferApproval(List<long> ids) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
for (int i = 0; i < ids.Count; i++) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var id = ids[i]; |
|
|
|
|
|
|
|
var entity = await base.QueryById(id); |
|
|
|
|
|
|
|
if (entity == null) |
|
|
|
|
|
|
|
return ServiceResult.OprateFailed("无效的简历ID!"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await UpdateResumeStatus(entity, DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var order = await _ghrh_InterviewOrderServices.QuerySingle(x => x.ResumeId == id); |
|
|
|
|
|
|
|
await UpdateInterviewOrderStatus(order, DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer); |
|
|
|
|
|
|
|
await UpdateInterviewRecordStatus(order, DIC_INTERVIEW_ORDER_STATUS.WaitSendOffer); |
|
|
|
|
|
|
|
await LogRecord(order.Id, "发起录用审批!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ServiceResult.OprateSuccess(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
#region ESS端查询简历记录 |
|
|
|
#region ESS端查询简历记录 |
|
|
|
public async Task<ServicePageResult<object>> QueryESS(QueryBody filter, string condition) |
|
|
|
public async Task<ServicePageResult<object>> QueryESS(QueryBody filter, string condition) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1870,7 +1921,9 @@ END"; |
|
|
|
C.Status OrderStatus, |
|
|
|
C.Status OrderStatus, |
|
|
|
C.StaffId, |
|
|
|
C.StaffId, |
|
|
|
C.CancelReason, |
|
|
|
C.CancelReason, |
|
|
|
C.IsCancel |
|
|
|
C.IsCancel, |
|
|
|
|
|
|
|
CONVERT |
|
|
|
|
|
|
|
(BIT, CASE B.[Round] WHEN C.[Round] THEN 'true' ELSE 'false' END) AS IsAllowAssess |
|
|
|
FROM Ghrh_Resume A |
|
|
|
FROM Ghrh_Resume A |
|
|
|
JOIN Ghrh_InterviewOrder B ON A.ID = B.ResumeId |
|
|
|
JOIN Ghrh_InterviewOrder B ON A.ID = B.ResumeId |
|
|
|
JOIN Ghrh_InterviewRecord C |
|
|
|
JOIN Ghrh_InterviewRecord C |
|
|
@ -2013,7 +2066,7 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1"; |
|
|
|
var data = await Db.SqlQueryable<object>(sql) |
|
|
|
var data = await Db.SqlQueryable<object>(sql) |
|
|
|
.OrderBy(filter.orderBy) |
|
|
|
.OrderBy(filter.orderBy) |
|
|
|
.ToPageListAsync(filter.pageNum, filter.pageSize, totalCount); |
|
|
|
.ToPageListAsync(filter.pageNum, filter.pageSize, totalCount); |
|
|
|
|
|
|
|
|
|
|
|
return new ServicePageResult<object>(filter.pageNum, totalCount, filter.pageSize, data); |
|
|
|
return new ServicePageResult<object>(filter.pageNum, totalCount, filter.pageSize, data); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|