简历数据提交接口优化

master
xiaochanghai 7 months ago
parent 2517f51c21
commit 8347fc06b3
  1. 6
      Model/Tiobon.Web.pdm
  2. 8
      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. 82
      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>

@ -14,11 +14,8 @@
* SimonHsiao
*
*/
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Tiobon.Core.Model.Models;
namespace Tiobon.Core.Model.Models
{
/// <summary>
/// 教育背景 (Dto.Base)
@ -62,7 +59,7 @@ namespace Tiobon.Core.Model.Models
/// <summary>
/// 是否毕业
/// </summary>
public int? IsGraduate { get; set; }
public bool? IsGraduate { get; set; }
/// <summary>
/// 备注
@ -145,4 +142,3 @@ namespace Tiobon.Core.Model.Models
/// </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;
@ -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,
@ -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();

@ -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