招聘模块多语

master
xiaochanghai 6 months ago
parent acef2213a8
commit fdfadd01f5
  1. 9
      Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs
  2. 6
      Tiobon.Core.Api/Tiobon.Core.xml
  3. 2
      Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs
  4. 20
      Tiobon.Core.Services/CommonServices.cs
  5. 40
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs
  6. 6
      Tiobon.Core/Tiobon.Core.xml

@ -21,7 +21,14 @@ public class Ghrh_ResumeController : BaseController<IGhrh_ResumeServices, Ghrh_R
/// </summary>
/// <returns></returns>
[HttpPost("QueryViewTab")]
public ServiceResult<List<ResumeViewTab>> QueryViewTab() => _service.QueryViewTab();
public async Task<ServiceResult<List<ResumeViewTab>>> QueryViewTab() => await _service.QueryViewTab();
/// <summary>
/// 获取简历Tabs接口
/// </summary>
/// <returns></returns>
[HttpPost("QueryViewTab/{langId}")]
public async Task<ServiceResult<List<ResumeViewTab>>> QueryViewTab(int langId) => await _service.QueryViewTab(langId);
#endregion

@ -1353,6 +1353,12 @@
</summary>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.QueryViewTab(System.Int32)">
<summary>
获取简历Tabs接口
</summary>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.QueryByStatus(Tiobon.Core.Common.QueryBody,System.String)">
<summary>
根据条件查询数据

