简历数据提交接口优化

master
xiaochanghai 7 months ago
parent 2517f51c21
commit 8347fc06b3
  1. 6
      Model/Tiobon.Web.pdm
  2. 252
      Tiobon.Core.Model/Base/Ghrh/Ghrh_ResumeEduBG.Dto.Base.cs
  3. 2
      Tiobon.Core.Model/Models/Ghrh/Ghrh_ResumeEduBG.cs
  4. 14
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeEduBGServices.cs
  5. 14
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeHomeServices.cs
  6. 14
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeLicenceServices.cs
  7. 88
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
  8. 14
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeTrainingServices.cs
  9. 14
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeWorkExpServices.cs
  10. 4
      Tiobon.Core/Tiobon.Core.xml

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{C294868A-C3F3-41AD-98CC-78B6D4E0CC40}" Label="" LastModificationDate="1730947816" Name="Tiobon" Objects="2235" Symbols="85" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="15.0.0.2613"?> <?PowerDesigner AppLocale="UTF16" ID="{C294868A-C3F3-41AD-98CC-78B6D4E0CC40}" Label="" LastModificationDate="1731394264" Name="Tiobon" Objects="2232" Symbols="85" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="15.0.0.2613"?>
<!-- do not edit this file --> <!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object"> <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -35435,10 +35435,10 @@ Ghra_staff_InsureBase
<a:Code>IsGraduate</a:Code> <a:Code>IsGraduate</a:Code>
<a:CreationDate>1729663174</a:CreationDate> <a:CreationDate>1729663174</a:CreationDate>
<a:Creator>Administrator</a:Creator> <a:Creator>Administrator</a:Creator>
<a:ModificationDate>1729663376</a:ModificationDate> <a:ModificationDate>1731394264</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier> <a:Modifier>Administrator</a:Modifier>
<a:Comment>是否毕业</a:Comment> <a:Comment>是否毕业</a:Comment>
<a:DataType>int</a:DataType> <a:DataType>bit</a:DataType>
</o:Column> </o:Column>
<o:Column Id="o1969"> <o:Column Id="o1969">
<a:ObjectID>BDF407F4-EA20-4673-A0EC-0C7157EFCDA3</a:ObjectID> <a:ObjectID>BDF407F4-EA20-4673-A0EC-0C7157EFCDA3</a:ObjectID>

