From fdfadd01f5a651892a19620fd42ddea1b0b525d2 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Tue, 31 Dec 2024 10:48:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=9B=E8=81=98=E6=A8=A1=E5=9D=97=E5=A4=9A?= =?UTF-8?q?=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghrh/Ghrh_ResumeController.cs | 9 ++++- Tiobon.Core.Api/Tiobon.Core.xml | 6 +++ .../Ghrh/IGhrh_ResumeServices.cs | 2 +- Tiobon.Core.Services/CommonServices.cs | 20 +++++++--- .../Ghrh/Ghrh_ResumeServices.cs | 40 ++++++++++++++----- Tiobon.Core/Tiobon.Core.xml | 6 +++ 6 files changed, 67 insertions(+), 16 deletions(-) diff --git a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs index ecc3e7a0..401a5b45 100644 --- a/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrh/Ghrh_ResumeController.cs @@ -21,7 +21,14 @@ public class Ghrh_ResumeController : BaseController /// [HttpPost("QueryViewTab")] - public ServiceResult> QueryViewTab() => _service.QueryViewTab(); + public async Task>> QueryViewTab() => await _service.QueryViewTab(); + + /// + /// 获取简历Tabs接口 + /// + /// + [HttpPost("QueryViewTab/{langId}")] + public async Task>> QueryViewTab(int langId) => await _service.QueryViewTab(langId); #endregion diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 3fa85f99..6509517b 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1353,6 +1353,12 @@ + + + 获取简历Tabs接口 + + + 根据条件查询数据 diff --git a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs index 568d0068..3ade5ee5 100644 --- a/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs +++ b/Tiobon.Core.IServices/Ghrh/IGhrh_ResumeServices.cs @@ -12,7 +12,7 @@ namespace Tiobon.Core.IServices; /// public interface IGhrh_ResumeServices : IBaseServices { - ServiceResult> QueryViewTab(); + Task>> QueryViewTab(int langId=1); Task>> QueryConditions(); diff --git a/Tiobon.Core.Services/CommonServices.cs b/Tiobon.Core.Services/CommonServices.cs index ae0917af..17611ae5 100644 --- a/Tiobon.Core.Services/CommonServices.cs +++ b/Tiobon.Core.Services/CommonServices.cs @@ -1134,7 +1134,7 @@ public partial class CommonServices : BaseServices>, 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>, 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>, 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>, 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>, 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>, ICommon return data; } } + + #region 获取多语 + public async Task 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 } diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index b1fb68cb..0ff05abd 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -458,7 +458,7 @@ public class Ghrh_ResumeServices : BaseServices> QueryViewTab() + public async Task>> QueryViewTab(int langId = 1) { string str = @"[ { @@ -539,31 +539,48 @@ public class Ghrh_ResumeServices : BaseServices>(str); - var menus = Db.Ado.SqlQuery(@"SELECT MenuNo + var menus = Db.Ado.SqlQuery(@$"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>.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>.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, -- 是否可挑选栏位 diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index 3fa85f99..6509517b 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1353,6 +1353,12 @@ + + + 获取简历Tabs接口 + + + 根据条件查询数据