考核模板基本信息

master
孤兰 3 weeks ago
parent 207bf7fe24
commit b71b095982
  1. 14
      Tiobon.Core.Api/Controllers/Ghrp/Ghrp_PerformanceTemplateController.cs
  2. 793
      Tiobon.Core.Api/Tiobon.Core.Model.xml
  3. 18
      Tiobon.Core.Api/Tiobon.Core.xml
  4. 12
      Tiobon.Core.IServices/Ghrp/IGhrp_PerformanceTemplateServices.cs
  5. 188
      Tiobon.Core.Model/Base/Ghrp/Ghrp_PerformanceTemplate.Dto.Base.cs
  6. 27
      Tiobon.Core.Model/Edit/Ghrp/Ghrp_PerformanceTemplate.Dto.EditInput.cs
  7. 27
      Tiobon.Core.Model/Insert/Ghrp/Ghrp_PerformanceTemplate.Dto.InsertInput.cs
  8. 190
      Tiobon.Core.Model/Models/Ghrp/Ghrp_PerformanceTemplate.cs
  9. 38
      Tiobon.Core.Model/View/Ghrp/Ghrp_PerformanceTemplate.Dto.View.cs
  10. 60
      Tiobon.Core.Services/Ghrp/Ghrp_PerformanceTemplateServices.cs

@ -0,0 +1,14 @@
namespace Tiobon.Core.Api.Controllers;
/// <summary>
/// 考核模板(Controller)
/// </summary>
[Route("api/[controller]")]
[ApiController, GlobalActionFilter]
[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghrp)]
public class Ghrp_PerformanceTemplateController : BaseController<IGhrp_PerformanceTemplateServices, Ghrp_PerformanceTemplate, Ghrp_PerformanceTemplateDto, InsertGhrp_PerformanceTemplateInput, EditGhrp_PerformanceTemplateInput>
{
public Ghrp_PerformanceTemplateController(IGhrp_PerformanceTemplateServices service) : base(service)
{
}
}

File diff suppressed because it is too large Load Diff

@ -749,6 +749,14 @@
培训记录(Controller)
</summary>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghre_CertificateController.Query(System.Int64,Tiobon.Core.Common.QueryBody)">
<summary>
根据条件查询数据
</summary>
<param name="RuleId">RuleId</param>
<param name="body">条件</param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_CertificateDesignController">
<summary>
Ghre_CertificateDesign(Controller)
@ -2385,11 +2393,21 @@
<param name="Stage">阶段</param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrp_PerformanceTemplateController">
<summary>
考核模板(Controller)
</summary>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrs_AttachmentController">
<summary>
Ghrs_Attachment(Controller)
</summary>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrs_DataBelongController">
<summary>
资料归属(Controller)
</summary>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghrs_DataRoleDetailController">
<summary>
Ghrs_DataRoleDetail(Controller)

@ -0,0 +1,12 @@
using Tiobon.Core.IServices.BASE;
using Tiobon.Core.Model.Models;
namespace Tiobon.Core.IServices
{
/// <summary>
/// 考核模板(自定义服务接口)
/// </summary>
public interface IGhrp_PerformanceTemplateServices :IBaseServices<Ghrp_PerformanceTemplate, Ghrp_PerformanceTemplateDto, InsertGhrp_PerformanceTemplateInput, EditGhrp_PerformanceTemplateInput>
{
}
}