@ -13,136 +13,132 @@
*   *  
* SimonHsiao * SimonHsiao
* *
*/ */
using System.ComponentModel; namespace Tiobon.Core.Model.Models;
using System.ComponentModel.DataAnnotations;
namespace Tiobon.Core.Model.Models
/// <summary>
/// 教育背景 (Dto.Base)
/// </summary>
public class Ghrh_ResumeEduBGBase
{ {
/// <summary> /// <summary>
/// 教育背景 (Dto.Base) /// 简历ID
/// </summary> /// </summary>
public class Ghrh_ResumeEduBGBase public long? ResumeId { get; set; }
{
/// <summary>
/// <summary> /// 学校名称
/// 简历ID /// </summary>
/// </summary> [Display(Name = "SchoolName"), Description("学校名称"), MaxLength(100, ErrorMessage = "学校名称 不能超过 100 个字符")]
public long? ResumeId { get; set; } public string SchoolName { get; set; }
/// <summary> /// <summary>
/// 学校名称 /// 专业名称
/// </summary> /// </summary>
[Display(Name = "SchoolName"), Description("学校名称"), MaxLength(100, ErrorMessage = "学校名称 不能超过 100 个字符")] [Display(Name = "DeptName"), Description("专业名称"), MaxLength(100, ErrorMessage = "专业名称 不能超过 100 个字符")]
public string SchoolName { get; set; } public string DeptName { get; set; }
/// <summary> /// <summary>
/// 专业名称 /// 开始日期
/// </summary> /// </summary>
[Display(Name = "DeptName"), Description("专业名称"), MaxLength(100, ErrorMessage = "专业名称 不能超过 100 个字符")] public DateTime? BeginDate { get; set; }
public string DeptName { get; set; }
/// <summary>
/// <summary> /// 结束日期
/// 开始日期 /// </summary>
/// </summary> public DateTime? EndDate { get; set; }
public DateTime? BeginDate { get; set; }
/// <summary>
/// <summary> /// 学历
/// 结束日期 /// </summary>
/// </summary> [Display(Name = "DegreeLevel"), Description("学历"), MaxLength(32, ErrorMessage = "学历 不能超过 32 个字符")]
public DateTime? EndDate { get; set; } public string DegreeLevel { get; set; }
/// <summary> /// <summary>
/// 学历 /// 是否毕业
/// </summary> /// </summary>
[Display(Name = "DegreeLevel"), Description("学历"), MaxLength(32, ErrorMessage = "学历 不能超过 32 个字符")] public bool? IsGraduate { get; set; }
public string DegreeLevel { get; set; }
/// <summary>
/// <summary> /// 备注
/// 是否毕业 /// </summary>
/// </summary> [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public int? IsGraduate { get; set; } public string RemarkSz { get; set; }
/// <summary> /// <summary>
/// 备注 /// 默认标志
/// </summary> /// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")] public int? IsDefault { get; set; }
public string RemarkSz { get; set; }
/// <summary>
/// <summary> /// 预留字段1
/// 默认标志 /// </summary>
/// </summary> [Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public int? IsDefault { get; set; } public string Reverse1 { get; set; }
/// <summary> /// <summary>
/// 预留字段1 /// 预留字段2
/// </summary> /// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")] [Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse1 { get; set; } public string Reverse2 { get; set; }
/// <summary> /// <summary>
/// 预留字段2 /// 预留字段3
/// </summary> /// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")] [Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse2 { get; set; } public string Reverse3 { get; set; }
/// <summary> /// <summary>
/// 预留字段3 /// 预留字段4
/// </summary> /// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")] [Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse3 { get; set; } public string Reverse4 { get; set; }
/// <summary> /// <summary>
/// 预留字段4 /// 预留字段5
/// </summary> /// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")] [Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse4 { get; set; } public string Reverse5 { get; set; }
/// <summary> /// <summary>
/// 预留字段5 /// 预留字段6
/// </summary> /// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")] [Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse5 { get; set; } public string Reverse6 { get; set; }
/// <summary> /// <summary>
/// 预留字段6 /// 预留字段7
/// </summary> /// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")] [Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse6 { get; set; } public string Reverse7 { get; set; }
/// <summary> /// <summary>
/// 预留字段7 /// 预留字段8
/// </summary> /// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")] [Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse7 { get; set; } public string Reverse8 { get; set; }
/// <summary> /// <summary>
/// 预留字段8 /// 预留字段9
/// </summary> /// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")] [Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse8 { get; set; } public string Reverse9 { get; set; }
/// <summary> /// <summary>
/// 预留字段9 /// 预留字段10
/// </summary> /// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")] [Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse9 { get; set; } public string Reverse10 { get; set; }
/// <summary> /// <summary>
/// 预留字段10 /// 预留字段11
/// </summary> /// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")] public int? ReverseI1 { get; set; }
public string Reverse10 { get; set; }
/// <summary>
/// <summary> /// 预留字段12
/// 预留字段11 /// </summary>
/// </summary> public int? ReverseI2 { get; set; }
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
}
} }

