纯html画简历表

master
xiaochanghai 7 months ago
parent 3111debb7a
commit 408ff314d5
  1. 6
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs
  2. 2
      Tiobon.Core.Api/Tiobon.Core.xml
  3. 84
      Tiobon.Core.Api/Views/Ghrh_ResumeTemplatePreview/Index.cshtml
  4. 26
      Tiobon.Core.Services/BASE/BaseServices.cs
  5. 30
      Tiobon.Core/Tiobon.Core.Model.xml

@ -5,7 +5,7 @@ using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.Api.Controllers; 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 public class Ghrh_ResumeTemplatePreviewController : Controller
{ {
@ -41,7 +41,8 @@ public class Ghrh_ResumeTemplatePreviewController : Controller
/// Index /// Index
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public async Task<IActionResult> Index() [Route("{id}")]
public async Task<IActionResult> Index(long id)
{ {
string sql = @"DECLARE @ID BIGINT = 1 string sql = @"DECLARE @ID BIGINT = 1
@ -264,7 +265,6 @@ END";
var formColumns = await QueryResumeFormColumn(1); var formColumns = await QueryResumeFormColumn(1);
#region Base #region Base
var id = 1851947974159110144;
var entity = await _ghrh_ResumeServices.QueryById(id); var entity = await _ghrh_ResumeServices.QueryById(id);
var columnNames = formColumns.Where(x => x.GroupType == "Base").Select(x => x.ColumnName).ToList(); var columnNames = formColumns.Where(x => x.GroupType == "Base").Select(x => x.ColumnName).ToList();
columnNames = columnNames.Distinct().ToList(); columnNames = columnNames.Distinct().ToList();

@ -1578,7 +1578,7 @@
<param name="filter"></param> <param name="filter"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeTemplatePreviewController.Index"> <member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeTemplatePreviewController.Index(System.Int64)">
<summary> <summary>
Index Index
</summary> </summary>

@ -17,6 +17,7 @@
color: #000000d9; color: #000000d9;
font-size: 14px; 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; 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 { .ghr-preview-staff-info .pageContainer {
@ -28,26 +29,22 @@
.ghr-preview-staff-info .pageContainer .a4page { .ghr-preview-staff-info .pageContainer .a4page {
width: 794px; width: 794px;
padding: 40px; /* padding: 40px; */
box-sizing: border-box; box-sizing: border-box;
page-break-after: always; /* page-break-after: always; */
} }
.pageContainer .a4page.displayMode { .pageContainer .a4page.displayMode {
margin: 20px auto; margin: 10px auto;
/* border: 1px #d3d3d3 solid; /* border: 1px #d3d3d3 solid;
box-shadow: 0 0 5px #0000001a; */ box-shadow: 0 0 5px #0000001a; */
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.ghr-preview-staff-base-info {
margin-bottom: 30px;
}
.ghr-preview-staff-base-info .staffPhoto { .ghr-preview-staff-base-info .staffPhoto {
width: 138px; width: 100px;
height: 138px; height: 100px;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
position: relative; position: relative;
@ -61,7 +58,7 @@
} }
.ghr-preview-staff-base-info .staffBaseInfo { .ghr-preview-staff-base-info .staffBaseInfo {
height: 138px; height: 100px;
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
padding-left: 25px; padding-left: 25px;
@ -88,7 +85,7 @@
line-height: 26px; line-height: 26px;
font-size: 18px; font-size: 18px;
color: #242424; color: #242424;
margin: 15px 0; margin: 10px 0;
border-left: 2px solid #ff9300; border-left: 2px solid #ff9300;
padding-left: 15px; padding-left: 15px;
width: 100% width: 100%
@ -119,10 +116,13 @@
min-height: 25px; min-height: 25px;
line-height: 25px; line-height: 25px;
} }
.page-break-inside {
page-break-inside: avoid;
}
</style> </style>
<div class="ghr-preview-staff-info"> <div class="ghr-preview-staff-info">
<div class="pageContainer"> <div class="pageContainer">
<div class="a4page displayMode" id="pageIndex-0">
@if (Columns != null && Columns.Count > 0) @if (Columns != null && Columns.Count > 0)
{ {
@ -130,9 +130,13 @@
{ {
if (item.tabKey == "Photo") if (item.tabKey == "Photo")
{ {
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
<main class="ghr-preview-staff-base-info" id="info"> <main class="ghr-preview-staff-base-info" id="info">
<div class="staffPhoto"> <div class="staffPhoto">
@if (!string.IsNullOrEmpty(entity.PhotoUrl))
{
<img src="http://g.tiobon.com/@(entity.PhotoUrl)" alt=""> <img src="http://g.tiobon.com/@(entity.PhotoUrl)" alt="">
}
</div> </div>
<div class="staffBaseInfo"> <div class="staffBaseInfo">
<div class="staffName">@(entity.StaffName)&nbsp;</div> <div class="staffName">@(entity.StaffName)&nbsp;</div>
@ -140,14 +144,16 @@
<div class="staffHumanResourcesMsg">经验:@(entity.WorkYears)年工作经验&nbsp; <span><span>|</span><span>年龄:@(entity.Age)</span> &nbsp; </span><span><span>|</span><span>学历: @(entity.EduDegreeLabel)</span> &nbsp; </span></div> <div class="staffHumanResourcesMsg">经验:@(entity.WorkYears)年工作经验&nbsp; <span><span>|</span><span>年龄:@(entity.Age)</span> &nbsp; </span><span><span>|</span><span>学历: @(entity.EduDegreeLabel)</span> &nbsp; </span></div>
</div> </div>
</main> </main>
</div>
} }
else if (item.tabKey == "Base") else if (item.tabKey == "Base")
{ {
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
<main class="ghr-preview-staff-resume-title" id="Base"> <main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName @item.tabName
</main> </main>
if (item.children != null && item.children.Any()) @if (item.children != null && item.children.Any())
foreach (var children in item.children) @foreach (var children in item.children)
{ {
<main class="ghr-preview-staff-resume-block-item" id="Base-0-StaffName" style="width:@(children.label=="备注"?"100%": "50%")"> <main class="ghr-preview-staff-resume-block-item" id="Base-0-StaffName" style="width:@(children.label=="备注"?"100%": "50%")">
<div class="label">@(children.label):</div> <div class="label">@(children.label):</div>
@ -164,23 +170,29 @@
</div> </div>
</main> </main>
} }
</div>
} }
else if (item.tabKey == "Family") else if (item.tabKey == "Family")
{ {
if (FamilyDic.Count > 0) @if (FamilyDic.Count > 0)
{
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@if (FamilyDic.Count > 0)
{ {
<main class="ghr-preview-staff-resume-title" id="Base"> <main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName @item.tabName
</main> </main>
} }
for (var i = 0; i < FamilyDic.Count; i++) @for (var i = 0; i < FamilyDic.Count; i++)
{ {
if (i > 0) @if (i > 0)
{ {
<div style="margin-top:20px;width:100%"></div> <div style="margin-top:20px;width:100%"></div>
} }
if (item.children != null && item.children.Any()) @if (item.children != null && item.children.Any())
foreach (var children in item.children) {
@foreach (var children in item.children)
{ {
<main class="ghr-preview-staff-resume-block-item" id="Base-0-StaffName" style="width:@(children.label=="备注"?"100%": "50%")"> <main class="ghr-preview-staff-resume-block-item" id="Base-0-StaffName" style="width:@(children.label=="备注"?"100%": "50%")">
<div class="label">@(children.label):</div> <div class="label">@(children.label):</div>
@ -198,10 +210,14 @@
</main> </main>
} }
} }
}
</div>
}
} }
else if (item.tabKey == "Education") else if (item.tabKey == "Education")
{ {
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
if (EducationDic.Count > 0) if (EducationDic.Count > 0)
{ {
<main class="ghr-preview-staff-resume-title" id="Base"> <main class="ghr-preview-staff-resume-title" id="Base">
@ -230,10 +246,13 @@
</main> </main>
} }
} }
}
</div>
} }
else if (item.tabKey == "WorkExp") else if (item.tabKey == "WorkExp")
{ {
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
if (WorkExpDic.Count > 0) if (WorkExpDic.Count > 0)
{ {
<main class="ghr-preview-staff-resume-title" id="Base"> <main class="ghr-preview-staff-resume-title" id="Base">
@ -262,10 +281,14 @@
</main> </main>
} }
} }
}
</div>
} }
else if (item.tabKey == "Licence") else if (item.tabKey == "Licence")
{ {
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
if (LicenceDic.Count > 0) if (LicenceDic.Count > 0)
{ {
<main class="ghr-preview-staff-resume-title" id="Base"> <main class="ghr-preview-staff-resume-title" id="Base">
@ -294,10 +317,13 @@
</main> </main>
} }
} }
}
</div>
} }
else if (item.tabKey == "Training") else if (item.tabKey == "Training")
{ {
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
if (TrainingDic.Count > 0) if (TrainingDic.Count > 0)
{ {
<main class="ghr-preview-staff-resume-title" id="Base"> <main class="ghr-preview-staff-resume-title" id="Base">
@ -326,10 +352,13 @@
</main> </main>
} }
} }
}
</div>
} }
else if (item.tabKey == "Statement") else if (item.tabKey == "Statement")
{ {
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
var ii = 0; var ii = 0;
if (item.children != null && item.children.Any()) if (item.children != null && item.children.Any())
{ {
@ -346,9 +375,9 @@
{ {
<div style="margin-top:20px;width:100%"></div> <div style="margin-top:20px;width:100%"></div>
} }
<main class="ghr-preview-staff-resume-block-item" id="Base-0-StaffName" style="width:100%;display: flex;"> <main class="ghr-preview-staff-resume-block-item" id="Base-0-StaffName" style="display: flex;width:80%">
<div class="itemValue" style="width: 100%;">@(children.placeholder):</div> <div class="itemValue" style="width:80%">@(ii + 1).&nbsp;@(children.placeholder):</div>
<div class="label"> <div class="label" style="width:20%">
@{ @{
ii++; ii++;
if (StatementDic.ContainsKey("Statement" + ii)) if (StatementDic.ContainsKey("Statement" + ii))
@ -364,8 +393,9 @@
</main> </main>
} }
} }
</div>
}
} }
} }
</div> </div>
</div>
</div> </div>

