|
|
|
@ -1,4 +1,5 @@ |
|
|
|
|
using DinkToPdf; |
|
|
|
|
using Amazon.Runtime.Internal.Transform; |
|
|
|
|
using DinkToPdf; |
|
|
|
|
using DinkToPdf.Contracts; |
|
|
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
@ -469,19 +470,71 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins |
|
|
|
|
#region 获取查询条件 |
|
|
|
|
public async Task<ServiceResult<List<ResumeCondition>>> QueryConditions() |
|
|
|
|
{ |
|
|
|
|
string str = "[\r\n\t{\r\n\t\t\"Key\": \"Education\",\r\n\t\t\"Name\": \"学历要求\",\r\n\t\t\"ParaMasterNo\": \"EducationalBGLevel\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"WorkYears\",\r\n\t\t\"Name\": \"经验要求\",\r\n\t\t\"ParaMasterNo\": \"ResumeWorkYears\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Age\",\r\n\t\t\"Name\": \"年龄要求\",\r\n\t\t\"ParaMasterNo\": \"AgePeriodSetup\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Gender\",\r\n\t\t\"Name\": \"性 别\",\r\n\t\t\"ParaMasterNo\": \"Gender\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"SalaryPeriod\",\r\n\t\t\"Name\": \"薪资区间\",\r\n\t\t\"ParaMasterNo\": \"SalaryPeriodSetup\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"ApplyStatus\",\r\n\t\t\"Name\": \"求职状态\",\r\n\t\t\"ParaMasterNo\": \"ResumeApplyStatus\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Tags\",\r\n\t\t\"Name\": \"标签\",\r\n\t\t\"ParaMasterNo\": \"ResumeTag\"\r\n\t}\r\n]"; |
|
|
|
|
var tabs = JsonHelper.JsonToObj<List<ResumeCondition>>(str); |
|
|
|
|
|
|
|
|
|
tabs.ForEach(async x => |
|
|
|
|
var sql = @"SELECT A.TableName,
|
|
|
|
|
A.ColumnName 'Key', |
|
|
|
|
A.ResumeInfoColumnNo, |
|
|
|
|
A.ResumeInfoColumnName 'Name', |
|
|
|
|
A.DataSource, |
|
|
|
|
A.DataSourceType, |
|
|
|
|
A.DataType, |
|
|
|
|
A.ColumnType, |
|
|
|
|
B.ParaMasterNo |
|
|
|
|
FROM Ghrh_ResumeInfoColumn A |
|
|
|
|
LEFT JOIN Ghrs_ParaMaster B ON A.DataSource = B.ParaMasterId |
|
|
|
|
WHERE ResumeInfoGroupId IN (SELECT Id |
|
|
|
|
FROM Ghrh_ResumeInfoGroup |
|
|
|
|
WHERE GroupType = 'Base') |
|
|
|
|
AND A.QueryCondition = 1 |
|
|
|
|
ORDER BY A.SortNo ASC";
|
|
|
|
|
|
|
|
|
|
var tabs = await Db.Ado.SqlQueryAsync<ResumeCondition>(sql); |
|
|
|
|
//string str = "[\r\n\t{\r\n\t\t\"Key\": \"Education\",\r\n\t\t\"Name\": \"学历要求\",\r\n\t\t\"ParaMasterNo\": \"EducationalBGLevel\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"WorkYears\",\r\n\t\t\"Name\": \"经验要求\",\r\n\t\t\"ParaMasterNo\": \"ResumeWorkYears\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Age\",\r\n\t\t\"Name\": \"年龄要求\",\r\n\t\t\"ParaMasterNo\": \"AgePeriodSetup\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Gender\",\r\n\t\t\"Name\": \"性 别\",\r\n\t\t\"ParaMasterNo\": \"Gender\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"SalaryPeriod\",\r\n\t\t\"Name\": \"薪资区间\",\r\n\t\t\"ParaMasterNo\": \"SalaryPeriodSetup\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"ApplyStatus\",\r\n\t\t\"Name\": \"求职状态\",\r\n\t\t\"ParaMasterNo\": \"ResumeApplyStatus\"\r\n\t},\r\n\t{\r\n\t\t\"Key\": \"Tags\",\r\n\t\t\"Name\": \"标签\",\r\n\t\t\"ParaMasterNo\": \"ResumeTag\"\r\n\t}\r\n]"; |
|
|
|
|
//var tabs = JsonHelper.JsonToObj<List<ResumeCondition>>(str); |
|
|
|
|
tabs.Add(new ResumeCondition() { Key = "Tags", Name = "标签" }); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < tabs.Count; i++) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
if (tabs[i].Key == "WorkYears") |
|
|
|
|
tabs[i].ParaMasterNo = "ResumeWorkYears"; |
|
|
|
|
var items = await GetParaList(tabs[i].ParaMasterNo); |
|
|
|
|
|
|
|
|
|
if (tabs[i].Key == "Tags") |
|
|
|
|
{ |
|
|
|
|
var tags = await _ghrh_ResumeTagServices.Query(); |
|
|
|
|
items = tags.Select(x => new Ghrs_ParaDetail() |
|
|
|
|
{ |
|
|
|
|
ParaDetailNo = x.Id.ToString(), |
|
|
|
|
ParaDetailName = x.TagName |
|
|
|
|
}).ToList(); |
|
|
|
|
//items.Insert(0, new Ghrs_ParaDetail() { ParaDetailNo = "NoFliter", ParaDetailName = "未打标签" }); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (items != null) |
|
|
|
|
{ |
|
|
|
|
if (tabs[i].Key != "Tags") |
|
|
|
|
{ |
|
|
|
|
var items = await GetParaList(x.ParaMasterNo); |
|
|
|
|
if (x.Key == "Tags") |
|
|
|
|
items.Insert(0, new Ghrs_ParaDetail() { ParaDetailNo = "NoFliter", ParaDetailName = "未打标签" }); |
|
|
|
|
else |
|
|
|
|
items.Insert(0, new Ghrs_ParaDetail() { ParaDetailNo = "NoFliter", ParaDetailName = "不限" }); |
|
|
|
|
x.Items = items.ToDictionary(item => item.ParaDetailNo, item => item.ParaDetailName); |
|
|
|
|
tabs[i].Items = items.ToDictionary(item => item.ParaDetailNo, item => item.ParaDetailName); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
tabs[i].Items = new Dictionary<string, string> |
|
|
|
|
{ |
|
|
|
|
{ "NoFliter", "未打标签" } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
items.ForEach(o => |
|
|
|
|
{ |
|
|
|
|
tabs[i].Items.Add(o.ParaDetailNo, o.ParaDetailName); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ServiceResult<List<ResumeCondition>>.OprateSuccess("查询成功!", tabs); |
|
|
|
|
|
|
|
|
|