diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index eb2352e2..fe3bbcc0 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -2202,7 +2202,12 @@ - 培训记录 (Dto.Base) + 培训证书 (Dto.Base) + + + + + 培训证书规则ID @@ -2247,7 +2252,7 @@ - 颁发来源 + 颁奖来源 @@ -15718,7 +15723,12 @@ - 培训记录 (Model) + 培训证书 (Model) + + + + + 培训证书规则ID @@ -15763,7 +15773,7 @@ - 颁发来源 + 颁奖来源 diff --git a/Tiobon.Core.Api/wwwroot/files/import/1871744379090243584/Ghre_Certificate.xlsx b/Tiobon.Core.Api/wwwroot/files/import/1871744379090243584/Ghre_Certificate.xlsx deleted file mode 100644 index 7064981b..00000000 Binary files a/Tiobon.Core.Api/wwwroot/files/import/1871744379090243584/Ghre_Certificate.xlsx and /dev/null differ diff --git a/Tiobon.Core.Model/Base/Ghre/Ghre_Certificate.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghre/Ghre_Certificate.Dto.Base.cs index 1efeefe8..196b681f 100644 --- a/Tiobon.Core.Model/Base/Ghre/Ghre_Certificate.Dto.Base.cs +++ b/Tiobon.Core.Model/Base/Ghre/Ghre_Certificate.Dto.Base.cs @@ -6,154 +6,155 @@ * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── -*V0.01 2024/7/16 16:52:58 SimonHsiao 初版 +*V0.01 2024/12/25 10:29:10 SimonHsiao 初版 * * Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. *┌──────────────────────────────────┐ *│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ *│ 作者:SimonHsiao │ *└──────────────────────────────────┘ -*/ -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; +*/ +namespace Tiobon.Core.Model.Models; -namespace Tiobon.Core.Model.Models + +/// +/// 培训证书 (Dto.Base) +/// +public class Ghre_CertificateBase { /// - /// 培训记录 (Dto.Base) - /// - public class Ghre_CertificateBase - { - - /// - /// 员工ID - /// - public int? StaffId { get; set; } - - /// - /// 课程快照ID - /// - public long? CourseSnapId { get; set; } - - /// - /// 课程ID - /// - public long? CourseId { get; set; } - - /// - /// 证书类型 - /// - [Display(Name = "CertificateType"), Description("证书类型"), MaxLength(32, ErrorMessage = "证书类型 不能超过 32 个字符")] - public string CertificateType { get; set; } - - /// - /// 证书Url - /// - [Display(Name = "CertificateUrl"), Description("证书Url"), MaxLength(128, ErrorMessage = "证书Url 不能超过 128 个字符")] - public string CertificateUrl { get; set; } - - /// - /// 颁发日期 - /// - public DateTime? AwardDate { get; set; } - - /// - /// 有效期 - /// - [Display(Name = "ValidityPeriod"), Description("有效期"), MaxLength(32, ErrorMessage = "有效期 不能超过 32 个字符")] - public string ValidityPeriod { get; set; } - - /// - /// 结束时间 - /// - public DateTime? ValidityPeriodTime { get; set; } - - /// - /// 颁发来源 - /// - [Display(Name = "AwardSource"), Description("颁发来源"), MaxLength(32, ErrorMessage = "颁发来源 不能超过 32 个字符")] - public string AwardSource { get; set; } - - /// - /// 备注 - /// - [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")] - public string RemarkSz { get; set; } - - /// - /// 默认标志 - /// - public int? IsDefault { get; set; } - - /// - /// 预留字段1 - /// - [Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")] - public string Reverse1 { get; set; } - - /// - /// 预留字段2 - /// - [Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")] - public string Reverse2 { get; set; } - - /// - /// 预留字段3 - /// - [Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")] - public string Reverse3 { get; set; } - - /// - /// 预留字段4 - /// - [Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")] - public string Reverse4 { get; set; } - - /// - /// 预留字段5 - /// - [Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")] - public string Reverse5 { get; set; } - - /// - /// 预留字段6 - /// - [Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")] - public string Reverse6 { get; set; } - - /// - /// 预留字段7 - /// - [Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")] - public string Reverse7 { get; set; } - - /// - /// 预留字段8 - /// - [Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")] - public string Reverse8 { get; set; } - - /// - /// 预留字段9 - /// - [Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")] - public string Reverse9 { get; set; } - - /// - /// 预留字段10 - /// - [Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")] - public string Reverse10 { get; set; } - - /// - /// 预留字段11 - /// - public int? ReverseI1 { get; set; } - - /// - /// 预留字段12 - /// - public int? ReverseI2 { get; set; } - } + /// 培训证书规则ID + /// + public long? CertificateRuleId { get; set; } + + /// + /// 员工ID + /// + public int? StaffId { get; set; } + + /// + /// 课程快照ID + /// + public long? CourseSnapId { get; set; } + + /// + /// 课程ID + /// + public long? CourseId { get; set; } + + /// + /// 证书类型 + /// + [Display(Name = "CertificateType"), Description("证书类型"), MaxLength(32, ErrorMessage = "证书类型 不能超过 32 个字符")] + public string CertificateType { get; set; } + + /// + /// 证书Url + /// + [Display(Name = "CertificateUrl"), Description("证书Url"), MaxLength(128, ErrorMessage = "证书Url 不能超过 128 个字符")] + public string CertificateUrl { get; set; } + + /// + /// 颁发日期 + /// + public DateTime? AwardDate { get; set; } + + /// + /// 有效期 + /// + [Display(Name = "ValidityPeriod"), Description("有效期"), MaxLength(32, ErrorMessage = "有效期 不能超过 32 个字符")] + public string ValidityPeriod { get; set; } + + /// + /// 结束时间 + /// + public DateTime? ValidityPeriodTime { get; set; } + + /// + /// 颁奖来源 + /// + [Display(Name = "AwardSource"), Description("颁奖来源"), MaxLength(32, ErrorMessage = "颁奖来源 不能超过 32 个字符")] + public string AwardSource { get; set; } + + /// + /// 备注 + /// + [Display(Name = "RemarkSz"), Description("备注"), MaxLength(2000, ErrorMessage = "备注 不能超过 2000 个字符")] + public string RemarkSz { get; set; } + + /// + /// 默认标志 + /// + public int? IsDefault { get; set; } + + /// + /// 预留字段1 + /// + [Display(Name = "Reverse1"), Description("预留字段1"), MaxLength(1000, ErrorMessage = "预留字段1 不能超过 1000 个字符")] + public string Reverse1 { get; set; } + + /// + /// 预留字段2 + /// + [Display(Name = "Reverse2"), Description("预留字段2"), MaxLength(1000, ErrorMessage = "预留字段2 不能超过 1000 个字符")] + public string Reverse2 { get; set; } + + /// + /// 预留字段3 + /// + [Display(Name = "Reverse3"), Description("预留字段3"), MaxLength(1000, ErrorMessage = "预留字段3 不能超过 1000 个字符")] + public string Reverse3 { get; set; } + + /// + /// 预留字段4 + /// + [Display(Name = "Reverse4"), Description("预留字段4"), MaxLength(1000, ErrorMessage = "预留字段4 不能超过 1000 个字符")] + public string Reverse4 { get; set; } + + /// + /// 预留字段5 + /// + [Display(Name = "Reverse5"), Description("预留字段5"), MaxLength(1000, ErrorMessage = "预留字段5 不能超过 1000 个字符")] + public string Reverse5 { get; set; } + + /// + /// 预留字段6 + /// + [Display(Name = "Reverse6"), Description("预留字段6"), MaxLength(1000, ErrorMessage = "预留字段6 不能超过 1000 个字符")] + public string Reverse6 { get; set; } + + /// + /// 预留字段7 + /// + [Display(Name = "Reverse7"), Description("预留字段7"), MaxLength(1000, ErrorMessage = "预留字段7 不能超过 1000 个字符")] + public string Reverse7 { get; set; } + + /// + /// 预留字段8 + /// + [Display(Name = "Reverse8"), Description("预留字段8"), MaxLength(1000, ErrorMessage = "预留字段8 不能超过 1000 个字符")] + public string Reverse8 { get; set; } + + /// + /// 预留字段9 + /// + [Display(Name = "Reverse9"), Description("预留字段9"), MaxLength(1000, ErrorMessage = "预留字段9 不能超过 1000 个字符")] + public string Reverse9 { get; set; } + + /// + /// 预留字段10 + /// + [Display(Name = "Reverse10"), Description("预留字段10"), MaxLength(1000, ErrorMessage = "预留字段10 不能超过 1000 个字符")] + public string Reverse10 { get; set; } + + /// + /// 预留字段11 + /// + public int? ReverseI1 { get; set; } + + /// + /// 预留字段12 + /// + public int? ReverseI2 { get; set; } } diff --git a/Tiobon.Core.Model/Models/Ghre/Ghre_Certificate.cs b/Tiobon.Core.Model/Models/Ghre/Ghre_Certificate.cs index e457fd96..705dce54 100644 --- a/Tiobon.Core.Model/Models/Ghre/Ghre_Certificate.cs +++ b/Tiobon.Core.Model/Models/Ghre/Ghre_Certificate.cs @@ -6,7 +6,7 @@ * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── -*V0.01 2024/7/16 16:52:58 SimonHsiao 初版 +*V0.01 2024/12/25 10:29:10 SimonHsiao 初版 * * Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. *┌──────────────────────────────────┐ @@ -18,12 +18,17 @@ namespace Tiobon.Core.Model.Models; /// -/// 培训记录 (Model) +/// 培训证书 (Model) /// -[SugarTable("Ghre_Certificate", "Ghre_Certificate"), Entity(TableCnName = "培训记录", TableName = "Ghre_Certificate")] +[SugarTable("Ghre_Certificate", "Ghre_Certificate"), Entity(TableCnName = "Ghre_Certificate", TableName = "Ghre_Certificate")] public class Ghre_Certificate : BasePoco { + /// + /// 培训证书规则ID + /// + public long? CertificateRuleId { get; set; } + /// /// 员工ID /// @@ -68,9 +73,9 @@ public class Ghre_Certificate : BasePoco public DateTime? ValidityPeriodTime { get; set; } /// - /// 颁发来源 + /// 颁奖来源 /// - [Display(Name = "AwardSource"), Description("颁发来源"), MaxLength(32, ErrorMessage = "颁发来源 不能超过 32 个字符")] + [Display(Name = "AwardSource"), Description("颁奖来源"), MaxLength(32, ErrorMessage = "颁奖来源 不能超过 32 个字符")] public string AwardSource { get; set; } /// diff --git a/Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs b/Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs index 2f6a30b8..bb76cb93 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs @@ -171,7 +171,7 @@ public class Ghre_CertificateServices : BaseServices().Where(x => x.StaffNo == StaffNo && x.StaffName == StaffName).FirstAsync(); if (staff == null) { - comments.Add($"未查询到搞员工,工号或姓名填写错误!"); + comments.Add($"未查询到该员工,工号或姓名填写错误!"); data.ErrorCount++; dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); isExistError = true; @@ -195,9 +195,9 @@ public class Ghre_CertificateServices : BaseServices x.CertificateRuleId == rule.Id && x.StaffId == ClassNo)) + //if (await base.AnyAsync(x => x.CertificateRuleId == rule.Id && x.StaffId == staff.StaffID && x.CourseId == course.Id)) //{ - // comments.Add($"系统已存在相同编号名称人证对照表数据!"); + // comments.Add($"系统已存在相同证照数据!"); // data.ErrorCount++; // dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); // isExistError = true; diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index eb2352e2..fe3bbcc0 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -2202,7 +2202,12 @@ - 培训记录 (Dto.Base) + 培训证书 (Dto.Base) + + + + + 培训证书规则ID @@ -2247,7 +2252,7 @@ - 颁发来源 + 颁奖来源 @@ -15718,7 +15723,12 @@ - 培训记录 (Model) + 培训证书 (Model) + + + + + 培训证书规则ID @@ -15763,7 +15773,7 @@ - 颁发来源 + 颁奖来源