简历数据提交接口优化

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"?>
<?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 -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -35435,10 +35435,10 @@ Ghra_staff_InsureBase
<a:Code>IsGraduate</a:Code>
<a:CreationDate>1729663174</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1729663376</a:ModificationDate>
<a:ModificationDate>1731394264</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier>
<a:Comment>是否毕业</a:Comment>
<a:DataType>int</a:DataType>
<a:DataType>bit</a:DataType>
</o:Column>
<o:Column Id="o1969">
<a:ObjectID>BDF407F4-EA20-4673-A0EC-0C7157EFCDA3</a:ObjectID>

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

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

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

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

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

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

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

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

Loading…
Cancel
Save