diff --git a/Tiobon.Core.Services/CommonServices.cs b/Tiobon.Core.Services/CommonServices.cs index 12fbcb94..5314593f 100644 --- a/Tiobon.Core.Services/CommonServices.cs +++ b/Tiobon.Core.Services/CommonServices.cs @@ -1393,7 +1393,7 @@ public partial class CommonServices : BaseServices>, ICommon result.JM_PageControlT1.Toolbar.Add(new Toolbar() { display = true, - fnKey = "TBD14YN", + fnKey = "TBD5YN", fnTitle = "重新推荐", fnType = "row", icon = "ess-icon-reject", diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 97448b08..4067a6c2 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -3,7 +3,6 @@ using DinkToPdf.Contracts; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; using System.IO.Compression; -using Tiobon.Core.IServices; using static Tiobon.Core.Model.Consts; namespace Tiobon.Core.Services; @@ -619,6 +618,13 @@ ORDER BY A.SortNo ASC"; RecycledTime = null, }) .Where(it => ids.Contains(it.Id)).ExecuteCommandAsync(); + + if (status == "Talent_Pool" || status == "Blacklist") + await Db.Updateable() + .SetColumns(it => it.IsEnable == 0) + .Where(it => it.ResumeId != null && ids.Contains(it.ResumeId.Value)) + .ExecuteCommandAsync(); + return result > 0 ? true : false; } @@ -636,6 +642,11 @@ ORDER BY A.SortNo ASC"; RecycledTime = DateTime.Now, }) .Where(it => ids.Contains(it.Id)).ExecuteCommandAsync(); + + await Db.Updateable() + .SetColumns(it => it.IsEnable == 0) + .Where(it => it.ResumeId != null && ids.Contains(it.ResumeId.Value)) + .ExecuteCommandAsync(); return result > 0 ? true : false; } @@ -644,16 +655,47 @@ ORDER BY A.SortNo ASC"; #region 添加标签 public async Task MarkTags(List ids, List tags) { + var result = 0; var tag = JsonHelper.ObjToJson(tags); - var result = await Db.Updateable() - .SetColumns(it => new Ghrh_Resume() - { - Tags = tag, - UpdateBy = App.User.ID, - UpdateTime = DateTime.Now, - }) - .Where(it => ids.Contains(it.Id)) - .ExecuteCommandAsync(); + if (ids != null) + { + if (ids.Count == 0) + { + result = await Db.Updateable() + .SetColumns(it => new Ghrh_Resume() + { + Tags = tag, + UpdateBy = App.User.ID, + UpdateTime = DateTime.Now, + }) + .Where(it => ids.Contains(it.Id)) + .ExecuteCommandAsync(); + } + else + { + for (int i = 0; i < ids.Count; i++) + { + var resume = await base.QueryById(ids[i]); + if (resume != null) + { + var tagIds = JsonHelper.JsonToObj>(resume.Tags ?? "[]"); + tagIds.AddRange(tags); + tagIds = tagIds.Distinct().ToList(); + tag = JsonHelper.ObjToJson(tagIds); + result = await Db.Updateable() + .SetColumns(it => new Ghrh_Resume() + { + Tags = tag, + UpdateBy = App.User.ID, + UpdateTime = DateTime.Now, + }) + .Where(it => it.Id == ids[i]) + .ExecuteCommandAsync(); + } + } + } + } + return result > 0 ? true : false; } @@ -1525,8 +1567,7 @@ END"; 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.HasOffer))) continue; await Db.Updateable()