master
xiaochanghai 6 months ago
parent d4ab2c1f0b
commit 55b065602d
  1. 2
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_OfferApplyOrderController.cs
  2. 5
      Tiobon.Core.Model/View/Ghrh/Ghrh_Resume.Dto.View.cs
  3. 64
      Tiobon.Core.Services/Ghrh/Ghrh_OfferApplyOrderServices.cs
  4. 30
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
  5. 2
      Tiobon.Core/Tiobon.Core.xml

@ -31,7 +31,7 @@ public class Ghrh_OfferApplyOrderController : BaseController<IGhrh_OfferApplyOrd
/// <param name="entity">简历ID</param>
/// <returns></returns>
[HttpPost, Route("TempAdd/{resumeId}")]
public async Task<ServiceResult<long>> TempAdd(long resumeId, InsertGhrh_OfferApplyOrderInput entity) => await _service.TempAdd(resumeId, entity);
public async Task<ServiceResult<long>> TempAdd(long resumeId, [FromBody] InsertGhrh_OfferApplyOrderInput entity) => await _service.TempAdd(resumeId, entity);
#endregion
}

@ -187,6 +187,11 @@ public class Ghrh_ResumeDto : Ghrh_Resume
/// </summary>
public string Birthday1 { get; set; }
/// <summary>
/// 录用公司
/// </summary>
public string HireCompanyName { get; set; }
/// <summary>
/// 用人部门
/// </summary>