@ -12,7 +12,7 @@ namespace Tiobon.Core.IServices;
/// </summary>
public interface IGhrh_ResumeServices : IBaseServices<Ghrh_Resume, Ghrh_ResumeDto, InsertGhrh_ResumeInput, EditGhrh_ResumeInput>
{
ServiceResult<List<ResumeViewTab>> QueryViewTab();
Task<ServiceResult<List<ResumeViewTab>>> QueryViewTab(int langId=1);
Task<ServiceResult<List<ResumeCondition>>> QueryConditions();

@ -1134,7 +1134,7 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon
{
display = true,
fnKey = "TBD5YN",
fnTitle = "转入待确认",
fnTitle = await QueryLangValue("F_ManReqMaintenTemporary_TransferToConfirmed", param.langId, "转入待确认"),
fnType = "table",
icon = "ghr-icon-user-wait",
position = "left"
@ -1153,7 +1153,7 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon
{
display = true,
fnKey = "TBD6YN",
fnTitle = "拒绝",
fnTitle = await QueryLangValue("F_Training_Demand_ToConfirm_Reject", param.langId, "拒绝"),
fnType = "table",
icon = "ess-icon-reject",
position = "left"
@ -1162,7 +1162,7 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon
{
display = true,
fnKey = "TBD5YN",
fnTitle = "同意",
fnTitle = await QueryLangValue("F_Training_Demand_ToConfirm_Agree", param.langId, "同意"),
fnType = "table",
icon = "ess-icon-approval",
position = "left"
@ -1206,7 +1206,7 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon
{
display = true,
fnKey = "TBD7YN",
fnTitle = "拒绝",
fnTitle = await QueryLangValue("F_Training_Demand_ToConfirm_Reject", param.langId, "拒绝"),
fnType = "table",
icon = "ess-icon-reject",
position = "left"
@ -1215,7 +1215,7 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon
{
display = true,
fnKey = "TBD6YN",
fnTitle = "同意",
fnTitle = await QueryLangValue("F_Training_Demand_ToConfirm_Agree", param.langId, "同意"),
fnType = "table",
icon = "ess-icon-approval",
position = "left"
@ -4198,4 +4198,14 @@ public partial class CommonServices : BaseServices<RootEntityTkey<int>>, ICommon
return data;
}
}
#region 获取多语
public async Task<string> QueryLangValue(string key, int langId, string defaultValue)
{
string sql = $"select [dbo].[FLangKeyToValue]('{key}',{langId},null)";
string value = await Db.Ado.GetStringAsync(sql);
if (value.IsNullOrEmpty()) value = defaultValue;
return value;
}
#endregion
}

@ -458,7 +458,7 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
#endregion
#region 获取简历Tabs接口
public ServiceResult<List<ResumeViewTab>> QueryViewTab()
public async Task<ServiceResult<List<ResumeViewTab>>> QueryViewTab(int langId = 1)
{
string str = @"[
{
@ -539,31 +539,48 @@ public class Ghrh_ResumeServices : BaseServices<Ghrh_Resume, Ghrh_ResumeDto, Ins
""MenuName"": ""F_ResumeMaintenance_Talent_Pool"",
""TabName"": """",
""QueryUrl"": ""/api/Ghrh_Resume/QueryList/Talent_Pool"",
""Count"": 0
""Count"": 0,
},
{
""MenuName"": ""F_ResumeMaintenance_Recycled"",
""TabName"": """",
""QueryUrl"": ""/api/Ghrh_Resume/QueryList/Recycled"",
""Count"": 0
""Count"": 0,
},
{
""MenuName"": ""F_ResumeMaintenance_Blacklist"",
""TabName"": """",
""QueryUrl"": ""/api/Ghrh_Resume/QueryList/Blacklist"",
""Count"": 0
""Count"": 0,
}
]";
var tabs = JsonHelper.JsonToObj<List<ResumeViewTab>>(str);
var menus = Db.Ado.SqlQuery<string>(@"SELECT MenuNo
var menus = Db.Ado.SqlQuery<Ghrs_Menu>(@$"SELECT MenuNo, [dbo].[FLangKeyToValue] (MKey, {langId}, MenuName) MenuName
FROM Ghrs_Menu
WHERE ParentMenuId = (SELECT MenuId
FROM Ghrs_Menu
WHERE MenuNo = 'F_ResumeMaintenance')
AND IsEnable = 1");
tabs = tabs.Where(x => menus.Contains(x.MenuName)).ToList();
var menuNos = menus.Select(x => x.MenuNo).ToList();
tabs = tabs.Where(x => menuNos.Contains(x.MenuName)).ToList();
tabs.ForEach(x =>
{
x.TabName = menus.Where(o => o.MenuNo == x.MenuName).FirstOrDefault()?.MenuName;
});
for (int i = 0; i < tabs.Count; i++)
{
tabs[i].TabName = menus.Where(o => o.MenuNo == tabs[i].MenuName).FirstOrDefault()?.MenuName;
if (tabs[i].Items != null)
for (int j = 0; j < tabs[i].Items.Count; j++)
{
var key = "Recruit_" + tabs[i].MenuName + "_" + tabs[i].Items[j].Key;
tabs[i].Items[j].ItemName = await QueryLangValue(key, langId, key);
}
}
return ServiceResult<List<ResumeViewTab>>.OprateSuccess("查询成功!", tabs);
}
@ -812,6 +829,7 @@ ORDER BY A.SortNo ASC";
{ "CompanyName", companyName},
{ "LoginDesc", await QueryLangValue("Recruit_Resume_From_Login_Desc",langId,AppSettings.app(new string[] { "Resume", "LoginDesc" })) },
{ "LoginTitle", await QueryLangValue("Recruit_Resume_From_Login_Title",langId,AppSettings.app(new string[] { "Resume", "LoginTitle" })) },
{ "IdCardNo", await QueryLangValue("Recruit_Resume_From_IdCardNo_Text",langId,"身份证后六位") },
{ "StaffName", await QueryLangValue("Recruit_Resume_From_Staff_Name",langId,"姓名") },
{ "Mobile",await QueryLangValue("Recruit_Resume_From_Mobile",langId,"手机号") },
{ "AgainLoginText",await QueryLangValue("Recruit_Resume_From_Login_Again_Login_Text",langId,"二次登录") },
@ -830,8 +848,12 @@ ORDER BY A.SortNo ASC";
{ "InformationCompletionDegreeText",await QueryLangValue("Recruit_Resume_From_Infor_Completion_Degree_Text",langId,"信息填写完成度") },
{ "AddText", await QueryLangValue("Recruit_Resume_From_Add_Text",langId,"新增") },
{ "DeleteText",await QueryLangValue("Recruit_Resume_From_Delete_Text",langId,"删除") },
{ "TrueText",await QueryLangValue("Recruit_Resume_From_True_Text",langId,"是") },
{ "FalseText",await QueryLangValue("Recruit_Resume_From_False_Text",langId,"否") }
{ "DeleteAttachmentConfirmText",await QueryLangValue("Recruit_Resume_From_Delete_Attachment_Confirm_Text",langId,"是否确认删除附件?") },
{ "Thumbnail",await QueryLangValue("Recruit_Resume_From_Thumbnail",langId,"缩略图") },
{ "FileName",await QueryLangValue("Recruit_Resume_From_File_Name",langId,"文件名") },
{ "FileSize",await QueryLangValue("Recruit_Resume_From_File_Size",langId,"文件大小") },
{ "Remark",await QueryLangValue("Recruit_Resume_From_Remark",langId,"备注") },
{ "Option",await QueryLangValue("Recruit_Resume_From_Option",langId,"操作") }
};
return ServiceResult<Dictionary<string, string>>.OprateSuccess("查询成功", dict);
@ -864,7 +886,7 @@ BEGIN
FROM (SELECT a.ID,
a.ID ResumeTemplateInfoGroupID,
b.ID ResumeInfoGroupID,
b.GroupName tabName,
[dbo].[FLangKeyToValue](b.MKey,3,b.GroupName) tabName,
b.GroupType tabKey,
b.TableName,
b.TablePKIDName, --

@ -1353,6 +1353,12 @@
</summary>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.QueryViewTab(System.Int32)">
<summary>
获取简历Tabs接口
</summary>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghrh_ResumeController.QueryByStatus(Tiobon.Core.Common.QueryBody,System.String)">
<summary>
根据条件查询数据

Loading…
Cancel
Save