diff --git a/Tiobon.Core.Api/Controllers/Ghrp/Ghrp_PerformancePeriodTypeController.cs b/Tiobon.Core.Api/Controllers/Ghrp/Ghrp_PerformancePeriodTypeController.cs index bc3db002..b8f75a8c 100644 --- a/Tiobon.Core.Api/Controllers/Ghrp/Ghrp_PerformancePeriodTypeController.cs +++ b/Tiobon.Core.Api/Controllers/Ghrp/Ghrp_PerformancePeriodTypeController.cs @@ -11,4 +11,13 @@ public class Ghrp_PerformancePeriodTypeController : BaseController + /// 根据阶段数 获取对应阶段名称 + /// + /// 阶段 + /// + [HttpPost, Route("GetStageItems/{Stage}")] + public async Task>> GetStageItems(string Stage) => await _service.GetStageItems(Stage); + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 87724ead..8bbc3afd 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -14745,6 +14745,11 @@ 内置 + + + 考核阶段名称 + + Ghrs_Attachment (Dto.Base) @@ -37243,6 +37248,11 @@ 修改信息 + + + 考核阶段名称 + + Ghrs_Attachment(Dto.View) diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 1e290c27..57c194c5 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -2185,6 +2185,13 @@ 考核周期类别(Controller) + + + 根据阶段数 获取对应阶段名称 + + 阶段 + + Ghrs_Attachment(Controller) diff --git a/Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs b/Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs index f66cc1db..99a10e7d 100644 --- a/Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs +++ b/Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs @@ -215,6 +215,16 @@ public static class SwaggerSetup Description = "培训模块..." } }, new SwaggerApiInfo + { + UrlPrefix = Grouping.GroupName_Ghrp, + Name = "绩效模块", + OpenApiInfo = new OpenApiInfo + { + Version = version, + Title = "绩效模块", + Description = "绩效模块..." + } + }, new SwaggerApiInfo { UrlPrefix = Grouping.GroupName_Ghrh, Name = "招聘模块", @@ -296,7 +306,7 @@ public static class SwaggerSetup /// public const string GroupName_Ghre = " ghre"; /// - /// 培训模块 + /// 绩效模块 /// public const string GroupName_Ghrp = "ghrp"; diff --git a/Tiobon.Core.IServices/Ghrp/IGhrp_PerformancePeriodTypeServices.cs b/Tiobon.Core.IServices/Ghrp/IGhrp_PerformancePeriodTypeServices.cs index 316e40c5..e1a4582d 100644 --- a/Tiobon.Core.IServices/Ghrp/IGhrp_PerformancePeriodTypeServices.cs +++ b/Tiobon.Core.IServices/Ghrp/IGhrp_PerformancePeriodTypeServices.cs @@ -1,4 +1,5 @@ using Tiobon.Core.IServices.BASE; +using Tiobon.Core.Model; using Tiobon.Core.Model.Models; namespace Tiobon.Core.IServices @@ -8,5 +9,6 @@ namespace Tiobon.Core.IServices /// public interface IGhrp_PerformancePeriodTypeServices :IBaseServices { + Task>> GetStageItems(string Stage); } } \ No newline at end of file diff --git a/Tiobon.Core.Model/Base/Ghrp/Ghrp_PerformancePeriodType.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghrp/Ghrp_PerformancePeriodType.Dto.Base.cs index 63244a5f..f114ae93 100644 --- a/Tiobon.Core.Model/Base/Ghrp/Ghrp_PerformancePeriodType.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghrp/Ghrp_PerformancePeriodType.Dto.Base.cs @@ -13,7 +13,7 @@ *│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ *│ 作者:SimonHsiao │ *└──────────────────────────────────┘ -*/ +*/ using System.ComponentModel; using System.ComponentModel.DataAnnotations; @@ -151,5 +151,10 @@ namespace Tiobon.Core.Model.Models /// 内置 /// public int? BuiltIn { get; set; } + + /// + /// 考核阶段名称 + /// + public List StageItems_List { get; set; } } } diff --git a/Tiobon.Core.Model/View/Ghrp/Ghrp_PerformancePeriodType.Dto.View.cs b/Tiobon.Core.Model/View/Ghrp/Ghrp_PerformancePeriodType.Dto.View.cs index f59cb3dd..70956702 100644 --- a/Tiobon.Core.Model/View/Ghrp/Ghrp_PerformancePeriodType.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghrp/Ghrp_PerformancePeriodType.Dto.View.cs @@ -13,22 +13,28 @@ *│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ *│ 作者:SimonHsiao │ *└──────────────────────────────────┘ -*/ +*/ namespace Tiobon.Core.Model.Models; + /// /// 考核周期类别(Dto.View1) /// public class Ghrp_PerformancePeriodTypeDto : Ghrp_PerformancePeriodType { -/// -/// 创建信息 -/// -public string CreateDataInfo { get; set; } + /// + /// 创建信息 + /// + public string CreateDataInfo { get; set; } -/// -/// 修改信息 -/// -public string UpdateDataInfo { get; set; } + /// + /// 修改信息 + /// + public string UpdateDataInfo { get; set; } + + /// + /// 考核阶段名称 + /// + public List StageItems_List { get; set; } } diff --git a/Tiobon.Core.Services/BASE/BaseServices.cs b/Tiobon.Core.Services/BASE/BaseServices.cs index c156a5fa..84c73b32 100644 --- a/Tiobon.Core.Services/BASE/BaseServices.cs +++ b/Tiobon.Core.Services/BASE/BaseServices.cs @@ -1,4 +1,6 @@ -namespace Tiobon.Core.Services.BASE; +using System.Data; + +namespace Tiobon.Core.Services.BASE; /// /// 增删改查基础服务 @@ -1337,7 +1339,7 @@ WHERE ParaMasterId IN (SELECT ParaMasterId 'GHRPara', 'Train', 'Resume', - 'GHRAttend')) + 'GHRAttend','Performance')) AND IsEnable = 1 ORDER BY SortNo ASC"; list = DbAccess.QueryList(sql); @@ -1377,6 +1379,25 @@ ORDER BY SortNo ASC"; return list; } + public async Task GetParaLabelListString(string ParaTypeNo, string ParaMasterNo, string value) + { + string label = value; + + if (value.IsNullOrEmpty()) + return null; + + string sql = $@"SELECT [dbo].[FLangKeyToValue](mkey,1,ParaDetailName) ParaDetailName +FROM Ghrs_ParaDetail +where IsEnable=1 + and ParaTypeNo = '{ParaTypeNo}' + and ParaMasterNo = '{ParaMasterNo}' + and ParaDetailNo in (select value from Openjson('{value}')) +ORDER BY SortNo ASC"; + var list = DbAccess.QueryList(sql); + + label = string.Join(",", list.Select(o => o.ParaDetailName)); + return label; + } public async Task GetParaLabel(int? id) { diff --git a/Tiobon.Core.Services/Ghrp/Ghrp_PerformancePeriodTypeServices.cs b/Tiobon.Core.Services/Ghrp/Ghrp_PerformancePeriodTypeServices.cs index 4fef3f25..0dbae416 100644 --- a/Tiobon.Core.Services/Ghrp/Ghrp_PerformancePeriodTypeServices.cs +++ b/Tiobon.Core.Services/Ghrp/Ghrp_PerformancePeriodTypeServices.cs @@ -4,12 +4,13 @@ using Tiobon.Core.Model.Models; using Tiobon.Core.Services.BASE; using Tiobon.Core.IRepository.Base; using Tiobon.Core.Common.Caches; +using Tiobon.Core.Common.DB.Dapper.Extensions; namespace Tiobon.Core.Services { - /// - /// 考核周期类别 (服务) - /// + /// + /// 考核周期类别 (服务) + /// public class Ghrp_PerformancePeriodTypeServices : BaseServices, IGhrp_PerformancePeriodTypeServices { private readonly IBaseRepository _dal; @@ -19,5 +20,56 @@ namespace Tiobon.Core.Services base.BaseDal = dal; base._caching = caching; } + public override async Task> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) + { + + var result = await base.QueryFilterPage(filter, condition, IsEnable); + + result.result.DT_TableDataT1.ForEach(async x => + { + x.Stage = await GetParaLabel("PerformanceStage", x.Stage); + x.StageItems = await GetParaLabelListString("Performance", "PerformanceStageItem", x.StageItems); + }); + + return result; + } + + public override async Task Add(InsertGhrp_PerformancePeriodTypeInput entity) + { + if (entity.StageItems_List != null) + entity.StageItems = JsonHelper.ObjToJson(entity.StageItems_List); + var result = await base.Add(entity); + + return result; + } + + public override async Task Update(long Id, EditGhrp_PerformancePeriodTypeInput editModel) + { + if (editModel.StageItems_List != null) + editModel.StageItems = JsonHelper.ObjToJson(editModel.StageItems_List); + var result = await base.Update(Id, editModel, null, ["Status"]); + return result; + } + + public override async Task> QueryForm(QueryForm body) + { + var result = await base.QueryForm(body); + + var StageItems = result.result.DT_TableDataT1[0].StageItems; + if (!string.IsNullOrWhiteSpace(StageItems)) + result.result.DT_TableDataT1[0].StageItems_List = JsonConvert.DeserializeObject>(StageItems); + + return result; + } + + public async Task>> GetStageItems(string Stage) + { + List StageItmes = []; + if (Stage == "1Q1C") StageItmes = new List { "C" }; + if (Stage == "1Q2C") StageItmes = new List { "A","C" }; + if (Stage == "1Q3C") StageItmes = new List { "A", "B","C" }; + + return ServiceResult>.OprateSuccess("查询成功!", StageItmes); + } } } \ No newline at end of file diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 2c356a5e..87724ead 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -14465,6 +14465,286 @@ DeptDataType + + + 考核期间 (Dto.Base) + + + + + 期间编号 + + + + + 期间名称 + + + + + 考核周期类别ID + + + + + 考核周期类别 + + + + + 考核阶段数 + + + + + 阶段名称 + + + + + 当期类别 + + + + + 当期是否启用 + + + + + 期间开始日 + + + + + 期间结束日 + + + + + 员工填写开始日 + + + + + 员工填写结束日 + + + + + 主管填写开始日 + + + + + 主管填写结束日 + + + + + 人员状态基准日 + + + + + 前置期间 + + + + + 备注 + + + + + 排序 + + + + + 默认标志 + + + + + 预留字段1 + + + + + 预留字段2 + + + + + 预留字段3 + + + + + 预留字段4 + + + + + 预留字段5 + + + + + 预留字段6 + + + + + 预留字段7 + + + + + 预留字段8 + + + + + 预留字段9 + + + + + 预留字段10 + + + + + 预留字段11 + + + + + 预留字段12 + + + + + 内置 + + + + + 考核周期类别 (Dto.Base) + + + + + 类别编号 + + + + + 类别名称 + + + + + 多语编号 + + + + + 考核阶段数 + + + + + 考核阶段名称 + + + + + 集团数据归属ID + + + + + 备注 + + + + + 排序 + + + + + 默认标志 + + + + + 预留字段1 + + + + + 预留字段2 + + + + + 预留字段3 + + + + + 预留字段4 + + + + + 预留字段5 + + + + + 预留字段6 + + + + + 预留字段7 + + + + + 预留字段8 + + + + + 预留字段9 + + + + + 预留字段10 + + + + + 预留字段11 + + + + + 预留字段12 + + + + + 内置 + + Ghrs_Attachment (Dto.Base) @@ -16552,6 +16832,16 @@ Ghro_Dept (Dto.EditInput) + + + 考核期间 (Dto.EditInput) + + + + + 考核周期类别 (Dto.EditInput) + + Ghrs_Attachment (Dto.EditInput) @@ -17148,6 +17438,16 @@ Ghro_Dept (Dto.InsertInput) + + + 考核期间 (Dto.InsertInput) + + + + + 考核周期类别 (Dto.InsertInput) + + Ghrs_Attachment (Dto.InsertInput) @@ -31847,6 +32147,286 @@ DeptDataType + + + 考核期间 (Model) + + + + + 期间编号 + + + + + 期间名称 + + + + + 考核周期类别ID + + + + + 考核周期类别 + + + + + 考核阶段数 + + + + + 阶段名称 + + + + + 当期类别 + + + + + 当期是否启用 + + + + + 期间开始日 + + + + + 期间结束日 + + + + + 员工填写开始日 + + + + + 员工填写结束日 + + + + + 主管填写开始日 + + + + + 主管填写结束日 + + + + + 人员状态基准日 + + + + + 前置期间 + + + + + 备注 + + + + + 排序 + + + + + 默认标志 + + + + + 预留字段1 + + + + + 预留字段2 + + + + + 预留字段3 + + + + + 预留字段4 + + + + + 预留字段5 + + + + + 预留字段6 + + + + + 预留字段7 + + + + + 预留字段8 + + + + + 预留字段9 + + + + + 预留字段10 + + + + + 预留字段11 + + + + + 预留字段12 + + + + + 内置 + + + + + 考核周期类别 (Model) + + + + + 类别编号 + + + + + 类别名称 + + + + + 多语编号 + + + + + 考核阶段数 + + + + + 考核阶段名称 + + + + + 集团数据归属ID + + + + + 备注 + + + + + 排序 + + + + + 默认标志 + + + + + 预留字段1 + + + + + 预留字段2 + + + + + 预留字段3 + + + + + 预留字段4 + + + + + 预留字段5 + + + + + 预留字段6 + + + + + 预留字段7 + + + + + 预留字段8 + + + + + 预留字段9 + + + + + 预留字段10 + + + + + 预留字段11 + + + + + 预留字段12 + + + + + 内置 + + Ghrs_Attachment (Model) @@ -36633,6 +37213,36 @@ 修改信息 + + + 考核期间(Dto.View1) + + + + + 创建信息 + + + + + 修改信息 + + + + + 考核周期类别(Dto.View1) + + + + + 创建信息 + + + + + 修改信息 + + Ghrs_Attachment(Dto.View) diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index 3eab8aa5..1e290c27 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -2175,6 +2175,16 @@ Ghro_Dept(Controller) + + + 考核期间(Controller) + + + + + 考核周期类别(Controller) + + Ghrs_Attachment(Controller)