@ -0,0 +1,188 @@
/* ,
* Ghrp_PerformanceTemplate.cs
*
* N / A
* Ghrp_PerformanceTemplate
*
* Ver
*
*V0.01 2025/6/4 14:15:24 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace Tiobon.Core.Model.Models
{
/// <summary>
/// 考核模板 (Dto.Base)
/// </summary>
public class Ghrp_PerformanceTemplateBase
{
/// <summary>
/// 考核模板编号
/// </summary>
[Display(Name = "TemplateNo"), Description("考核模板编号"), MaxLength(100, ErrorMessage = "考核模板编号 不能超过 100 个字符")]
public string TemplateNo { get; set; }
/// <summary>
/// 考核模板名称
/// </summary>
[Display(Name = "TemplateName"), Description("考核模板名称"), MaxLength(100, ErrorMessage = "考核模板名称 不能超过 100 个字符")]
public string TemplateName { get; set; }
/// <summary>
/// 考核周期类别ID
/// </summary>
public int? PerformancePeriodTypeID { get; set; }
/// <summary>
/// 考核周期类别编号
/// </summary>
[Display(Name = "PeriodTypeNo"), Description("考核周期类别编号"), MaxLength(200, ErrorMessage = "考核周期类别编号 不能超过 200 个字符")]
public string PeriodTypeNo { get; set; }
/// <summary>
/// 考核阶段
/// </summary>
[Display(Name = "StageItem"), Description("考核阶段"), MaxLength(100, ErrorMessage = "考核阶段 不能超过 100 个字符")]
public string StageItem { get; set; }
/// <summary>
/// 考核对象
/// </summary>
public int? StaffGroupID { get; set; }
/// <summary>
/// 总分
/// </summary>
[Display(Name = "TotalScore"), Description("总分"), Column(TypeName = "decimal(18,2)")]
public decimal? TotalScore { get; set; }
/// <summary>
/// 表单是否允许超过总分
/// </summary>
public int? IsOutScore { get; set; }
/// <summary>
/// 考核模板权重
/// </summary>
[Display(Name = "Weight"), Description("考核模板权重"), Column(TypeName = "decimal(18,2)")]
public decimal? Weight { get; set; }
/// <summary>
/// 考核阶数(含本人)
/// </summary>
public int? LevelNum { get; set; }
/// <summary>
/// 考核主管显示方式
/// </summary>
[Display(Name = "MGShowType"), Description("考核主管显示方式"), MaxLength(255, ErrorMessage = "考核主管显示方式 不能超过 255 个字符")]
public string MGShowType { get; set; }
/// <summary>
/// 模板类型
/// </summary>
[Display(Name = "TemplateType"), Description("模板类型"), MaxLength(255, ErrorMessage = "模板类型 不能超过 255 个字符")]
public string TemplateType { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? SortNo { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
/// <summary>
/// 内置
/// </summary>
public int? BuiltIn { get; set; }
}
}

@ -0,0 +1,27 @@
/* ,
* Ghrp_PerformanceTemplate.cs
*
* N / A
* Ghrp_PerformanceTemplate
*
* Ver
*
*V0.01 2025/6/4 14:15:24 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models
{
/// <summary>
/// 考核模板 (Dto.EditInput)
/// </summary>
public class EditGhrp_PerformanceTemplateInput : Ghrp_PerformanceTemplateBase
{
}
}

@ -0,0 +1,27 @@
/* ,
* Ghrp_PerformanceTemplate.cs
*
* N / A
* Ghrp_PerformanceTemplate
*
* Ver
*
*V0.01 2025/6/4 14:15:24 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models
{
/// <summary>
/// 考核模板 (Dto.InsertInput)
/// </summary>
public class InsertGhrp_PerformanceTemplateInput : Ghrp_PerformanceTemplateBase
{
}
}

@ -0,0 +1,190 @@
/* ,
* Ghrp_PerformanceTemplate.cs
*
* N / A
* Ghrp_PerformanceTemplate
*
* Ver
*
*V0.01 2025/6/4 14:15:24 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using SqlSugar;
namespace Tiobon.Core.Model.Models
{
/// <summary>
/// 考核模板 (Model)
/// </summary>
[SugarTable("Ghrp_PerformanceTemplate", "Ghrp_PerformanceTemplate"), Entity(TableCnName = "考核模板", TableName = "Ghrp_PerformanceTemplate")]
public class Ghrp_PerformanceTemplate : BasePoco
{
/// <summary>
/// 考核模板编号
/// </summary>
[Display(Name = "TemplateNo"), Description("考核模板编号"), MaxLength(100, ErrorMessage = "考核模板编号 不能超过 100 个字符")]
public string TemplateNo { get; set; }
/// <summary>
/// 考核模板名称
/// </summary>
[Display(Name = "TemplateName"), Description("考核模板名称"), MaxLength(100, ErrorMessage = "考核模板名称 不能超过 100 个字符")]
public string TemplateName { get; set; }
/// <summary>
/// 考核周期类别ID
/// </summary>
public int? PerformancePeriodTypeID { get; set; }
/// <summary>
/// 考核周期类别编号
/// </summary>
[Display(Name = "PeriodTypeNo"), Description("考核周期类别编号"), MaxLength(200, ErrorMessage = "考核周期类别编号 不能超过 200 个字符")]
public string PeriodTypeNo { get; set; }
/// <summary>
/// 考核阶段
/// </summary>
[Display(Name = "StageItem"), Description("考核阶段"), MaxLength(100, ErrorMessage = "考核阶段 不能超过 100 个字符")]
public string StageItem { get; set; }
/// <summary>
/// 考核对象
/// </summary>
public int? StaffGroupID { get; set; }
/// <summary>
/// 总分
/// </summary>
[Display(Name = "TotalScore"), Description("总分"), Column(TypeName = "decimal(18,2)")]
public decimal? TotalScore { get; set; }
/// <summary>
/// 表单是否允许超过总分
/// </summary>
public int? IsOutScore { get; set; }
/// <summary>
/// 考核模板权重
/// </summary>
[Display(Name = "Weight"), Description("考核模板权重"), Column(TypeName = "decimal(18,2)")]
public decimal? Weight { get; set; }
/// <summary>
/// 考核阶数(含本人)
/// </summary>
public int? LevelNum { get; set; }
/// <summary>
/// 考核主管显示方式
/// </summary>
[Display(Name = "MGShowType"), Description("考核主管显示方式"), MaxLength(255, ErrorMessage = "考核主管显示方式 不能超过 255 个字符")]
public string MGShowType { get; set; }
/// <summary>
/// 模板类型
/// </summary>
[Display(Name = "TemplateType"), Description("模板类型"), MaxLength(255, ErrorMessage = "模板类型 不能超过 255 个字符")]
public string TemplateType { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")]
public string RemarkSz { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? SortNo { get; set; }
/// <summary>
/// 默认标志
/// </summary>
public int? IsDefault { get; set; }
/// <summary>
/// 预留字段1
/// </summary>
[Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")]
public string Reverse1 { get; set; }
/// <summary>
/// 预留字段2
/// </summary>
[Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")]
public string Reverse2 { get; set; }
/// <summary>
/// 预留字段3
/// </summary>
[Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")]
public string Reverse3 { get; set; }
/// <summary>
/// 预留字段4
/// </summary>
[Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")]
public string Reverse4 { get; set; }
/// <summary>
/// 预留字段5
/// </summary>
[Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")]
public string Reverse5 { get; set; }
/// <summary>
/// 预留字段6
/// </summary>
[Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")]
public string Reverse6 { get; set; }
/// <summary>
/// 预留字段7
/// </summary>
[Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")]
public string Reverse7 { get; set; }
/// <summary>
/// 预留字段8
/// </summary>
[Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")]
public string Reverse8 { get; set; }
/// <summary>
/// 预留字段9
/// </summary>
[Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")]
public string Reverse9 { get; set; }
/// <summary>
/// 预留字段10
/// </summary>
[Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")]
public string Reverse10 { get; set; }
/// <summary>
/// 预留字段11
/// </summary>
public int? ReverseI1 { get; set; }
/// <summary>
/// 预留字段12
/// </summary>
public int? ReverseI2 { get; set; }
/// <summary>
/// 内置
/// </summary>
public int? BuiltIn { get; set; }
}
}

@ -0,0 +1,38 @@
/* ,
* Ghrp_PerformanceTemplate.cs
*
* N / A
* Ghrp_PerformanceTemplate
*
* Ver
*
*V0.01 2025/6/4 14:15:24 SimonHsiao
*
* Copyright(c) 2025 Tiobon Corporation. All Rights Reserved.
*
*  
* SimonHsiao
*
*/
namespace Tiobon.Core.Model.Models;
/// <summary>
/// 考核模板(Dto.View1)
/// </summary>
public class Ghrp_PerformanceTemplateDto : Ghrp_PerformanceTemplate
{
/// <summary>
/// 创建信息
/// </summary>
public string CreateDataInfo { get; set; }
/// <summary>
/// 修改信息
/// </summary>
public string UpdateDataInfo { get; set; }
public string StaffGroupName { get; set; }
public string PeriodTypeName { get; set; }
}

