diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs index 9287663d..0a55ec17 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs @@ -5,7 +5,7 @@ using Tiobon.Core.Model.ViewModels.Extend; namespace Tiobon.Core.Api.Controllers; -[AllowAnonymous, Route("api/Ghrh_ResumeTemplatePreview/[action]"), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)] +[AllowAnonymous, Route("api/Ghrh_ResumeTemplatePreview"), ApiExplorerSettings(GroupName = Grouping.GroupName_Other)] public class Ghrh_ResumeTemplatePreviewController : Controller { @@ -41,7 +41,8 @@ public class Ghrh_ResumeTemplatePreviewController : Controller /// Index /// /// - public async Task Index() + [Route("{id}")] + public async Task Index(long id) { string sql = @"DECLARE @ID BIGINT = 1 @@ -216,7 +217,7 @@ END"; if (o.field == "EduDegree") o.field = "EduDegreeLabel"; }); - x.children = x.children.Where(o => o.field != "EduDegreeLabel" + x.children = x.children.Where(o => o.field != "EduDegreeLabel" && o.field != "GenderLabel" && o.field != "StaffName" && o.field != "ApplyStatusLabel" @@ -240,7 +241,7 @@ END"; }); 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"; }); @@ -263,8 +264,7 @@ END"; var formColumns = await QueryResumeFormColumn(1); - #region Base - var id = 1851947974159110144; + #region Base var entity = await _ghrh_ResumeServices.QueryById(id); var columnNames = formColumns.Where(x => x.GroupType == "Base").Select(x => x.ColumnName).ToList(); columnNames = columnNames.Distinct().ToList(); @@ -329,7 +329,7 @@ END"; { var value = education.GetPropertyValue(x); dicts.Add(x, value); - }); + }); educationDic.Add(dicts); }); @@ -350,7 +350,7 @@ END"; { var value = workExp.GetPropertyValue(x); dicts.Add(x, value); - }); + }); workExpDic.Add(dicts); }); @@ -371,7 +371,7 @@ END"; { var value = licence.GetPropertyValue(x); dicts.Add(x, value); - }); + }); licenceDic.Add(dicts); }); @@ -393,7 +393,7 @@ END"; { var value = training.GetPropertyValue(x); dicts.Add(x, value); - }); + }); trainingDic.Add(dicts); }); diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 3f902792..68ce038e 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1578,7 +1578,7 @@ - + Index diff --git a/Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml b/Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml index 62137407..d9720d8b 100644 --- a/Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml +++ b/Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml @@ -17,6 +17,7 @@ color: #000000d9; font-size: 14px; font-family: Noto Sans SC, PingFang SC, tahoma, arial, Hiragino Sans GB, Hiragino Sans GB W3, Microsoft Yahei, STHeitiSC-Light, Helvetica-Light, sans-serif !important; + page-break-before: always; } .ghr-preview-staff-info .pageContainer { @@ -28,67 +29,63 @@ .ghr-preview-staff-info .pageContainer .a4page { width: 794px; - padding: 40px; + /* padding: 40px; */ box-sizing: border-box; - page-break-after: always; + /* page-break-after: always; */ } .pageContainer .a4page.displayMode { - margin: 20px auto; + margin: 10px auto; /* border: 1px #d3d3d3 solid; - box-shadow: 0 0 5px #0000001a; */ + box-shadow: 0 0 5px #0000001a; */ display: flex; flex-wrap: wrap; } - .ghr-preview-staff-base-info { - margin-bottom: 30px; + .ghr-preview-staff-base-info .staffPhoto { + width: 100px; + height: 100px; + display: inline-block; + vertical-align: top; + position: relative; } - .ghr-preview-staff-base-info .staffPhoto { - width: 138px; - height: 138px; - display: inline-block; - vertical-align: top; - position: relative; + .ghr-preview-staff-base-info .staffPhoto img { + width: 100%; + height: 100%; + -o-object-fit: contain; + object-fit: contain; } - .ghr-preview-staff-base-info .staffPhoto img { - width: 100%; - height: 100%; - -o-object-fit: contain; - object-fit: contain; - } + .ghr-preview-staff-base-info .staffBaseInfo { + height: 100px; + display: inline-block; + vertical-align: top; + padding-left: 25px; + } - .ghr-preview-staff-base-info .staffBaseInfo { - height: 138px; - display: inline-block; - vertical-align: top; - padding-left: 25px; + .ghr-preview-staff-base-info .staffBaseInfo .staffName { + font-size: 20px; + margin-top: 10px; } - .ghr-preview-staff-base-info .staffBaseInfo .staffName { - font-size: 20px; - margin-top: 10px; - } - - .ghr-preview-staff-base-info .staffBaseInfo .staffEName { - font-size: 16px; - color: #5d5d5d; - } + .ghr-preview-staff-base-info .staffBaseInfo .staffEName { + font-size: 16px; + color: #5d5d5d; + } - .ghr-preview-staff-base-info .staffBaseInfo .staffHumanResourcesMsg { - font-size: 16px; - color: #5d5d5d; - margin-top: 15px; - } + .ghr-preview-staff-base-info .staffBaseInfo .staffHumanResourcesMsg { + font-size: 16px; + color: #5d5d5d; + margin-top: 15px; + } .ghr-preview-staff-resume-title { height: 26px; line-height: 26px; font-size: 18px; color: #242424; - margin: 15px 0; + margin: 10px 0; border-left: 2px solid #ff9300; padding-left: 15px; width: 100% @@ -119,20 +116,27 @@ min-height: 25px; line-height: 25px; } + + .page-break-inside { + page-break-inside: avoid; + }
-
- @if (Columns != null && Columns.Count > 0) + @if (Columns != null && Columns.Count > 0) + { + foreach (var item in Columns) { - foreach (var item in Columns) + if (item.tabKey == "Photo") { - if (item.tabKey == "Photo") - { +
- + @if (!string.IsNullOrEmpty(entity.PhotoUrl)) + { + + }
@(entity.StaffName) 
@@ -140,14 +144,16 @@
经验:@(entity.WorkYears)年工作经验   | 年龄:@(entity.Age)    | 学历: @(entity.EduDegreeLabel)  
- } - else if (item.tabKey == "Base") - { +
+ } + else if (item.tabKey == "Base") + { +
@item.tabName
- if (item.children != null && item.children.Any()) - foreach (var children in item.children) + @if (item.children != null && item.children.Any()) + @foreach (var children in item.children) {
@(children.label):
@@ -164,208 +170,232 @@
} - } - else if (item.tabKey == "Family") +
+ + } + else if (item.tabKey == "Family") + { + @if (FamilyDic.Count > 0) { - if (FamilyDic.Count > 0) - { -
- @item.tabName -
- } - for (var i = 0; i < FamilyDic.Count; i++) - { - if (i > 0) +
+ @if (FamilyDic.Count > 0) { -
+
+ @item.tabName +
} - if (item.children != null && item.children.Any()) - foreach (var children in item.children) + @for (var i = 0; i < FamilyDic.Count; i++) + { + @if (i > 0) { -
-
@(children.label):
-
- @{ - if (FamilyDic[i].ContainsKey(children.field)) - { - if (children.field == "Birth") - @DateTimeHelper.ConvertToDayString(FamilyDic[i][children.field]) - else - @FamilyDic[i][children.field] +
+ } + @if (item.children != null && item.children.Any()) + { + @foreach (var children in item.children) + { +
+
@(children.label):
+
+ @{ + if (FamilyDic[i].ContainsKey(children.field)) + { + if (children.field == "Birth") + @DateTimeHelper.ConvertToDayString(FamilyDic[i][children.field]) + else + @FamilyDic[i][children.field] + } } - } -
-
+
+
+ } } - } - + } +
} - else if (item.tabKey == "Education") - { - if (EducationDic.Count > 0) - { -
- @item.tabName -
- } - for (var i = 0; i < EducationDic.Count; i++) - { - if (i > 0) + } + else if (item.tabKey == "Education") + { +
+ @{ + if (EducationDic.Count > 0) { -
+
+ @item.tabName +
} - if (item.children != null && item.children.Any()) - foreach (var children in item.children) + for (var i = 0; i < EducationDic.Count; i++) + { + if (i > 0) { -
-
@(children.label):
-
- @{ - if (EducationDic[i].ContainsKey(children.field)) - { - @EducationDic[i][children.field] - } - } -
-
+
} + if (item.children != null && item.children.Any()) + foreach (var children in item.children) + { +
+
@(children.label):
+
+ @{ + if (EducationDic[i].ContainsKey(children.field)) + { + @EducationDic[i][children.field] + } + } +
+
+ } + } } - - } - else if (item.tabKey == "WorkExp") - { - if (WorkExpDic.Count > 0) - { -
- @item.tabName -
- } - for (var i = 0; i < WorkExpDic.Count; i++) - { - if (i > 0) +
+ } + else if (item.tabKey == "WorkExp") + { +
+ @{ + if (WorkExpDic.Count > 0) { -
+
+ @item.tabName +
} - if (item.children != null && item.children.Any()) - foreach (var children in item.children) + for (var i = 0; i < WorkExpDic.Count; i++) + { + if (i > 0) { -
-
@(children.label):
-
- @{ - if (WorkExpDic[i].ContainsKey(children.field)) - { - @WorkExpDic[i][children.field] - } - } -
-
+
} + if (item.children != null && item.children.Any()) + foreach (var children in item.children) + { +
+
@(children.label):
+
+ @{ + if (WorkExpDic[i].ContainsKey(children.field)) + { + @WorkExpDic[i][children.field] + } + } +
+
+ } + } } +
- } - else if (item.tabKey == "Licence") - { - if (LicenceDic.Count > 0) - { -
- @item.tabName -
- } - for (var i = 0; i < LicenceDic.Count; i++) - { - if (i > 0) + } + else if (item.tabKey == "Licence") + { +
+ @{ + if (LicenceDic.Count > 0) { -
+
+ @item.tabName +
} - if (item.children != null && item.children.Any()) - foreach (var children in item.children) + for (var i = 0; i < LicenceDic.Count; i++) + { + if (i > 0) { -
-
@(children.label):
-
- @{ - if (LicenceDic[i].ContainsKey(children.field)) - { - @LicenceDic[i][children.field] - } - } -
-
+
} + if (item.children != null && item.children.Any()) + foreach (var children in item.children) + { +
+
@(children.label):
+
+ @{ + if (LicenceDic[i].ContainsKey(children.field)) + { + @LicenceDic[i][children.field] + } + } +
+
+ } + } } - - } - else if (item.tabKey == "Training") - { - if (TrainingDic.Count > 0) - { -
- @item.tabName -
+
+ } + else if (item.tabKey == "Training") + { +
+ @{ + if (TrainingDic.Count > 0) + { +
+ @item.tabName +
+ } + for (var i = 0; i < TrainingDic.Count; i++) + { + if (i > 0) + { +
+ } + if (item.children != null && item.children.Any()) + foreach (var children in item.children) + { +
+
@(children.label):
+
+ @{ + if (TrainingDic[i].ContainsKey(children.field)) + { + @TrainingDic[i][children.field] + } + } +
+
+ } + } } - for (var i = 0; i < TrainingDic.Count; i++) - { - if (i > 0) +
+ } + else if (item.tabKey == "Statement") + { +
+ @{ + var ii = 0; + if (item.children != null && item.children.Any()) { -
+
+ @item.tabName +
} + if (item.children != null && item.children.Any()) foreach (var children in item.children) { -
-
@(children.label):
-
+ + if (ii > 0) + { +
+ } +
+
@(ii + 1). @(children.placeholder):
+
@{ - if (TrainingDic[i].ContainsKey(children.field)) + ii++; + if (StatementDic.ContainsKey("Statement" + ii)) { - @TrainingDic[i][children.field] + if (StatementDic["Statement" + ii] != null) + if (StatementDic["Statement" + ii] == true) + @("是") + else + @("否") } }
} } - - } - else if (item.tabKey == "Statement") - { - var ii = 0; - if (item.children != null && item.children.Any()) - { -
- @item.tabName -
- } - - if (item.children != null && item.children.Any()) - foreach (var children in item.children) - { - - if (ii > 0) - { -
- } -
-
@(children.placeholder):
-
- @{ - ii++; - if (StatementDic.ContainsKey("Statement" + ii)) - { - if (StatementDic["Statement" + ii] != null) - if (StatementDic["Statement" + ii] == true) - @("是") - else - @("否") - } - } -
-
- } - } +
} } -
+ }
\ No newline at end of file diff --git a/Tiobon.Core.Services/BASE/BaseServices.cs b/Tiobon.Core.Services/BASE/BaseServices.cs index e07dab9d..84929c76 100644 --- a/Tiobon.Core.Services/BASE/BaseServices.cs +++ b/Tiobon.Core.Services/BASE/BaseServices.cs @@ -1287,7 +1287,18 @@ public class BaseServices : IBaseServ var list = await _caching.GetAsync>(key); if (list == null || (list != null && !list.Any())) { - string sql = $"SELECT * FROM Ghrs_ParaDetail WHERE ParaMasterNo ='{key}' ORDER BY SortNo ASC"; + string sql = $@"SELECT * +FROM Ghrs_ParaDetail +WHERE ParaMasterId IN (SELECT ParaMasterId + FROM Ghrs_ParaMaster + WHERE ParaMasterNo = '{key}' + AND ParaTypeNo IN ('GhrStaff', + 'GHRPara', + 'Train', + 'Resume', + 'GHRAttend')) + AND IsEnable = 1 +ORDER BY SortNo ASC"; list = DbAccess.QueryList(sql); if (list.Any()) await _caching.SetAsync(key, list); @@ -1303,7 +1314,18 @@ public class BaseServices : IBaseServ var list = await _caching.GetAsync>(key); if (list == null || (list != null && !list.Any())) { - string sql = $"SELECT * FROM Ghrs_ParaDetail WHERE ParaMasterNo ='{key}' ORDER BY SortNo ASC"; + string sql = $@"SELECT * +FROM Ghrs_ParaDetail +WHERE ParaMasterId IN (SELECT ParaMasterId + FROM Ghrs_ParaMaster + WHERE ParaMasterNo = '{key}' + AND ParaTypeNo IN ('GhrStaff', + 'GHRPara', + 'Train', + 'Resume', + 'GHRAttend')) + AND IsEnable = 1 +ORDER BY SortNo ASC"; list = DbAccess.QueryList(sql); if (list.Any()) await _caching.SetAsync(key, list); diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 3fec7bef..487cedd7 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -22472,6 +22472,11 @@ 渠道
+ + + 学历 + + 标签 @@ -22682,6 +22687,16 @@ 修改信息 + + + 生效日 + + + + + 失效日 + + 简历声明(Dto.View1) @@ -22742,6 +22757,21 @@ 修改信息 + + + 开始日期 + + + + + 结束日期 + + + + + 合格 + + 工作经历(Dto.View1)