@ -60,7 +60,7 @@ public class Ghrh_ResumeEduBG : BasePoco
/// <summary> /// <summary>
/// 是否毕业 /// 是否毕业
/// </summary> /// </summary>
public int? IsGraduate { get; set; } public bool? IsGraduate { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注

@ -17,7 +17,7 @@ public class Ghrh_ResumeEduBGServices : BaseServices<Ghrh_ResumeEduBG, Ghrh_Resu
{ {
var data = await base.QueryDto(whereExpression); var data = await base.QueryDto(whereExpression);
var ids = data.Select(x => x.Id.ToString()).ToList(); var ids = data.Select(x => x.Id.ToString()).ToList();
var attachments = await Db.Queryable<Ghre_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync(); var attachments = await Db.Queryable<Ghrs_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync();
data.ForEach(x => data.ForEach(x =>
{ {
@ -25,10 +25,10 @@ public class Ghrh_ResumeEduBGServices : BaseServices<Ghrh_ResumeEduBG, Ghrh_Resu
.Where(o => o.TableName == x.Id.ToString()) .Where(o => o.TableName == x.Id.ToString())
.Select(o => new ResumeAttachment() .Select(o => new ResumeAttachment()
{ {
AttachmentID = o.Id, AttachmentID = o.AttachmentID,
AttachFileExtension = o.AttachFileExtension, AttachFileExtension = o.AttachFileExtension,
AttachFileSize = o.AttachFileSize, AttachFileSize = o.AttachFileSize,
RelativePath = "/Advanced" + o.RelativePath, RelativePath = o.RelativePath,
AttachmentName = o.AttachmentName, AttachmentName = o.AttachmentName,
RemarkSz = o.RemarkSz RemarkSz = o.RemarkSz
}).ToList(); }).ToList();
@ -44,10 +44,10 @@ public class Ghrh_ResumeEduBGServices : BaseServices<Ghrh_ResumeEduBG, Ghrh_Resu
var id = await base.Add(listEntity[i]); var id = await base.Add(listEntity[i]);
if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any()) if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any())
{ {
var ids = listEntity[i].AttachmentIDs.Where(x => x.AttachmentID != null).Select(x => x.AttachmentID.Value).ToList(); var ids = listEntity[i].AttachmentIDs.Select(x => x.RelativePath).ToList();
await Db.Updateable<Ghre_Attachment>() await Db.Updateable<Ghrs_Attachment>()
.SetColumns(x => new Ghre_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now }) .SetColumns(x => new Ghrs_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now })
.Where(it => ids.Contains(it.Id)) .Where(it => it.AttachmentID != null && ids.Contains(it.RelativePath))
.ExecuteCommandAsync(); .ExecuteCommandAsync();
} }
result.Add(id); result.Add(id);

@ -17,7 +17,7 @@ public class Ghrh_ResumeHomeServices : BaseServices<Ghrh_ResumeHome, Ghrh_Resume
{ {
var data = await base.QueryDto(whereExpression); var data = await base.QueryDto(whereExpression);
var ids = data.Select(x => x.Id.ToString()).ToList(); var ids = data.Select(x => x.Id.ToString()).ToList();
var attachments = await Db.Queryable<Ghre_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync(); var attachments = await Db.Queryable<Ghrs_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync();
data.ForEach(x => data.ForEach(x =>
{ {
@ -25,10 +25,10 @@ public class Ghrh_ResumeHomeServices : BaseServices<Ghrh_ResumeHome, Ghrh_Resume
.Where(o => o.TableName == x.Id.ToString()) .Where(o => o.TableName == x.Id.ToString())
.Select(o => new ResumeAttachment() .Select(o => new ResumeAttachment()
{ {
AttachmentID = o.Id, AttachmentID = o.AttachmentID,
AttachFileExtension = o.AttachFileExtension, AttachFileExtension = o.AttachFileExtension,
AttachFileSize = o.AttachFileSize, AttachFileSize = o.AttachFileSize,
RelativePath = "/Advanced" + o.RelativePath, RelativePath = o.RelativePath,
AttachmentName = o.AttachmentName, AttachmentName = o.AttachmentName,
RemarkSz = o.RemarkSz RemarkSz = o.RemarkSz
}).ToList(); }).ToList();
@ -44,10 +44,10 @@ public class Ghrh_ResumeHomeServices : BaseServices<Ghrh_ResumeHome, Ghrh_Resume
var id = await base.Add(listEntity[i]); var id = await base.Add(listEntity[i]);
if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any()) if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any())
{ {
var ids = listEntity[i].AttachmentIDs.Where(x => x.AttachmentID != null).Select(x => x.AttachmentID.Value).ToList(); var ids = listEntity[i].AttachmentIDs.Select(x => x.RelativePath).ToList();
await Db.Updateable<Ghre_Attachment>() await Db.Updateable<Ghrs_Attachment>()
.SetColumns(x => new Ghre_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now }) .SetColumns(x => new Ghrs_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now })
.Where(it => ids.Contains(it.Id)) .Where(it => it.AttachmentID != null && ids.Contains(it.RelativePath))
.ExecuteCommandAsync(); .ExecuteCommandAsync();
} }
result.Add(id); result.Add(id);

@ -17,7 +17,7 @@ public class Ghrh_ResumeLicenceServices : BaseServices<Ghrh_ResumeLicence, Ghrh_
{ {
var data = await base.QueryDto(whereExpression); var data = await base.QueryDto(whereExpression);
var ids = data.Select(x => x.Id.ToString()).ToList(); var ids = data.Select(x => x.Id.ToString()).ToList();
var attachments = await Db.Queryable<Ghre_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync(); var attachments = await Db.Queryable<Ghrs_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync();
data.ForEach(x => data.ForEach(x =>
{ {
@ -25,10 +25,10 @@ public class Ghrh_ResumeLicenceServices : BaseServices<Ghrh_ResumeLicence, Ghrh_
.Where(o => o.TableName == x.Id.ToString()) .Where(o => o.TableName == x.Id.ToString())
.Select(o => new ResumeAttachment() .Select(o => new ResumeAttachment()
{ {
AttachmentID = o.Id, AttachmentID = o.AttachmentID,
AttachFileExtension = o.AttachFileExtension, AttachFileExtension = o.AttachFileExtension,
AttachFileSize = o.AttachFileSize, AttachFileSize = o.AttachFileSize,
RelativePath = "/Advanced" + o.RelativePath, RelativePath = o.RelativePath,
AttachmentName = o.AttachmentName, AttachmentName = o.AttachmentName,
RemarkSz = o.RemarkSz RemarkSz = o.RemarkSz
}).ToList(); }).ToList();
@ -44,10 +44,10 @@ public class Ghrh_ResumeLicenceServices : BaseServices<Ghrh_ResumeLicence, Ghrh_
var id = await base.Add(listEntity[i]); var id = await base.Add(listEntity[i]);
if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any()) if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any())
{ {
var ids = listEntity[i].AttachmentIDs.Where(x => x.AttachmentID != null).Select(x => x.AttachmentID.Value).ToList(); var ids = listEntity[i].AttachmentIDs.Select(x => x.RelativePath).ToList();
await Db.Updateable<Ghre_Attachment>() await Db.Updateable<Ghrs_Attachment>()
.SetColumns(x => new Ghre_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now }) .SetColumns(x => new Ghrs_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now })
.Where(it => ids.Contains(it.Id)) .Where(it => it.AttachmentID != null && ids.Contains(it.RelativePath))
.ExecuteCommandAsync(); .ExecuteCommandAsync();
} }
result.Add(id); result.Add(id);

@ -9,6 +9,9 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
private readonly IGhrh_ResumeEduBGServices _ghrh_ResumeEduBGServices; private readonly IGhrh_ResumeEduBGServices _ghrh_ResumeEduBGServices;
private readonly IGhrh_ResumeWorkExpServices _ghrh_ResumeWorkExpServices; private readonly IGhrh_ResumeWorkExpServices _ghrh_ResumeWorkExpServices;
private readonly IGhrh_ResumeTagServices _ghrh_ResumeTagServices; private readonly IGhrh_ResumeTagServices _ghrh_ResumeTagServices;
/// <summary>
/// 家庭关系
/// </summary>
private readonly IGhrh_ResumeHomeServices _ghrh_ResumeHomeServices; private readonly IGhrh_ResumeHomeServices _ghrh_ResumeHomeServices;
private readonly IGhrh_ResumeLicenceServices _ghrh_ResumeLicenceServices; private readonly IGhrh_ResumeLicenceServices _ghrh_ResumeLicenceServices;
private readonly IGhrh_ResumeTrainingServices _ghrh_ResumeTrainingServices; private readonly IGhrh_ResumeTrainingServices _ghrh_ResumeTrainingServices;
@ -181,7 +184,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
x.EducationLabel = await GetParaLabel("EducationalBGLevel", x.Education); x.EducationLabel = await GetParaLabel("EducationalBGLevel", x.Education);
x.NationLabel = await GetParaLabel("A02", x.Nation); x.NationLabel = await GetParaLabel("A02", x.Nation);
x.MaritalStatusLabel = await GetParaLabel("A03", x.MaritalStatus); x.MaritalStatusLabel = await GetParaLabel("A03", x.MaritalStatus);
x.PoliticStatusLabel = await GetParaLabel("A04", x.PoliticStatus); x.PoliticStatusLabel = await GetParaLabel("A04", x.PoliticStatus);
x.UrgentRelationLabel = await GetParaLabel("SocialRelationType", x.UrgentRelation); x.UrgentRelationLabel = await GetParaLabel("SocialRelationType", x.UrgentRelation);
x.CertificateTypeLabel = await GetParaLabel("D51", x.CertificateType); x.CertificateTypeLabel = await GetParaLabel("D51", x.CertificateType);
x.RegisteredTypeLabel = await GetParaLabel("A08", x.RegisteredType); x.RegisteredTypeLabel = await GetParaLabel("A08", x.RegisteredType);
@ -358,7 +361,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
id = resume.Id; id = resume.Id;
if (resume.StaffName != input.StaffName) if (resume.StaffName != input.StaffName && resume.ApplicationStatus != "Submit")
await base.Update(id, input, ["StaffName"]); await base.Update(id, input, ["StaffName"]);
obj.ApplicationStatus = resume.ApplicationStatus ?? "Hold"; obj.ApplicationStatus = resume.ApplicationStatus ?? "Hold";
@ -470,6 +473,14 @@ BEGIN
FROM Ghrs_ParaMaster FROM Ghrs_ParaMaster
WHERE ParaMasterId = WHERE ParaMasterId =
pp.DataSource) pp.DataSource)
WHEN pp.DataSourceType =
'CommonList'
THEN
(SELECT 'CommonList_'
+ ListCommonSqlNo
FROM Ghrs_ListCommonSql
WHERE ListCommonSqlId =
pp.DataSource)
ELSE ELSE
NULL NULL
END dataSource, END dataSource,
@ -514,6 +525,14 @@ BEGIN
FROM Ghrs_ParaMaster FROM Ghrs_ParaMaster
WHERE ParaMasterId = WHERE ParaMasterId =
pp.DataSource) pp.DataSource)
WHEN pp.DataSourceType =
'CommonList'
THEN
(SELECT 'CommonList_'
+ ListCommonSqlNo
FROM Ghrs_ListCommonSql
WHERE ListCommonSqlId =
pp.DataSource)
ELSE ELSE
NULL NULL
END dataSource, END dataSource,
@ -532,7 +551,7 @@ BEGIN
AND kk.IsDisplay = 1 AND kk.IsDisplay = 1
AND pp.IsEnable = 1 AND pp.IsEnable = 1
AND kk.IsEnable = 1 AND kk.IsEnable = 1
order by kk.SortNo order by kk.SortNo
FOR JSON PATH, INCLUDE_NULL_VALUES), FOR JSON PATH, INCLUDE_NULL_VALUES),
'') '')
END END
@ -566,6 +585,7 @@ END";
{ {
field = "PhotoUrls", field = "PhotoUrls",
elementType = "FileUpload", elementType = "FileUpload",
label = "照片",
editable = "1" editable = "1"
}); });
} }
@ -611,21 +631,21 @@ END";
columnNames = formColumns.Where(x => x.GroupType == "Family").Select(x => x.ColumnName).ToList(); columnNames = formColumns.Where(x => x.GroupType == "Family").Select(x => x.ColumnName).ToList();
columnNames = columnNames.Distinct().ToList(); columnNames = columnNames.Distinct().ToList();
var familys = await _ghrh_ResumeHomeServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); var familys = await _ghrh_ResumeHomeServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
var family = new List<Dictionary<string, object>>(); var familyDic = new List<Dictionary<string, object>>();
familys.ForEach(x => familys.ForEach(family =>
{ {
var dicts = new Dictionary<string, object>(); var dicts = new Dictionary<string, object>();
columnNames.ForEach(x => columnNames.ForEach(x =>
{ {
var value = entity.GetPropertyValue(x); var value = family.GetPropertyValue(x);
dicts.Add(x, value); dicts.Add(x, value);
}); });
if (columnNames.Any(x => x == "AttachmentIDs")) if (columnNames.Any(x => x == "AttachmentIDs"))
dicts["AttachmentIDs"] = x.AttachmentIDs; dicts["AttachmentIDs"] = family.AttachmentIDs;
family.Add(dicts); familyDic.Add(dicts);
}); });
Data.Family = family; Data.Family = familyDic;
#endregion #endregion
#region 教育背景 #region 教育背景
@ -633,84 +653,84 @@ END";
columnNames = formColumns.Where(x => x.GroupType == "Education").Select(x => x.ColumnName).ToList(); columnNames = formColumns.Where(x => x.GroupType == "Education").Select(x => x.ColumnName).ToList();
columnNames = columnNames.Distinct().ToList(); columnNames = columnNames.Distinct().ToList();
var educations = await _ghrh_ResumeEduBGServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); var educations = await _ghrh_ResumeEduBGServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
var education = new List<Dictionary<string, object>>(); var educationDic = new List<Dictionary<string, object>>();
educations.ForEach(x => educations.ForEach(education =>
{ {
var dicts = new Dictionary<string, object>(); var dicts = new Dictionary<string, object>();
columnNames.ForEach(x => columnNames.ForEach(x =>
{ {
var value = entity.GetPropertyValue(x); var value = education.GetPropertyValue(x);
dicts.Add(x, value); dicts.Add(x, value);
}); });
if (columnNames.Any(x => x == "AttachmentIDs")) if (columnNames.Any(x => x == "AttachmentIDs"))
dicts["AttachmentIDs"] = x.AttachmentIDs; dicts["AttachmentIDs"] = education.AttachmentIDs;
education.Add(dicts); educationDic.Add(dicts);
}); });
Data.Education = education; Data.Education = educationDic;
#endregion #endregion
#region 工作经历 #region 工作经历
columnNames = formColumns.Where(x => x.GroupType == "WorkExp").Select(x => x.ColumnName).ToList(); columnNames = formColumns.Where(x => x.GroupType == "WorkExp").Select(x => x.ColumnName).ToList();
columnNames = columnNames.Distinct().ToList(); columnNames = columnNames.Distinct().ToList();
var workExps = await _ghrh_ResumeWorkExpServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); var workExps = await _ghrh_ResumeWorkExpServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
var workExp = new List<Dictionary<string, object>>(); var workExpDic = new List<Dictionary<string, object>>();
workExps.ForEach(x => workExps.ForEach(workExp =>
{ {
var dicts = new Dictionary<string, object>(); var dicts = new Dictionary<string, object>();
columnNames.ForEach(x => columnNames.ForEach(x =>
{ {
var value = entity.GetPropertyValue(x); var value = workExp.GetPropertyValue(x);
dicts.Add(x, value); dicts.Add(x, value);
}); });
if (columnNames.Any(x => x == "AttachmentIDs")) if (columnNames.Any(x => x == "AttachmentIDs"))
dicts["AttachmentIDs"] = x.AttachmentIDs; dicts["AttachmentIDs"] = workExp.AttachmentIDs;
workExp.Add(dicts); workExpDic.Add(dicts);
}); });
Data.WorkExp = workExp; Data.WorkExp = workExpDic;
#endregion #endregion
#region 证件 #region 证件
columnNames = formColumns.Where(x => x.GroupType == "Licence").Select(x => x.ColumnName).ToList(); columnNames = formColumns.Where(x => x.GroupType == "Licence").Select(x => x.ColumnName).ToList();
columnNames = columnNames.Distinct().ToList(); columnNames = columnNames.Distinct().ToList();
var Licences = await _ghrh_ResumeLicenceServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); var Licences = await _ghrh_ResumeLicenceServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
var Licence = new List<Dictionary<string, object>>(); var licenceDic = new List<Dictionary<string, object>>();
Licences.ForEach(x => Licences.ForEach(licence =>
{ {
var dicts = new Dictionary<string, object>(); var dicts = new Dictionary<string, object>();
columnNames.ForEach(x => columnNames.ForEach(x =>
{ {
var value = entity.GetPropertyValue(x); var value = licence.GetPropertyValue(x);
dicts.Add(x, value); dicts.Add(x, value);
}); });
if (columnNames.Any(x => x == "AttachmentIDs")) if (columnNames.Any(x => x == "AttachmentIDs"))
dicts["AttachmentIDs"] = x.AttachmentIDs; dicts["AttachmentIDs"] = licence.AttachmentIDs;
Licence.Add(dicts); licenceDic.Add(dicts);
}); });
Data.Licence = Licence; Data.Licence = licenceDic;
#endregion #endregion
#region 简历培训记录 #region 简历培训记录
columnNames = formColumns.Where(x => x.GroupType == "Training").Select(x => x.ColumnName).ToList(); columnNames = formColumns.Where(x => x.GroupType == "Training").Select(x => x.ColumnName).ToList();
columnNames = columnNames.Distinct().ToList(); columnNames = columnNames.Distinct().ToList();
var Trainings = await _ghrh_ResumeTrainingServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); var Trainings = await _ghrh_ResumeTrainingServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
var Training = new List<Dictionary<string, object>>(); var trainingDic = new List<Dictionary<string, object>>();
Trainings.ForEach(x => Trainings.ForEach(training =>
{ {
var dicts = new Dictionary<string, object>(); var dicts = new Dictionary<string, object>();
columnNames.ForEach(x => columnNames.ForEach(x =>
{ {
var value = entity.GetPropertyValue(x); var value = training.GetPropertyValue(x);
dicts.Add(x, value); dicts.Add(x, value);
}); });
if (columnNames.Any(x => x == "AttachmentIDs")) if (columnNames.Any(x => x == "AttachmentIDs"))
dicts["AttachmentIDs"] = x.AttachmentIDs; dicts["AttachmentIDs"] = training.AttachmentIDs;
Training.Add(dicts); trainingDic.Add(dicts);
}); });
Data.Training = Training; Data.Training = trainingDic;
#endregion #endregion
Data.Attachment = await Db.Queryable<Ghrs_Attachment>().Where(x => x.TableName == id.ObjToString()).ToListAsync(); Data.Attachment = await Db.Queryable<Ghrs_Attachment>().Where(x => x.TableName == id.ObjToString()).ToListAsync();
@ -1056,7 +1076,7 @@ END";
else if (x.ColumnName == "PoliticStatus") else if (x.ColumnName == "PoliticStatus")
x.ColumnName = "PoliticStatusLabel"; x.ColumnName = "PoliticStatusLabel";
else if (x.ColumnName == "UrgentRelation") else if (x.ColumnName == "UrgentRelation")
x.ColumnName = "UrgentRelationLabel"; x.ColumnName = "UrgentRelationLabel";
else if (x.ColumnName == "CertificateType") else if (x.ColumnName == "CertificateType")
x.ColumnName = "CertificateTypeLabel"; x.ColumnName = "CertificateTypeLabel";
else if (x.ColumnName == "RegisteredType") else if (x.ColumnName == "RegisteredType")

