From 7804b2a9d33b0a51ca3d30807490edf6f98d94fa Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 5 Nov 2024 10:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2=E7=AE=80?= =?UTF-8?q?=E5=8E=86=E6=8F=90=E4=BA=A4=E7=BB=93=E6=9E=9C=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/Extend/ResumeViewTab.cs | 3 ++ .../Ghrh/Ghrh_ResumeServices.cs | 28 ++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs index bfa22444..e7862aa6 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs @@ -59,6 +59,9 @@ public class ResumeFormColumnSubmit public List Training { get; set; } public List WorkExp { get; set; } + public List Attachment { get; set; } + + } public class ResumeAttachment diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 730682dd..d1853aa0 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -1,6 +1,7 @@  using AgileObjects.AgileMapper; using DnsClient; +using MathNet.Numerics.Distributions; using Microsoft.IdentityModel.Tokens; using Newtonsoft.Json.Linq; using SqlSugar; @@ -617,8 +618,8 @@ END"; } else dicts.Add("PhotoUrls", new List() - { - }); + { + }); Data.Base = dicts; #endregion @@ -729,7 +730,7 @@ END"; Data.Training = Training; #endregion - Data.Attachment = await Db.Queryable().Where(x => x.TableName == id.ObjToString()).ToListAsync(); + Data.Attachment = await Db.Queryable().Where(x => x.TableName == id.ObjToString()).ToListAsync(); var statements = await _ghrh_ResumeStatementServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);//证件 Data.Statement = statements.ToDictionary(person => person.StatementCode, person => person.TrueOrFalse); @@ -852,11 +853,30 @@ END"; await _ghrh_ResumeStatementServices.Add(inserts); } + + await Db.Updateable() + .SetColumns(it => new Ghrs_Attachment() { TableName = null }) + .Where(it => it.TableName == id.ToString()) + .ExecuteCommandAsync(); + if (resume.Attachment != null && resume.Attachment.Any()) + { + for (int i = 0; i < resume.Attachment.Count; i++) + { + await Db.Updateable() + .SetColumns(it => new Ghrs_Attachment() + { + TableName = id.ToString(), + RemarkSz = resume.Attachment[i].RemarkSz + }) + .Where(it => it.RelativePath == resume.Attachment[i].RelativePath) + .ExecuteCommandAsync(); + } + } return ServiceResult.OprateSuccess(); } #endregion - #region 简历提交接口 + #region 查询招聘表单信息提交结果接口 public async Task> QueryResult(long id, int langId) { dynamic Data = new ExpandoObject();