@ -0,0 +1,60 @@

using Tiobon.Core.IServices;
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
{
/// <summary>
/// 考核模板 (服务)
/// </summary>
public class Ghrp_PerformanceTemplateServices : BaseServices<Ghrp_PerformanceTemplate, Ghrp_PerformanceTemplateDto, InsertGhrp_PerformanceTemplateInput, EditGhrp_PerformanceTemplateInput>, IGhrp_PerformanceTemplateServices
{
private readonly IBaseRepository<Ghrp_PerformanceTemplate> _dal;
public Ghrp_PerformanceTemplateServices(ICaching caching, IBaseRepository<Ghrp_PerformanceTemplate> dal)
{
this._dal = dal;
base.BaseDal = dal;
base._caching = caching;
}
public override async Task<ServicePageResult<Ghrp_PerformanceTemplateDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true)
{
var result = await base.QueryFilterPage(filter, condition, IsEnable);
result.result.DT_TableDataT1.ForEach(async x =>
{
x.StageItem = await GetParaLabel("PerformanceStageItem", x.StageItem);
x.MGShowType = await GetParaLabelListString("Performance", "PerformanceMGShowType", x.MGShowType);
x.TemplateType = await GetParaLabelListString("Performance", "PerformanceTemplateType", x.TemplateType);
x.StaffGroupName = Db.Ado.GetString("select StaffGroupName from Ghra_StaffGroup where StaffGroupID=@StaffGroupID"
, new { StaffGroupID = x.StaffGroupID });
x.PeriodTypeName = Db.Ado.GetString("select PeriodTypeName from Ghrp_PerformancePeriodType where PerformancePeriodTypeID=@PerformancePeriodTypeID"
, new { PerformancePeriodTypeID = x.PerformancePeriodTypeID });
});
return result;
}
public override async Task<long> Add(InsertGhrp_PerformanceTemplateInput entity)
{
if (entity.PerformancePeriodTypeID != null)
entity.PeriodTypeNo = await Db.Queryable<Ghrp_PerformancePeriodType>().Where(a => a.Id == entity.PerformancePeriodTypeID).Select(x => x.PeriodTypeNo).FirstAsync();
var result = await base.Add(entity);
return result;
}
public override async Task<bool> Update(long Id, EditGhrp_PerformanceTemplateInput editModel)
{
if (editModel.PerformancePeriodTypeID != null)
editModel.PeriodTypeNo = await Db.Queryable<Ghrp_PerformancePeriodType>().Where(a => a.Id == editModel.PerformancePeriodTypeID).Select(x => x.PeriodTypeNo).FirstAsync();
var result = await base.Update(Id, editModel, null, ["Status"]);
return result;
}
}
}
Loading…
Cancel
Save