@ -1,5 +1,5 @@
using AgileObjects.AgileMapper.Extensions.Internal;
using NPOI.Util.Collections;
using System.ComponentModel.Design;
namespace Tiobon.Core.Services;
@ -177,31 +177,45 @@ public class Ghrh_OfferApplyOrderServices : BaseServices<Ghrh_OfferApplyOrder, G
public async Task<ServiceResult<long>> TempAdd(long resumeId, InsertGhrh_OfferApplyOrderInput entity)
{
entity.OrderNo = await GenerateContinuousSequence("Ghrh_OfferApplyOrder", "OrderNo", "LYSQ");
entity.ApplicantId = GetStaffId();
entity.ApplyTime = DateTime.Now;
entity.WorkState = 1;
var id = await base.Add(entity);
#region 写入数据,并判断是否有错误
var sql = $"SELECT ISNULL(MAX(id)+1,1) FROM Ghrh_OfferApplyOrder WHERE Id !='{id}'";
var id1 = await Db.Ado.GetLongAsync(sql);
sql = $"UPDATE Ghrh_OfferApplyOrder SET Id={id1} WHERE Id ='{id}'";
await Db.Ado.ExecuteCommandAsync(sql);
id = id1;
#endregion
if (entity.Items.IsNotEmptyOrNull())
var order = await base.QuerySingle(x => x.ResumeId == resumeId);
if (order is null)
{
entity.Items.ForEach(x =>
var resume = await Db.Queryable<Ghrh_Resume>().Where(x => x.Id == resumeId).FirstAsync();
entity.OrderNo = await GenerateContinuousSequence("Ghrh_OfferApplyOrder", "OrderNo", "LYSQ");
entity.ApplicantId = GetStaffId();
entity.ApplyTime = DateTime.Now;
entity.WorkState = 1;
entity.ResumeId = resumeId;
entity.StaffName = resume.StaffName;
entity.ResumeId = resumeId;
var id = await base.Add(entity);
#region 写入数据,并判断是否有错误
var sql = $"SELECT ISNULL(MAX(id)+1,1) FROM Ghrh_OfferApplyOrder WHERE Id !='{id}'";
var id1 = await Db.Ado.GetLongAsync(sql);
sql = $"UPDATE Ghrh_OfferApplyOrder SET Id={id1} WHERE Id ='{id}'";
await Db.Ado.ExecuteCommandAsync(sql);
id = id1;
#endregion
if (entity.Items.IsNotEmptyOrNull())
{
x.OrderId = id;
});
await _ghrh_OfferApplyOrderSalaryServices.Add(entity.Items);
entity.Items.ForEach(x =>
{
x.OrderId = id;
});
await _ghrh_OfferApplyOrderSalaryServices.Add(entity.Items);
}
return ServiceResult<long>.OprateSuccess("保存成功", id);
}
else
{
var edit = Mapper.Map(entity).ToANew<EditGhrh_OfferApplyOrderInput>();
await base.Update(order.Id, edit, null, ["OrderNo", "ApplicantId", "ApplyTime", "WorkState", "ResumeId"]);
return ServiceResult<long>.OprateSuccess("修改成功!", order.Id);
return ServiceResult<long>.OprateSuccess("保存成功", id);
}
}
public override async Task<bool> Update(long Id, EditGhrh_OfferApplyOrderInput editModel)
@ -284,7 +298,8 @@ public class Ghrh_OfferApplyOrderServices : BaseServices<Ghrh_OfferApplyOrder, G
var applyOrder = await base.QuerySingle(x => x.ResumeId == resumeId);
if (applyOrder != null)
{
obj.CompanyId = applyOrder.CompanyId;
obj.DeptId = applyOrder.DeptId;
obj.TitleId = applyOrder.TitleId;
obj.Channel = applyOrder.Channel;
@ -293,7 +308,8 @@ public class Ghrh_OfferApplyOrderServices : BaseServices<Ghrh_OfferApplyOrder, G
obj.InDate = applyOrder.InDate;
obj.StaffType = applyOrder.StaffType;
obj.GradeId = applyOrder.GradeId;
obj.JobId = applyOrder.JobId;
obj.PeriodMasterId = applyOrder.PeriodMasterId;
obj.JobId = applyOrder.JobId;
obj.ProbationMonths = applyOrder.ProbationMonths;
obj.ReportId = applyOrder.ReportId;
obj.JobResponsibility = applyOrder.JobResponsibility;

@ -1,11 +1,7 @@
using DinkToPdf;
using DinkToPdf.Contracts;
using Google.Protobuf.WellKnownTypes;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.Extensions.Hosting;
using System.ComponentModel;
using System.Drawing;
using System.IO.Compression;
using static Tiobon.Core.Model.Consts;
@ -315,7 +311,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
//【简历库-录用-已发offer】配置按钮
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) && x.WorkState == 0 && x.WorkNo != null).ToListAsync();
var applyOrders = await Db.Queryable<Ghrh_OfferApplyOrder>().Where(x => x.ResumeId != null && ids.Contains(x.ResumeId.Value) && x.WorkState == 0).ToListAsync();
#endregion
list.ForEach(async x =>
@ -375,8 +371,15 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
//x.InterviewResult = "推荐中";
x.OfferApplyType = offerApplyConfig?.ConfigValue ?? "System";
if (applyOrders.Any(o => o.ResumeId == x.ResumeId))
x.OfferApplyExist = true;
var applyOrder = applyOrders.Where((o => o.ResumeId == x.ResumeId)).SingleOrDefault();
if (applyOrder != null)
{
if (applyOrder.WorkNo.IsNotEmptyOrNull())
x.OfferApplyExist = true;
//x.HireCompanyName = (await Db.Queryable<company>().Where(x => x.DeptID == applyOrder.DeptId).FirstAsync())?.DeptName
x.HireDeptName = (await Db.Queryable<Ghro_Dept>().Where(x => x.DeptID == applyOrder.DeptId).FirstAsync())?.DeptName;
x.HireTitleName = (await Db.Queryable<Ghra_Title>().Where(x => x.TitleID == applyOrder.TitleId).FirstAsync())?.TitleName;
}
x.InterviewTime1 = order.InterviewTime;
x.InterviewContent = order.InterviewContent;
@ -1599,7 +1602,7 @@ END";
return ServiceResult.OprateFailed("至少选择一名面试者!");
recommend.InterviewStaffs = recommend.InterviewStaffs.Where(x => x.StaffId != null).Distinct().ToList();
if (recommend.RequestId.IsNotEmptyOrNull())
{
@ -2107,7 +2110,7 @@ END";
InterviewIds = JsonHelper.ObjToJson(interviewIds),
Interviewer = string.Join(",", interviewer.Select(o => o.StaffName))
});
//await Db.Updateable<Ghrh_InterviewRecord>()
// .SetColumns(it => new Ghrh_InterviewRecord()
// {
@ -2116,7 +2119,7 @@ END";
// })
// .Where(it => it.Status == DIC_INTERVIEW_ORDER_STATUS.WaitInterview && it.OrderId == order.Id)
// .ExecuteCommandAsync();
for (int i = 0; i < input.InterviewStaffs.Count; i++)
{
await _ghrh_InterviewRecordServices.Add(new InsertGhrh_InterviewRecordInput()
@ -2939,6 +2942,13 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status";
// result.DeptManagerEmail = staff.Email;
// }
//}
var applyOrder = await Db.Queryable<Ghrh_OfferApplyOrder>().Where(x => x.ResumeId == id).FirstAsync();
if (applyOrder != null)
{
result.DeptName = (await Db.Queryable<Ghro_Dept>().Where(x => x.DeptID == applyOrder.DeptId).FirstAsync())?.DeptName;
result.TitleName = (await Db.Queryable<Ghra_Title>().Where(x => x.TitleID == applyOrder.TitleId).FirstAsync())?.TitleName;
}
#endregion
return ServiceResult<ResumeScheduleInterviewResult>.OprateSuccess("查询成功", result);

@ -1491,7 +1491,7 @@
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.RescheduleInterview(System.Int64,Tiobon.Core.Model.ViewModels.Extend.ResumeRescheduleInterviewForm)">
<summary>
重新安排面试-直接发起
重新安排面试-直接发起新的
</summary>
<param name="id">简历Id</param>
<param name="input">input</param>

Loading…
Cancel
Save