@ -1287,7 +1287,18 @@ public class BaseServices<TEntity, TEntityDto, TInsertDto, TEditDto> : IBaseServ
var list = await _caching.GetAsync<List<Ghrs_ParaDetail>>(key); var list = await _caching.GetAsync<List<Ghrs_ParaDetail>>(key);
if (list == null || (list != null && !list.Any())) 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<Ghrs_ParaDetail>(sql); list = DbAccess.QueryList<Ghrs_ParaDetail>(sql);
if (list.Any()) if (list.Any())
await _caching.SetAsync(key, list); await _caching.SetAsync(key, list);
@ -1303,7 +1314,18 @@ public class BaseServices<TEntity, TEntityDto, TInsertDto, TEditDto> : IBaseServ
var list = await _caching.GetAsync<List<Ghrs_ParaDetail>>(key); var list = await _caching.GetAsync<List<Ghrs_ParaDetail>>(key);
if (list == null || (list != null && !list.Any())) 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<Ghrs_ParaDetail>(sql); list = DbAccess.QueryList<Ghrs_ParaDetail>(sql);
if (list.Any()) if (list.Any())
await _caching.SetAsync(key, list); await _caching.SetAsync(key, list);

@ -22472,6 +22472,11 @@
渠道 渠道
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeDto.EduDegreeLabel">
<summary>
学历
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeDto.TagList"> <member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeDto.TagList">
<summary> <summary>
标签 标签
@ -22682,6 +22687,16 @@
修改信息 修改信息
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeLicenceDto.BeginDate1">
<summary>
生效日
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeLicenceDto.EndDate1">
<summary>
失效日
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghrh_ResumeStatementDto"> <member name="T:Tiobon.Core.Model.Models.Ghrh_ResumeStatementDto">
<summary> <summary>
简历声明(Dto.View1) 简历声明(Dto.View1)
@ -22742,6 +22757,21 @@
修改信息 修改信息
</summary> </summary>
</member> </member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeTrainingDto.BeginDate1">
<summary>
开始日期
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeTrainingDto.EndDate1">
<summary>
结束日期
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeTrainingDto.IsPassLabel">
<summary>
合格
</summary>
</member>
<member name="T:Tiobon.Core.Model.Models.Ghrh_ResumeWorkExpDto"> <member name="T:Tiobon.Core.Model.Models.Ghrh_ResumeWorkExpDto">
<summary> <summary>
工作经历(Dto.View1) 工作经历(Dto.View1)

Loading…
Cancel
Save