|
|
@ -3,6 +3,7 @@ using DinkToPdf.Contracts; |
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
using Microsoft.IdentityModel.Tokens; |
|
|
|
using Microsoft.IdentityModel.Tokens; |
|
|
|
|
|
|
|
using NPOI.OpenXmlFormats.Dml; |
|
|
|
using System.IO.Compression; |
|
|
|
using System.IO.Compression; |
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
using static Tiobon.Core.Model.Consts; |
|
|
|
|
|
|
|
|
|
|
@ -292,6 +293,8 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
var offerApplyConfig = await Db.Queryable<Ghrh_Config>().Where(x => x.ConfigCode == "ESS_Recruit_Custom_Offer_Apply").FirstAsync(); |
|
|
|
var offerApplyConfig = await Db.Queryable<Ghrh_Config>().Where(x => x.ConfigCode == "ESS_Recruit_Custom_Offer_Apply").FirstAsync(); |
|
|
|
//【简历库-录用-已发offer】配置按钮 |
|
|
|
//【简历库-录用-已发offer】配置按钮 |
|
|
|
var sendOfferConfig = await Db.Queryable<Ghrh_Config>().Where(x => x.ConfigCode == "ESS_Recruit_Custom_Transfer_Staff").FirstAsync(); |
|
|
|
var sendOfferConfig = await Db.Queryable<Ghrh_Config>().Where(x => x.ConfigCode == "ESS_Recruit_Custom_Transfer_Staff").FirstAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var applyOrders = await Db.Queryable<Ghrh_OfferApplyOrder>().Where(x => x.ResumeId != null && ids.Contains(x.ResumeId.Value)).ToListAsync(); |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
list.ForEach(async x => |
|
|
|
list.ForEach(async x => |
|
|
@ -345,6 +348,9 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
{ |
|
|
|
{ |
|
|
|
//x.InterviewResult = "推荐中"; |
|
|
|
//x.InterviewResult = "推荐中"; |
|
|
|
x.OfferApplyType = offerApplyConfig?.ConfigValue ?? "System"; |
|
|
|
x.OfferApplyType = offerApplyConfig?.ConfigValue ?? "System"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (applyOrders.Any(x => x.ResumeId == x.ResumeId)) |
|
|
|
|
|
|
|
x.OfferApplyExist = true; |
|
|
|
} |
|
|
|
} |
|
|
|
if (x.Status == DIC_INTERVIEW_ORDER_STATUS.HasSendOffer) |
|
|
|
if (x.Status == DIC_INTERVIEW_ORDER_STATUS.HasSendOffer) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -2994,13 +3000,20 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
/// <param name="resumeId"></param> |
|
|
|
/// <param name="resumeId"></param> |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
public async Task SyncToStaff(long resumeId) |
|
|
|
public async Task<bool> SyncToStaff(long id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var entity = await base.QueryById(id); |
|
|
|
|
|
|
|
if (entity.IsSyncToStaff == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
//【简历库-录用-已发offer】配置按钮 |
|
|
|
//【简历库-录用-已发offer】配置按钮 |
|
|
|
var sendOfferConfig = await Db.Queryable<Ghrh_Config>().Where(x => x.ConfigCode == "ESS_Recruit_Custom_Transfer_Staff").FirstAsync(); |
|
|
|
var sendOfferConfig = await Db.Queryable<Ghrh_Config>().Where(x => x.ConfigCode == "ESS_Recruit_Custom_Transfer_Staff").FirstAsync(); |
|
|
|
|
|
|
|
|
|
|
|
var type = sendOfferConfig?.ConfigValue ?? "Fast"; |
|
|
|
var type = sendOfferConfig?.ConfigValue ?? "Fast"; |
|
|
|
var entity = await base.QueryById(resumeId); |
|
|
|
|
|
|
|
|
|
|
|
#region 人事资料 |
|
|
|
var staff = new Ghra_Staff(); |
|
|
|
var staff = new Ghra_Staff(); |
|
|
|
staff.StaffName = entity.StaffName; |
|
|
|
staff.StaffName = entity.StaffName; |
|
|
|
var aaa = entity.StaffName.GetTotalPingYin(); |
|
|
|
var aaa = entity.StaffName.GetTotalPingYin(); |
|
|
@ -3017,7 +3030,7 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; |
|
|
|
staff.Mobile = entity.Mobile; |
|
|
|
staff.Mobile = entity.Mobile; |
|
|
|
staff.Email = entity.Email; |
|
|
|
staff.Email = entity.Email; |
|
|
|
staff.Indate = DateTime.Now; |
|
|
|
staff.Indate = DateTime.Now; |
|
|
|
//staff.CertificateType = entity.CertificateType; |
|
|
|
staff.Reverse3 = entity.CertificateType; |
|
|
|
staff.IDCardBegin = entity.IDCardBegin; |
|
|
|
staff.IDCardBegin = entity.IDCardBegin; |
|
|
|
staff.IDCardEnd = entity.IDCardEnd; |
|
|
|
staff.IDCardEnd = entity.IDCardEnd; |
|
|
|
staff.IdCardNo = entity.IdCardNo; |
|
|
|
staff.IdCardNo = entity.IdCardNo; |
|
|
@ -3049,8 +3062,35 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
staff.IsEnable = 1; |
|
|
|
staff.IsEnable = 1; |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
var applyOrder = await Db.Queryable<Ghrh_OfferApplyOrder>().Where(x => x.ResumeId == resumeId).FirstAsync(); |
|
|
|
#region 家庭关系 |
|
|
|
|
|
|
|
var familys = await _ghrh_ResumeHomeServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 教育背景 |
|
|
|
|
|
|
|
var educations = await _ghrh_ResumeEduBGServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 工作经历 |
|
|
|
|
|
|
|
var workExps = await _ghrh_ResumeWorkExpServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 证件 |
|
|
|
|
|
|
|
var Licences = await _ghrh_ResumeLicenceServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 简历培训记录 |
|
|
|
|
|
|
|
var Trainings = await _ghrh_ResumeTrainingServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var applyOrder = await Db.Queryable<Ghrh_OfferApplyOrder>().Where(x => x.ResumeId == id).FirstAsync(); |
|
|
|
if (applyOrder != null) |
|
|
|
if (applyOrder != null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
staff.DeptID = applyOrder.DeptId; |
|
|
|
staff.DeptID = applyOrder.DeptId; |
|
|
@ -3060,6 +3100,13 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; |
|
|
|
} |
|
|
|
} |
|
|
|
var staffId = await Db.Insertable(staff).ExecuteReturnIdentityAsync(); |
|
|
|
var staffId = await Db.Insertable(staff).ExecuteReturnIdentityAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (staffId > 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
entity.IsSyncToStaff = true; |
|
|
|
|
|
|
|
await Update(entity, ["IsSyncToStaff"]); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
} |
|
|
|
} |