diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs
index 0c01efc2..9287663d 100644
--- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs
+++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs
@@ -5,22 +5,37 @@ using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.Api.Controllers;
-[AllowAnonymous, Route("Ghrh_ResumeTemplatePreview/[action]"), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
+[AllowAnonymous, Route("api/Ghrh_ResumeTemplatePreview/[action]"), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)]
public class Ghrh_ResumeTemplatePreviewController : Controller
{
private readonly ISqlSugarClient _db;
private readonly IGhrh_ResumeServices _ghrh_ResumeServices;
private readonly IGhrh_ResumeHomeServices _ghrh_ResumeHomeServices;
+ private readonly IGhrh_ResumeEduBGServices _ghrh_ResumeEduBGServices;
+ private readonly IGhrh_ResumeWorkExpServices _ghrh_ResumeWorkExpServices;
+ private readonly IGhrh_ResumeLicenceServices _ghrh_ResumeLicenceServices;
+ private readonly IGhrh_ResumeTrainingServices _ghrh_ResumeTrainingServices;
+ private readonly IGhrh_ResumeStatementServices _ghrh_ResumeStatementServices;
public Ghrh_ResumeTemplatePreviewController(ISqlSugarClient db,
IGhrh_ResumeServices ghrh_ResumeServices,
+ IGhrh_ResumeEduBGServices ghrh_ResumeEduBGServices,
+ IGhrh_ResumeWorkExpServices ghrh_ResumeWorkExpServices,
+ IGhrh_ResumeLicenceServices ghrh_ResumeLicenceServices,
+ IGhrh_ResumeTrainingServices ghrh_ResumeTrainingServices,
+ IGhrh_ResumeStatementServices ghrh_ResumeStatementServices,
IGhrh_ResumeHomeServices ghrh_ResumeHomeServices)
{
_db = db;
_ghrh_ResumeServices = ghrh_ResumeServices;
_ghrh_ResumeHomeServices = ghrh_ResumeHomeServices;
+ _ghrh_ResumeEduBGServices = ghrh_ResumeEduBGServices;
+ _ghrh_ResumeWorkExpServices = ghrh_ResumeWorkExpServices;
+ _ghrh_ResumeLicenceServices = ghrh_ResumeLicenceServices;
+ _ghrh_ResumeTrainingServices = ghrh_ResumeTrainingServices;
+ _ghrh_ResumeStatementServices = ghrh_ResumeStatementServices;
}
///
/// Index
@@ -198,12 +213,43 @@ END";
if (o.field == "UrgentRelation") o.field = "UrgentRelationLabel";
if (o.field == "CertificateType") o.field = "CertificateTypeLabel";
if (o.field == "RegisteredType") o.field = "RegisteredTypeLabel";
+ if (o.field == "EduDegree") o.field = "EduDegreeLabel";
});
+
+ x.children = x.children.Where(o => o.field != "EduDegreeLabel"
+ && o.field != "GenderLabel"
+ && o.field != "StaffName"
+ && o.field != "ApplyStatusLabel"
+ && o.field != "WorkYears"
+ && o.field != "WorkYears"
+ && o.field != "Age").ToList();
}
if (x.tabKey == "Family")
x.children.ForEach(o =>
{
if (o.field == "Gender") o.field = "GenderLabel";
+ if (o.field == "RelationType") o.field = "RelationTypeLabel";
+ });
+ if (x.tabKey == "Education")
+ x.children.ForEach(o =>
+ {
+ if (o.field == "IsGraduate") o.field = "IsGraduateLabel";
+ if (o.field == "DegreeLevel") o.field = "DegreeLevelLabel";
+ if (o.field == "BeginDate") o.field = "BeginDate1";
+ if (o.field == "EndDate") o.field = "EndDate1";
+ });
+ if (x.tabKey == "WorkExp" || x.tabKey == "Licence")
+ x.children.ForEach(o =>
+ {
+ if (o.field == "BeginDate") o.field = "BeginDate1";
+ if (o.field == "EndDate") o.field = "EndDate1";
+ });
+ if (x.tabKey == "Training")
+ x.children.ForEach(o =>
+ {
+ if (o.field == "BeginDate") o.field = "BeginDate1";
+ if (o.field == "EndDate") o.field = "EndDate1";
+ if (o.field == "IsPass") o.field = "IsPassLabel";
});
}
x.children1 = null;
@@ -218,7 +264,7 @@ END";
var formColumns = await QueryResumeFormColumn(1);
#region Base
- var id = 1856146208591056896;
+ var id = 1851947974159110144;
var entity = await _ghrh_ResumeServices.QueryById(id);
var columnNames = formColumns.Where(x => x.GroupType == "Base").Select(x => x.ColumnName).ToList();
columnNames = columnNames.Distinct().ToList();
@@ -234,12 +280,14 @@ END";
columnNames.Add("UrgentRelationLabel");
columnNames.Add("CertificateTypeLabel");
columnNames.Add("RegisteredTypeLabel");
+ columnNames.Add("EduDegreeLabel");
columnNames.ForEach(x =>
{
var value = entity.GetPropertyValue(x);
dicts.Add(x, value);
});
ViewBag.BaseDic = dicts;
+ ViewBag.entity = entity;
#endregion
#region 家庭关系
@@ -247,7 +295,7 @@ END";
columnNames = formColumns.Where(x => x.GroupType == "Family").Select(x => x.ColumnName).ToList();
columnNames = columnNames.Distinct().ToList();
columnNames.Add("GenderLabel");
- columnNames.Add("GenderLabel");
+ columnNames.Add("RelationTypeLabel");
var familys = await _ghrh_ResumeHomeServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
var familyDic = new List>();
familys.ForEach(family =>
@@ -258,103 +306,103 @@ END";
var value = family.GetPropertyValue(x);
dicts.Add(x, value);
});
- if (columnNames.Any(x => x == "AttachmentIDs"))
- dicts["AttachmentIDs"] = family.AttachmentIDs;
familyDic.Add(dicts);
});
ViewBag.FamilyDic = familyDic;
#endregion
- //#region 教育背景
-
- //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 educationDic = new List>();
- //educations.ForEach(education =>
- //{
- // var dicts = new Dictionary();
- // columnNames.ForEach(x =>
- // {
- // var value = education.GetPropertyValue(x);
- // dicts.Add(x, value);
- // });
- // if (columnNames.Any(x => x == "AttachmentIDs"))
- // dicts["AttachmentIDs"] = education.AttachmentIDs;
- // educationDic.Add(dicts);
- //});
-
- //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 workExpDic = new List>();
- //workExps.ForEach(workExp =>
- //{
- // var dicts = new Dictionary();
- // columnNames.ForEach(x =>
- // {
- // var value = workExp.GetPropertyValue(x);
- // dicts.Add(x, value);
- // });
- // if (columnNames.Any(x => x == "AttachmentIDs"))
- // dicts["AttachmentIDs"] = workExp.AttachmentIDs;
- // workExpDic.Add(dicts);
- //});
-
- //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 licenceDic = new List>();
- //Licences.ForEach(licence =>
- //{
- // var dicts = new Dictionary();
- // columnNames.ForEach(x =>
- // {
- // var value = licence.GetPropertyValue(x);
- // dicts.Add(x, value);
- // });
- // if (columnNames.Any(x => x == "AttachmentIDs"))
- // dicts["AttachmentIDs"] = licence.AttachmentIDs;
- // licenceDic.Add(dicts);
- //});
-
- //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 trainingDic = new List>();
- //Trainings.ForEach(training =>
- //{
- // var dicts = new Dictionary();
- // columnNames.ForEach(x =>
- // {
- // var value = training.GetPropertyValue(x);
- // dicts.Add(x, value);
- // });
- // if (columnNames.Any(x => x == "AttachmentIDs"))
- // dicts["AttachmentIDs"] = training.AttachmentIDs;
- // trainingDic.Add(dicts);
- //});
-
- //Data.Training = trainingDic;
- //#endregion
-
- //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);
+ #region 教育背景
+
+ columnNames = formColumns.Where(x => x.GroupType == "Education").Select(x => x.ColumnName).ToList();
+ columnNames = columnNames.Distinct().ToList();
+ columnNames.Add("IsGraduateLabel");
+ columnNames.Add("DegreeLevelLabel");
+ columnNames.Add("BeginDate1");
+ columnNames.Add("EndDate1");
+ var educations = await _ghrh_ResumeEduBGServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
+ var educationDic = new List>();
+ educations.ForEach(education =>
+ {
+ var dicts = new Dictionary();
+ columnNames.ForEach(x =>
+ {
+ var value = education.GetPropertyValue(x);
+ dicts.Add(x, value);
+ });
+ educationDic.Add(dicts);
+ });
+
+ ViewBag.EducationDic = educationDic;
+ #endregion
+
+ #region 工作经历
+ columnNames = formColumns.Where(x => x.GroupType == "WorkExp").Select(x => x.ColumnName).ToList();
+ columnNames = columnNames.Distinct().ToList();
+ columnNames.Add("BeginDate1");
+ columnNames.Add("EndDate1");
+ var workExps = await _ghrh_ResumeWorkExpServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
+ var workExpDic = new List>();
+ workExps.ForEach(workExp =>
+ {
+ var dicts = new Dictionary();
+ columnNames.ForEach(x =>
+ {
+ var value = workExp.GetPropertyValue(x);
+ dicts.Add(x, value);
+ });
+ workExpDic.Add(dicts);
+ });
+
+ ViewBag.WorkExpDic = workExpDic;
+ #endregion
+
+ #region 证件
+ columnNames = formColumns.Where(x => x.GroupType == "Licence").Select(x => x.ColumnName).ToList();
+ columnNames = columnNames.Distinct().ToList();
+ columnNames.Add("BeginDate1");
+ columnNames.Add("EndDate1");
+ var Licences = await _ghrh_ResumeLicenceServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
+ var licenceDic = new List>();
+ Licences.ForEach(licence =>
+ {
+ var dicts = new Dictionary();
+ columnNames.ForEach(x =>
+ {
+ var value = licence.GetPropertyValue(x);
+ dicts.Add(x, value);
+ });
+ licenceDic.Add(dicts);
+ });
+
+ ViewBag.LicenceDic = licenceDic;
+ #endregion
+
+ #region 简历培训记录
+ columnNames = formColumns.Where(x => x.GroupType == "Training").Select(x => x.ColumnName).ToList();
+ columnNames = columnNames.Distinct().ToList();
+ columnNames.Add("BeginDate1");
+ columnNames.Add("EndDate1");
+ columnNames.Add("IsPassLabel");
+ var Trainings = await _ghrh_ResumeTrainingServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);
+ var trainingDic = new List>();
+ Trainings.ForEach(training =>
+ {
+ var dicts = new Dictionary();
+ columnNames.ForEach(x =>
+ {
+ var value = training.GetPropertyValue(x);
+ dicts.Add(x, value);
+ });
+ trainingDic.Add(dicts);
+ });
+
+ ViewBag.TrainingDic = trainingDic;
+ #endregion
+
+ var statements = await _ghrh_ResumeStatementServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id);//证件
+
+ ViewBag.StatementDic = statements.ToDictionary(person => person.StatementCode, person => person.TrueOrFalse);
#endregion
diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml
index 3fec7bef..487cedd7 100644
--- a/Tiobon.Core.Api/Tiobon.Core.Model.xml
+++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml
@@ -22472,6 +22472,11 @@
渠道
+
+
+ 学历
+
+
标签
@@ -22682,6 +22687,16 @@
修改信息
+
+
+ 生效日
+
+
+
+
+ 失效日
+
+
简历声明(Dto.View1)
@@ -22742,6 +22757,21 @@
修改信息
+
+
+ 开始日期
+
+
+
+
+ 结束日期
+
+
+
+
+ 合格
+
+
工作经历(Dto.View1)
diff --git a/Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml b/Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml
index 04258105..62137407 100644
--- a/Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml
+++ b/Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml
@@ -1,10 +1,16 @@
@using Tiobon.Core.Model.ViewModels.Extend
@{
- ViewData["Title"] = "测试测试";
Layout = "~/Views/Shared/_Layout.cshtml";
List Columns = ViewBag.Columns;
+ Ghrh_ResumeDto entity = ViewBag.entity;
+ ViewData["Title"] = entity.StaffName;
Dictionary BaseDic = ViewBag.BaseDic;
List> FamilyDic = ViewBag.FamilyDic;
+ List> EducationDic = ViewBag.EducationDic;
+ List> WorkExpDic = ViewBag.WorkExpDic;
+ List> LicenceDic = ViewBag.LicenceDic;
+ List> TrainingDic = ViewBag.TrainingDic;
+ Dictionary StatementDic = ViewBag.StatementDic;
}