纯html画简历表

master
xiaochanghai 7 months ago
parent 3111debb7a
commit 408ff314d5
  1. 20
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeTemplatePreviewController.cs
  2. 2
      Tiobon.Core.Api/Tiobon.Core.xml
  3. 456
      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;
[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
/// </summary>
/// <returns></returns>
public async Task<IActionResult> Index()
[Route("{id}")]
public async Task<IActionResult> 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);
});

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

@ -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;
}
</style>
<div class="ghr-preview-staff-info">
<div class="pageContainer">
<div class="a4page displayMode" id="pageIndex-0">
@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")
{
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
<main class="ghr-preview-staff-base-info" id="info">
<div class="staffPhoto">
<img src="http://g.tiobon.com/@(entity.PhotoUrl)" alt="">
@if (!string.IsNullOrEmpty(entity.PhotoUrl))
{
<img src="http://g.tiobon.com/@(entity.PhotoUrl)" alt="">
}
</div>
<div class="staffBaseInfo">
<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>
</main>
}
else if (item.tabKey == "Base")
{
</div>
}
else if (item.tabKey == "Base")
{
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
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)
{
<main class="ghr-preview-staff-resume-block-item" id="Base-0-StaffName" style="width:@(children.label=="备注"?"100%": "50%")">
<div class="label">@(children.label):</div>
@ -164,208 +170,232 @@
</div>
</main>
}
}
else if (item.tabKey == "Family")
</div>
}
else if (item.tabKey == "Family")
{
@if (FamilyDic.Count > 0)
{
if (FamilyDic.Count > 0)
{
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
for (var i = 0; i < FamilyDic.Count; i++)
{
if (i > 0)
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@if (FamilyDic.Count > 0)
{
<div style="margin-top:20px;width:100%"></div>
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
@for (var i = 0; i < FamilyDic.Count; i++)
{
@if (i > 0)
{
<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="itemValue">
@{
if (FamilyDic[i].ContainsKey(children.field))
{
if (children.field == "Birth")
@DateTimeHelper.ConvertToDayString(FamilyDic[i][children.field])
else
@FamilyDic[i][children.field]
<div style="margin-top:20px;width:100%"></div>
}
@if (item.children != null && item.children.Any())
{
@foreach (var children in item.children)
{
<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="itemValue">
@{
if (FamilyDic[i].ContainsKey(children.field))
{
if (children.field == "Birth")
@DateTimeHelper.ConvertToDayString(FamilyDic[i][children.field])
else
@FamilyDic[i][children.field]
}
}
}
</div>
</main>
</div>
</main>
}
}
}
}
</div>
}
else if (item.tabKey == "Education")
{
if (EducationDic.Count > 0)
{
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
for (var i = 0; i < EducationDic.Count; i++)
{
if (i > 0)
}
else if (item.tabKey == "Education")
{
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
if (EducationDic.Count > 0)
{
<div style="margin-top:20px;width:100%"></div>
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
for (var i = 0; i < EducationDic.Count; i++)
{
if (i > 0)
{
<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="itemValue">
@{
if (EducationDic[i].ContainsKey(children.field))
{
@EducationDic[i][children.field]
}
}
</div>
</main>
<div style="margin-top:20px;width:100%"></div>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
{
<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="itemValue">
@{
if (EducationDic[i].ContainsKey(children.field))
{
@EducationDic[i][children.field]
}
}
</div>
</main>
}
}
}
}
else if (item.tabKey == "WorkExp")
{
if (WorkExpDic.Count > 0)
{
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
for (var i = 0; i < WorkExpDic.Count; i++)
{
if (i > 0)
</div>
}
else if (item.tabKey == "WorkExp")
{
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
if (WorkExpDic.Count > 0)
{
<div style="margin-top:20px;width:100%"></div>
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
for (var i = 0; i < WorkExpDic.Count; i++)
{
if (i > 0)
{
<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="itemValue">
@{
if (WorkExpDic[i].ContainsKey(children.field))
{
@WorkExpDic[i][children.field]
}
}
</div>
</main>
<div style="margin-top:20px;width:100%"></div>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
{
<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="itemValue">
@{
if (WorkExpDic[i].ContainsKey(children.field))
{
@WorkExpDic[i][children.field]
}
}
</div>
</main>
}
}
}
</div>
}
else if (item.tabKey == "Licence")
{
if (LicenceDic.Count > 0)
{
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
for (var i = 0; i < LicenceDic.Count; i++)
{
if (i > 0)
}
else if (item.tabKey == "Licence")
{
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
if (LicenceDic.Count > 0)
{
<div style="margin-top:20px;width:100%"></div>
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
for (var i = 0; i < LicenceDic.Count; i++)
{
if (i > 0)
{
<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="itemValue">
@{
if (LicenceDic[i].ContainsKey(children.field))
{
@LicenceDic[i][children.field]
}
}
</div>
</main>
<div style="margin-top:20px;width:100%"></div>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
{
<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="itemValue">
@{
if (LicenceDic[i].ContainsKey(children.field))
{
@LicenceDic[i][children.field]
}
}
</div>
</main>
}
}
}
}
else if (item.tabKey == "Training")
{
if (TrainingDic.Count > 0)
{
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
</div>
}
else if (item.tabKey == "Training")
{
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
if (TrainingDic.Count > 0)
{
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
for (var i = 0; i < TrainingDic.Count; i++)
{
if (i > 0)
{
<div style="margin-top:20px;width:100%"></div>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
{
<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="itemValue">
@{
if (TrainingDic[i].ContainsKey(children.field))
{
@TrainingDic[i][children.field]
}
}
</div>
</main>
}
}
}
for (var i = 0; i < TrainingDic.Count; i++)
{
if (i > 0)
</div>
}
else if (item.tabKey == "Statement")
{
<div class="a4page displayMode page-break-inside" id="pageIndex-0">
@{
var ii = 0;
if (item.children != null && item.children.Any())
{
<div style="margin-top:20px;width:100%"></div>
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
{
<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="itemValue">
if (ii > 0)
{
<div style="margin-top:20px;width:100%"></div>
}
<main class="ghr-preview-staff-resume-block-item" id="Base-0-StaffName" style="display: flex;width:80%">
<div class="itemValue" style="width:80%">@(ii + 1).&nbsp;@(children.placeholder):</div>
<div class="label" style="width:20%">
@{
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
@("否")
}
}
</div>
</main>
}
}
}
else if (item.tabKey == "Statement")
{
var ii = 0;
if (item.children != null && item.children.Any())
{
<main class="ghr-preview-staff-resume-title" id="Base">
@item.tabName
</main>
}
if (item.children != null && item.children.Any())
foreach (var children in item.children)
{
if (ii > 0)
{
<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;">
<div class="itemValue" style="width: 100%;">@(children.placeholder):</div>
<div class="label">
@{
ii++;
if (StatementDic.ContainsKey("Statement" + ii))
{
if (StatementDic["Statement" + ii] != null)
if (StatementDic["Statement" + ii] == true)
@("是")
else
@("否")
}
}
</div>
</main>
}
}
</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);
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);
if (list.Any())
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);
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);
if (list.Any())
await _caching.SetAsync(key, list);

@ -22472,6 +22472,11 @@
渠道
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeDto.EduDegreeLabel">
<summary>
学历
</summary>
</member>
<member name="P:Tiobon.Core.Model.Models.Ghrh_ResumeDto.TagList">
<summary>
标签
@ -22682,6 +22687,16 @@
修改信息
</summary>
</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">
<summary>
简历声明(Dto.View1)
@ -22742,6 +22757,21 @@
修改信息
</summary>
</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">
<summary>
工作经历(Dto.View1)

Loading…
Cancel
Save