@ -17,7 +17,7 @@ public class Ghrh_ResumeTrainingServices : BaseServices<Ghrh_ResumeTraining, Ghr
{ {
var data = await base.QueryDto(whereExpression); var data = await base.QueryDto(whereExpression);
var ids = data.Select(x => x.Id.ToString()).ToList(); var ids = data.Select(x => x.Id.ToString()).ToList();
var attachments = await Db.Queryable<Ghre_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync(); var attachments = await Db.Queryable<Ghrs_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync();
data.ForEach(x => data.ForEach(x =>
{ {
@ -25,10 +25,10 @@ public class Ghrh_ResumeTrainingServices : BaseServices<Ghrh_ResumeTraining, Ghr
.Where(o => o.TableName == x.Id.ToString()) .Where(o => o.TableName == x.Id.ToString())
.Select(o => new ResumeAttachment() .Select(o => new ResumeAttachment()
{ {
AttachmentID = o.Id, AttachmentID = o.AttachmentID,
AttachFileExtension = o.AttachFileExtension, AttachFileExtension = o.AttachFileExtension,
AttachFileSize = o.AttachFileSize, AttachFileSize = o.AttachFileSize,
RelativePath = "/Advanced" + o.RelativePath, RelativePath = o.RelativePath,
AttachmentName = o.AttachmentName, AttachmentName = o.AttachmentName,
RemarkSz = o.RemarkSz RemarkSz = o.RemarkSz
}).ToList(); }).ToList();
@ -44,10 +44,10 @@ public class Ghrh_ResumeTrainingServices : BaseServices<Ghrh_ResumeTraining, Ghr
var id = await base.Add(listEntity[i]); var id = await base.Add(listEntity[i]);
if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any()) if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any())
{ {
var ids = listEntity[i].AttachmentIDs.Where(x => x.AttachmentID != null).Select(x => x.AttachmentID.Value).ToList(); var ids = listEntity[i].AttachmentIDs.Select(x => x.RelativePath).ToList();
await Db.Updateable<Ghre_Attachment>() await Db.Updateable<Ghrs_Attachment>()
.SetColumns(x => new Ghre_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now }) .SetColumns(x => new Ghrs_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now })
.Where(it => ids.Contains(it.Id)) .Where(it => it.AttachmentID != null && ids.Contains(it.RelativePath))
.ExecuteCommandAsync(); .ExecuteCommandAsync();
} }
result.Add(id); result.Add(id);

@ -17,7 +17,7 @@ public class Ghrh_ResumeWorkExpServices : BaseServices<Ghrh_ResumeWorkExp, Ghrh_
{ {
var data = await base.QueryDto(whereExpression); var data = await base.QueryDto(whereExpression);
var ids = data.Select(x => x.Id.ToString()).ToList(); var ids = data.Select(x => x.Id.ToString()).ToList();
var attachments = await Db.Queryable<Ghre_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync(); var attachments = await Db.Queryable<Ghrs_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync();
data.ForEach(x => data.ForEach(x =>
{ {
@ -25,10 +25,10 @@ public class Ghrh_ResumeWorkExpServices : BaseServices<Ghrh_ResumeWorkExp, Ghrh_
.Where(o => o.TableName == x.Id.ToString()) .Where(o => o.TableName == x.Id.ToString())
.Select(o => new ResumeAttachment() .Select(o => new ResumeAttachment()
{ {
AttachmentID = o.Id, AttachmentID = o.AttachmentID,
AttachFileExtension = o.AttachFileExtension, AttachFileExtension = o.AttachFileExtension,
AttachFileSize = o.AttachFileSize, AttachFileSize = o.AttachFileSize,
RelativePath = "/Advanced" + o.RelativePath, RelativePath = o.RelativePath,
AttachmentName = o.AttachmentName, AttachmentName = o.AttachmentName,
RemarkSz = o.RemarkSz RemarkSz = o.RemarkSz
}).ToList(); }).ToList();
@ -44,10 +44,10 @@ public class Ghrh_ResumeWorkExpServices : BaseServices<Ghrh_ResumeWorkExp, Ghrh_
var id = await base.Add(listEntity[i]); var id = await base.Add(listEntity[i]);
if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any()) if (listEntity[i].AttachmentIDs != null && listEntity[i].AttachmentIDs.Any())
{ {
var ids = listEntity[i].AttachmentIDs.Where(x => x.AttachmentID != null).Select(x => x.AttachmentID.Value).ToList(); var ids = listEntity[i].AttachmentIDs.Select(x => x.RelativePath).ToList();
await Db.Updateable<Ghre_Attachment>() await Db.Updateable<Ghrs_Attachment>()
.SetColumns(x => new Ghre_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now }) .SetColumns(x => new Ghrs_Attachment() { TableName = id.ToString(), UpdateTime = DateTime.Now })
.Where(it => ids.Contains(it.Id)) .Where(it => it.AttachmentID != null && ids.Contains(it.RelativePath))
.ExecuteCommandAsync(); .ExecuteCommandAsync();
} }
result.Add(id); result.Add(id);

@ -271,6 +271,7 @@
获取模块信息接口 获取模块信息接口
</summary> </summary>
<param name="type"></param> <param name="type"></param>
<param name="Keywords"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Tiobon.Core.Controllers.CommonController.ExportExcelAsync(Tiobon.Core.Common.QueryExport)"> <member name="M:Tiobon.Core.Controllers.CommonController.ExportExcelAsync(Tiobon.Core.Common.QueryExport)">
@ -757,6 +758,7 @@
获取通用列表下拉 获取通用列表下拉
</summary> </summary>
<param name="linkId"></param> <param name="linkId"></param>
<param name="KeyWords"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_CourseSceneController"> <member name="T:Tiobon.Core.Api.Controllers.Ghre_CourseSceneController">
@ -955,6 +957,7 @@
获取通用列表下拉 获取通用列表下拉
</summary> </summary>
<param name="linkId"></param> <param name="linkId"></param>
<param name="KeyWords"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_ExamPaperQuestionController"> <member name="T:Tiobon.Core.Api.Controllers.Ghre_ExamPaperQuestionController">
@ -1154,6 +1157,7 @@
<summary> <summary>
记录学习时长 记录学习时长
</summary> </summary>
<param name="insert"></param>
<param name="id"></param> <param name="id"></param>
<returns></returns> <returns></returns>
</member> </member>

Loading…
Cancel
Save