|
|
|
@ -1,15 +1,18 @@ |
|
|
|
|
|
|
|
|
|
using AgileObjects.AgileMapper; |
|
|
|
|
using AgileObjects.AgileMapper.Extensions; |
|
|
|
|
using DnsClient; |
|
|
|
|
using MathNet.Numerics.Distributions; |
|
|
|
|
using Microsoft.IdentityModel.Tokens; |
|
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
|
using Org.BouncyCastle.Utilities; |
|
|
|
|
using SqlSugar; |
|
|
|
|
using System.Dynamic; |
|
|
|
|
using Tiobon.Core.Common; |
|
|
|
|
using Tiobon.Core.Common.Caches; |
|
|
|
|
using Tiobon.Core.Common.DB.Dapper.Extensions; |
|
|
|
|
using Tiobon.Core.Common.Helper; |
|
|
|
|
using Tiobon.Core.DataAccess; |
|
|
|
|
using Tiobon.Core.IRepository.Base; |
|
|
|
|
using Tiobon.Core.IServices; |
|
|
|
|
using Tiobon.Core.Model; |
|
|
|
@ -200,8 +203,10 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
|
x.EducationLabel = await GetParaLabel("EducationalBGLevel", x.Education); |
|
|
|
|
x.NationLabel = await GetParaLabel("A02", x.Nation); |
|
|
|
|
x.MaritalStatusLabel = await GetParaLabel("A03", x.MaritalStatus); |
|
|
|
|
x.PoliticStatusLabel = await GetParaLabel("A04", x.PoliticStatus); |
|
|
|
|
x.PoliticStatusLabel = await GetParaLabel("A04", x.PoliticStatus); |
|
|
|
|
x.UrgentRelationLabel = await GetParaLabel("SocialRelationType", x.UrgentRelation); |
|
|
|
|
x.CertificateTypeLabel = await GetParaLabel("D51", x.CertificateType); |
|
|
|
|
x.RegisteredTypeLabel = await GetParaLabel("A08", x.RegisteredType); |
|
|
|
|
|
|
|
|
|
x.EduBG = eduBGs.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
|
x.WorkExp = workExps.Where(o => x.Id == o.ResumeId).ToList(); |
|
|
|
@ -774,7 +779,7 @@ END"; |
|
|
|
|
{ |
|
|
|
|
var sql = @$"DECLARE @ResumeTemplateID BIGINT = {resumeTemplateID}
|
|
|
|
|
|
|
|
|
|
SELECT A.ColumnName, D.GroupType |
|
|
|
|
SELECT A.ColumnName, A.ResumeInfoColumnName ColumnNameDesc, D.GroupType |
|
|
|
|
FROM Ghrh_ResumeInfoColumn A |
|
|
|
|
LEFT JOIN Ghrh_ResumeTemplateInfoGroupColumn B |
|
|
|
|
ON B.ResumeInfoColumnID = A.ID |
|
|
|
@ -1047,4 +1052,54 @@ END"; |
|
|
|
|
return ServiceResult<dynamic>.OprateSuccess("查询成功", Data); |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
#region 导出Excel |
|
|
|
|
public async Task<ServiceResult<string>> Export(QueryBody filter, string condition, bool? IsEnable = true) |
|
|
|
|
{ |
|
|
|
|
filter.pageNum = 1; |
|
|
|
|
filter.pageSize = 100000; |
|
|
|
|
var data = await QueryFilterPage(filter, condition, IsEnable); |
|
|
|
|
var formColumns = await QueryResumeFormColumn(1); |
|
|
|
|
|
|
|
|
|
formColumns.ForEach(x => |
|
|
|
|
{ |
|
|
|
|
if (x.GroupType == "Base") |
|
|
|
|
{ |
|
|
|
|
if (x.ColumnName == "TitleId") |
|
|
|
|
x.ColumnName = "TitleName"; |
|
|
|
|
else if (x.ColumnName == "Gender") |
|
|
|
|
x.ColumnName = "GenderLabel"; |
|
|
|
|
else if (x.ColumnName == "Education") |
|
|
|
|
x.ColumnName = "EducationLabel"; |
|
|
|
|
else if (x.ColumnName == "Nation") |
|
|
|
|
x.ColumnName = "NationLabel"; |
|
|
|
|
else if (x.ColumnName == "MaritalStatus") |
|
|
|
|
x.ColumnName = "MaritalStatusLabel"; |
|
|
|
|
else if (x.ColumnName == "PoliticStatus") |
|
|
|
|
x.ColumnName = "PoliticStatusLabel"; |
|
|
|
|
else if (x.ColumnName == "UrgentRelation") |
|
|
|
|
x.ColumnName = "UrgentRelationLabel"; |
|
|
|
|
else if (x.ColumnName == "CertificateType") |
|
|
|
|
x.ColumnName = "CertificateTypeLabel"; |
|
|
|
|
else if (x.ColumnName == "RegisteredType") |
|
|
|
|
x.ColumnName = "RegisteredTypeLabel"; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
var menuName = string.Empty; |
|
|
|
|
string sql = "select QueryProcedure, EditProcedure, IUDProcedure, MenuName from Ghrs_Menu where MenuNo='{0}'"; |
|
|
|
|
sql = string.Format(sql, filter.menuName); |
|
|
|
|
var dt = await Db.Ado.GetDataTableAsync(sql); |
|
|
|
|
if (dt.Rows.Count > 0) |
|
|
|
|
{ |
|
|
|
|
menuName = dt.Rows[0]["MenuName"].ToString(); |
|
|
|
|
} |
|
|
|
|
var dic = formColumns.Where(x => x.GroupType == "Base").ToDictionary(item => item.ColumnNameDesc, item => item.ColumnName); |
|
|
|
|
|
|
|
|
|
var name = menuName + "_" + DateTimeHelper.ConvertToSecondString1(DateTime.Now); |
|
|
|
|
var physicsPath1 = await ReportHelper.SendFile(data.result.DT_TableDataT1.AsQueryable(), name, null, dic, null, null, menuName); |
|
|
|
|
var result = ServiceResult<string>.OprateSuccess(name + ".xlsx", physicsPath1); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
#endregion |
|
|
|
|
} |