+ }
}
}
}
@@ -112,153 +328,283 @@
}
else if (item.tabKey == "Education")
{
-
- @{
- if (EducationDic.Count > 0)
- {
-
- @item.tabName
-
- }
- for (var i = 0; i < EducationDic.Count; i++)
+ @if (EducationDic.Count > 0)
+ {
+
+
+
+ @item.tabName
+
+ @for (var j = 0; j < EducationDic.Count; j++)
{
- if (i > 0)
+ @if (j > 0)
{
-
+
}
- if (item.children != null && item.children.Any())
- foreach (var children in item.children)
+ @if (item.children != null && item.children.Any())
+ {
+ for (int i = 0; i < item.children.Count; i = i + 2)
{
-
-
@(children.label):
-
- @{
- if (EducationDic[i].ContainsKey(children.field))
+ if (item.children[i].label == "备注" || ((i + 1) < item.children.Count && item.children[i + 1].label == "备注"))
+ {
+
+
+
@(item.children[i].label):
+ @if (item.children[i].field == "Birth")
+ {
+
+ @DateTimeHelper.ConvertToDayString(EducationDic[j][item.children[i].field])
+
+ }
+ else
{
- @EducationDic[i][children.field]
+
@EducationDic[j][item.children[i].field]
}
+
+
+
+
+ @if ((i + 1) < item.children.Count)
+ {
+
+
@(item.children[i + 1].label):
+ @if (item.children[i + 1].field == "Birth")
+ {
+
+ @DateTimeHelper.ConvertToDayString(EducationDic[j][item.children[i + 1].field])
+
+ }
+ else
+ {
+
@EducationDic[j][item.children[i + 1].field]
+ }
+
}
-
+ }
+ else
+ {
+
+
+
@(item.children[i].label):
+ @if (item.children[i].field == "Birth")
+ {
+
+ @DateTimeHelper.ConvertToDayString(EducationDic[j][item.children[i].field])
+
+ }
+ else
+ {
+
@EducationDic[j][item.children[i].field]
+ }
+
+ @if ((i + 1) < item.children.Count)
+ {
+
+
@(item.children[i + 1].label):
+ @if (item.children[i + 1].field == "Birth")
+ {
+
+ @DateTimeHelper.ConvertToDayString(EducationDic[j][item.children[i + 1].field])
+
+ }
+ else
+ {
+
@EducationDic[j][item.children[i + 1].field]
+ }
+
+ }
+
+ }
}
+ }
}
- }
-
+
+ }
}
else if (item.tabKey == "WorkExp")
{
-
- @{
- if (WorkExpDic.Count > 0)
- {
-
- @item.tabName
-
- }
- for (var i = 0; i < WorkExpDic.Count; i++)
+ @if (WorkExpDic.Count > 0)
+ {
+
+
+ @item.tabName
+
+ @for (var j = 0; j < WorkExpDic.Count; j++)
{
- if (i > 0)
+ @if (j > 0)
{
-
+
}
- if (item.children != null && item.children.Any())
- foreach (var children in item.children)
+ @if (item.children != null && item.children.Any())
+ {
+ for (int i = 0; i < item.children.Count; i = i + 2)
{
-
-
@(children.label):
-
- @{
- if (WorkExpDic[i].ContainsKey(children.field))
- {
- @WorkExpDic[i][children.field]
- }
+ if (item.children[i].label == "备注" || ((i + 1) < item.children.Count && item.children[i + 1].label == "备注"))
+ {
+
+
+
@(item.children[i].label):
+
@WorkExpDic[j][item.children[i].field]
+
+
+ @if ((i + 1) < item.children.Count)
+ {
+
+
+
@(item.children[i + 1].label):
+
@WorkExpDic[j][item.children[i + 1].field]
+
+
+ }
+ }
+ else
+ {
+
+
+
@(item.children[i].label):
+
@WorkExpDic[j][item.children[i].field]
+
+ @if ((i + 1) < item.children.Count)
+ {
+
+
@(item.children[i + 1].label):
+
@WorkExpDic[j][item.children[i + 1].field]
+
}
-
+ }
}
+ }
}
- }
-
-
+
+ }
}
else if (item.tabKey == "Licence")
{
-
- @{
- if (LicenceDic.Count > 0)
- {
-
- @item.tabName
-
- }
- for (var i = 0; i < LicenceDic.Count; i++)
+ @if (LicenceDic.Count > 0)
+ {
+
+
+ @item.tabName
+
+ @for (var j = 0; j < LicenceDic.Count; j++)
{
- if (i > 0)
+ @if (j > 0)
{
-
+
}
- if (item.children != null && item.children.Any())
- foreach (var children in item.children)
+ @if (item.children != null && item.children.Any())
+ {
+ for (int i = 0; i < item.children.Count; i = i + 2)
{
-
-
@(children.label):
-
- @{
- if (LicenceDic[i].ContainsKey(children.field))
- {
- @LicenceDic[i][children.field]
- }
+ if (item.children[i].label == "备注" || ((i + 1) < item.children.Count && item.children[i + 1].label == "备注"))
+ {
+
+
+
@(item.children[i].label):
+
@LicenceDic[j][item.children[i].field]
+
+
+ @if ((i + 1) < item.children.Count)
+ {
+
+
+
@(item.children[i + 1].label):
+
@LicenceDic[j][item.children[i + 1].field]
+
+
+ }
+ }
+ else
+ {
+
+
+
@(item.children[i].label):
+
@LicenceDic[j][item.children[i].field]
+
+ @if ((i + 1) < item.children.Count)
+ {
+
+
@(item.children[i + 1].label):
+
@LicenceDic[j][item.children[i + 1].field]
+
}
-
+ }
}
+ }
}
- }
-
+
+ }
}
else if (item.tabKey == "Training")
{
-
- @{
- if (TrainingDic.Count > 0)
- {
-
- @item.tabName
-
- }
- for (var i = 0; i < TrainingDic.Count; i++)
+ @if (TrainingDic.Count > 0)
+ {
+
+
+ @item.tabName
+
+ @for (var j = 0; j < TrainingDic.Count; j++)
{
- if (i > 0)
+ @if (j > 0)
{
-
+
}
- if (item.children != null && item.children.Any())
- foreach (var children in item.children)
+ @if (item.children != null && item.children.Any())
+ {
+ for (int i = 0; i < item.children.Count; i = i + 2)
{
-
-
@(children.label):
-
- @{
- if (TrainingDic[i].ContainsKey(children.field))
- {
- @TrainingDic[i][children.field]
- }
+ if (item.children[i].label == "培训说明" || ((i + 1) < item.children.Count && item.children[i + 1].label == "培训说明"))
+ {
+
+
+
@(item.children[i].label):
+
@TrainingDic[j][item.children[i].field]
+
+
+
+ @if ((i + 1) < item.children.Count)
+ {
+
+
@(item.children[i + 1].label):
+
@TrainingDic[j][item.children[i + 1].field]
+
}
-
+ }
+ else
+ {
+
+
+
@(item.children[i].label):
+
@TrainingDic[j][item.children[i].field]
+
+ @if ((i + 1) < item.children.Count)
+ {
+
+
@(item.children[i + 1].label):
+
@TrainingDic[j][item.children[i + 1].field]
+
+ }
+
+ }
}
+ }
}
- }
-
+
+ }
}
else if (item.tabKey == "Statement")
{
-
+
+
@{
var ii = 0;
if (item.children != null && item.children.Any())
{
-
+
@item.tabName
}
@@ -266,13 +612,8 @@
if (item.children != null && item.children.Any())
foreach (var children in item.children)
{
-
- // if (ii > 0)
- // {
- //
- // }
-
-
+
+
@(ii + 1). @(children.placeholder): @{
ii++;
@@ -287,11 +628,9 @@
}
-
-
}
-
+
@Html.Raw(ViewBag.StatementRemark)
@@ -301,7 +640,7 @@
}
}
-
+
}
}
diff --git a/Tiobon.Core.Api/wwwroot/css/resume.css b/Tiobon.Core.Api/wwwroot/css/resume.css
index 352958b8..c65238fb 100644
--- a/Tiobon.Core.Api/wwwroot/css/resume.css
+++ b/Tiobon.Core.Api/wwwroot/css/resume.css
@@ -1,109 +1,2 @@
-body {
- 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 {
- background-color: #fff;
- overflow-y: auto;
-}
-
-
-
- .ghr-preview-staff-info .pageContainer .a4page {
- width: 794px;
- /* padding: 40px; */
- box-sizing: border-box;
- /* page-break-after: always; */
- }
-
-.pageContainer .a4page.displayMode {
- margin: 20px auto;
- /* border: 1px #d3d3d3 solid;
- box-shadow: 0 0 5px #0000001a; */
- /* display: flex; */
- flex-wrap: wrap;
-}
-
-.ghr-preview-staff-base-info .staffPhoto {
- width: 100px;
- height: 100px;
- 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 .staffBaseInfo {
- height: 100px;
- 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 .staffEName {
- font-size: 16px;
- color: #5d5d5d;
- }
-
- .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: 10px 0;
- border-left: 2px solid #ff9300;
- padding-left: 15px;
- width: 100%
-}
-
-.ghr-preview-staff-resume-block-item {
- width: 50%;
- display: inline-block;
- vertical-align: top;
- min-height: 25px;
- word-break: break-all;
- line-height: 25px;
- margin: 5px 0;
- flex-flow: row wrap;
-}
-
- .ghr-preview-staff-resume-block-item .label {
- width: 150px;
- display: inline-block;
- vertical-align: top;
- height: 25px;
- line-height: 25px;
- text-align: right;
- }
-
- .ghr-preview-staff-resume-block-item .itemValue {
- display: inline-block;
- vertical-align: top;
- min-height: 25px;
- line-height: 25px;
- }
-
-.page-break-inside {
- page-break-inside: avoid;
-}
diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
index 04c3cec0..b9e31883 100644
--- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
+++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
@@ -1,9 +1,9 @@
-using DinkToPdf;
-using DinkToPdf.Contracts;
-using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Hosting;
using System.IO.Compression;
+using WkHtmlToPdfDotNet;
+using WkHtmlToPdfDotNet.Contracts;
using static Tiobon.Core.Model.Consts;
namespace Tiobon.Core.Services;
@@ -3071,6 +3071,7 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1
#endregion
#region 简历下载
+
public async Task
> Download(List ids)
{
string frontUrl = AppSettings.app(["Startup", "FrontUrl"]);
@@ -3103,15 +3104,15 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1
GlobalSettings = globalSettings,
Objects = { objectSettings }
};
+ string pathHeader = "wwwroot/files/pdf_files";
+ var fileName = entity.StaffName + "_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".pdf";
var fileBytes = _converter.Convert(pdf);
- string pathHeader = "wwwroot/files/pdf_files";
if (!Directory.Exists(pathHeader))
Directory.CreateDirectory(pathHeader);
var ms = new MemoryStream(fileBytes);
var file = new FormFile(ms, 0, ms.Length, Path.GetFileNameWithoutExtension(pathHeader), Path.GetFileName(pathHeader));
- var fileName = entity.StaffName + "_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".pdf";
await using (var fs = System.IO.File.Create(pathHeader + "/" + fileName))
{
await file.CopyToAsync(fs);
diff --git a/Tiobon.Core.Services/Tiobon.Core.Services.csproj b/Tiobon.Core.Services/Tiobon.Core.Services.csproj
index 1c210dda..2863da8a 100644
--- a/Tiobon.Core.Services/Tiobon.Core.Services.csproj
+++ b/Tiobon.Core.Services/Tiobon.Core.Services.csproj
@@ -22,7 +22,7 @@
-
+