From f344bf983abd7b38fa2c6d94233a9f4a1b11a228 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Mon, 4 Nov 2024 16:46:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=9B=E8=81=98=E8=A1=A8=E5=8D=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8F=90=E4=BA=A4=E6=8E=A5=E5=8F=A3=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=AE=9E=E4=BD=93=E7=AE=80=E5=8E=86=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E6=8E=A5=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Edit/Ghrh/Ghrh_Resume.Dto.EditInput.cs | 6 +++- .../ViewModels/Extend/ResumeViewTab.cs | 4 +++ .../Ghrh/Ghrh_ResumeServices.cs | 33 ++++++++++++++++++- 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/Tiobon.Core.Model/Edit/Ghrh/Ghrh_Resume.Dto.EditInput.cs b/Tiobon.Core.Model/Edit/Ghrh/Ghrh_Resume.Dto.EditInput.cs index 28c6ef57..6959157a 100644 --- a/Tiobon.Core.Model/Edit/Ghrh/Ghrh_Resume.Dto.EditInput.cs +++ b/Tiobon.Core.Model/Edit/Ghrh/Ghrh_Resume.Dto.EditInput.cs @@ -13,7 +13,9 @@ *│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ *│ 作者:SimonHsiao │ *└──────────────────────────────────┘ -*/ +*/ + +using Tiobon.Core.Model.ViewModels.Extend; namespace Tiobon.Core.Model.Models { @@ -23,5 +25,7 @@ namespace Tiobon.Core.Model.Models /// public class EditGhrh_ResumeInput : Ghrh_ResumeBase { + + public List PhotoUrls { get; set; } } } diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs index 76b79c04..bfa22444 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeViewTab.cs @@ -71,3 +71,7 @@ public class ResumeAttachment public string RemarkSz { get; set; } } + +public class ResumePhotoAttachment: ResumeAttachment +{ +} \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 1c0fa81c..730682dd 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -571,7 +571,24 @@ END"; x.children1 = null; }); - obj.Columns = columns; + + if (columns.Any(x => x.tabKey == "Photo") && columns.Any(x => x.tabKey == "Base")) + { + columns.ForEach(x => + { + if (x.tabKey == "Base") + { + x.children.Insert(0, new ResumeFormColumnChildren() + { + field = "PhotoUrls", + elementType = "FileUpload", + editable = "1" + }); + } + }); + + } + obj.Columns = columns.Where(x => x.tabKey != "Photo").ToList(); #endregion #region Data @@ -591,6 +608,17 @@ END"; var value = entity.GetPropertyValue(x); dicts.Add(x, value); }); + if (entity.PhotoUrl.IsNotEmptyOrNull()) + { + dicts.Add("PhotoUrls", new List() + { + new ResumePhotoAttachment() { RelativePath =entity.PhotoUrl } + }); + + } + else dicts.Add("PhotoUrls", new List() + { + }); Data.Base = dicts; #endregion @@ -771,6 +799,9 @@ END"; resume.Base.ApplicationTime = DateTime.Now; if (status == "Submit") resume.Base.Status = "All"; + + if (resume.Base.PhotoUrls != null && resume.Base.PhotoUrls.Any()) + resume.Base.PhotoUrl = resume.Base.PhotoUrls[0].RelativePath; await base.Update(id, resume.Base); await _ghrh_ResumeHomeServices.Delete(x => x.ResumeId != null && x.ResumeId == id);//家庭关系