From e260e261eb83adc846833bf3545dac5f96e67c0a Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Fri, 27 Dec 2024 13:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8E=86=E5=BA=93=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghrs/Ghrs_ListCommonSqlController.cs | 14 + Tiobon.Core.Api/Tiobon.Core.Model.xml | 295 ++++++++++++++++++ Tiobon.Core.Api/Tiobon.Core.xml | 5 + .../Ghrs/IGhrs_ListCommonSqlServices.cs | 11 + .../Base/Ghrs/Ghrs_ListCommonSql.Dto.Base.cs | 172 ++++++++++ .../Ghrs/Ghrs_ListCommonSql.Dto.EditInput.cs | 26 ++ .../Ghrs_ListCommonSql.Dto.InsertInput.cs | 26 ++ .../Models/Ghrs/Ghrs_ListCommonSql.cs | 174 +++++++++++ .../Models/Ghrz/Ghrz_Shihua_OA_Employment.cs | 1 + .../View/Ghrs/Ghrs_ListCommonSql.Dto.View.cs | 34 ++ .../Extend/ResumeTemplateGroupColumn.cs | 7 + .../Ghrh/Ghrh_ResumeServices.cs | 229 +++++++++++++- .../Ghrs/Ghrs_ListCommonSqlServices.cs | 15 + 13 files changed, 1007 insertions(+), 2 deletions(-) create mode 100644 Tiobon.Core.Api/Controllers/Ghrs/Ghrs_ListCommonSqlController.cs create mode 100644 Tiobon.Core.IServices/Ghrs/IGhrs_ListCommonSqlServices.cs create mode 100644 Tiobon.Core.Model/Base/Ghrs/Ghrs_ListCommonSql.Dto.Base.cs create mode 100644 Tiobon.Core.Model/Edit/Ghrs/Ghrs_ListCommonSql.Dto.EditInput.cs create mode 100644 Tiobon.Core.Model/Insert/Ghrs/Ghrs_ListCommonSql.Dto.InsertInput.cs create mode 100644 Tiobon.Core.Model/Models/Ghrs/Ghrs_ListCommonSql.cs create mode 100644 Tiobon.Core.Model/View/Ghrs/Ghrs_ListCommonSql.Dto.View.cs create mode 100644 Tiobon.Core.Services/Ghrs/Ghrs_ListCommonSqlServices.cs diff --git a/Tiobon.Core.Api/Controllers/Ghrs/Ghrs_ListCommonSqlController.cs b/Tiobon.Core.Api/Controllers/Ghrs/Ghrs_ListCommonSqlController.cs new file mode 100644 index 00000000..32a8f9b6 --- /dev/null +++ b/Tiobon.Core.Api/Controllers/Ghrs/Ghrs_ListCommonSqlController.cs @@ -0,0 +1,14 @@ +namespace Tiobon.Core.Api.Controllers; + +/// +/// Ghrs_ListCommonSql(Controller) +/// +[Route("api/[controller]")] +[ApiController, GlobalActionFilter] +[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghrs)] +public class Ghrs_ListCommonSqlController : BaseController +{ + public Ghrs_ListCommonSqlController(IGhrs_ListCommonSqlServices service) : base(service) + { + } +} \ 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 6298a9b7..963cf0d2 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -11368,6 +11368,136 @@ TableID + + + Ghrs_ListCommonSql (Dto.Base) + + + + + ListCommonSqlId + + + + + ListCommonSqlNo + + + + + ListCommonSqlName + + + + + ListCommonSqlType + + + + + ListCommonSqlType2 + + + + + ListComment + + + + + SelectSql + + + + + JsonTitle + + + + + WhereSql + + + + + OrderBySql + + + + + SqlTopCountSql + + + + + SqlGetIDSql + + + + + RemarkSz + + + + + SortNo + + + + + IsDefault + + + + + Reverse1 + + + + + Reverse2 + + + + + Reverse3 + + + + + Reverse4 + + + + + Reverse5 + + + + + Reverse6 + + + + + Reverse7 + + + + + Reverse8 + + + + + Reverse9 + + + + + SqlIDToName + + Ghrs_MailOutbox (Dto.Base) @@ -12272,6 +12402,11 @@ 学历编号 + + + LegalCompanyNo + + 计薪类别编号 @@ -12857,6 +12992,11 @@ Ghrs_LangKey (Dto.EditInput) + + + Ghrs_ListCommonSql (Dto.EditInput) + + Ghrs_MailOutbox (Dto.EditInput) @@ -13327,6 +13467,11 @@ Ghrs_LangKey (Dto.InsertInput) + + + Ghrs_ListCommonSql (Dto.InsertInput) + + Ghrs_MailOutbox (Dto.InsertInput) @@ -25034,6 +25179,136 @@ TableID + + + Ghrs_ListCommonSql (Model) + + + + + ListCommonSqlId + + + + + ListCommonSqlNo + + + + + ListCommonSqlName + + + + + ListCommonSqlType + + + + + ListCommonSqlType2 + + + + + ListComment + + + + + SelectSql + + + + + JsonTitle + + + + + WhereSql + + + + + OrderBySql + + + + + SqlTopCountSql + + + + + SqlGetIDSql + + + + + RemarkSz + + + + + SortNo + + + + + IsDefault + + + + + Reverse1 + + + + + Reverse2 + + + + + Reverse3 + + + + + Reverse4 + + + + + Reverse5 + + + + + Reverse6 + + + + + Reverse7 + + + + + Reverse8 + + + + + Reverse9 + + + + + SqlIDToName + + Ghrs_MailOutbox (Model) @@ -25943,6 +26218,11 @@ 学历编号 + + + LegalCompanyNo + + 计薪类别编号 @@ -28807,6 +29087,21 @@ 修改信息 + + + Ghrs_ListCommonSql(Dto.View1) + + + + + 创建信息 + + + + + 修改信息 + + Ghrs_MailOutbox(Dto.View1) diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index c26be6aa..3fa85f99 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1829,6 +1829,11 @@ Ghrs_LangKey(Controller) + + + Ghrs_ListCommonSql(Controller) + + Ghrs_MailOutbox(Controller) diff --git a/Tiobon.Core.IServices/Ghrs/IGhrs_ListCommonSqlServices.cs b/Tiobon.Core.IServices/Ghrs/IGhrs_ListCommonSqlServices.cs new file mode 100644 index 00000000..8055f538 --- /dev/null +++ b/Tiobon.Core.IServices/Ghrs/IGhrs_ListCommonSqlServices.cs @@ -0,0 +1,11 @@ +using Tiobon.Core.IServices.BASE; +using Tiobon.Core.Model.Models; + +namespace Tiobon.Core.IServices; + +/// +/// Ghrs_ListCommonSql(自定义服务接口) +/// + public interface IGhrs_ListCommonSqlServices :IBaseServices +{ + } \ No newline at end of file diff --git a/Tiobon.Core.Model/Base/Ghrs/Ghrs_ListCommonSql.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghrs/Ghrs_ListCommonSql.Dto.Base.cs new file mode 100644 index 00000000..cb7131d7 --- /dev/null +++ b/Tiobon.Core.Model/Base/Ghrs/Ghrs_ListCommonSql.Dto.Base.cs @@ -0,0 +1,172 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghrs_ListCommonSql.cs +* +*功 能: N / A +* 类 名: Ghrs_ListCommonSql +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/27 11:37:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ +namespace Tiobon.Core.Model.Models; + + +/// +/// Ghrs_ListCommonSql (Dto.Base) +/// +public class Ghrs_ListCommonSqlBase +{ + + /// + /// ListCommonSqlId + /// + public int? ListCommonSqlId { get; set; } + + /// + /// ListCommonSqlNo + /// + [Display(Name = "ListCommonSqlNo"), Description("ListCommonSqlNo"), MaxLength(1000, ErrorMessage = "ListCommonSqlNo 不能超过 1000 个字符")] + public string ListCommonSqlNo { get; set; } + + /// + /// ListCommonSqlName + /// + [Display(Name = "ListCommonSqlName"), Description("ListCommonSqlName"), MaxLength(1000, ErrorMessage = "ListCommonSqlName 不能超过 1000 个字符")] + public string ListCommonSqlName { get; set; } + + /// + /// ListCommonSqlType + /// + [Display(Name = "ListCommonSqlType"), Description("ListCommonSqlType"), MaxLength(1000, ErrorMessage = "ListCommonSqlType 不能超过 1000 个字符")] + public string ListCommonSqlType { get; set; } + + /// + /// ListCommonSqlType2 + /// + [Display(Name = "ListCommonSqlType2"), Description("ListCommonSqlType2"), MaxLength(1000, ErrorMessage = "ListCommonSqlType2 不能超过 1000 个字符")] + public string ListCommonSqlType2 { get; set; } + + /// + /// ListComment + /// + [Display(Name = "ListComment"), Description("ListComment"), MaxLength(2000, ErrorMessage = "ListComment 不能超过 2000 个字符")] + public string ListComment { get; set; } + + /// + /// SelectSql + /// + [Display(Name = "SelectSql"), Description("SelectSql"), MaxLength(-1, ErrorMessage = "SelectSql 不能超过 -1 个字符")] + public string SelectSql { get; set; } + + /// + /// JsonTitle + /// + [Display(Name = "JsonTitle"), Description("JsonTitle"), MaxLength(-1, ErrorMessage = "JsonTitle 不能超过 -1 个字符")] + public string JsonTitle { get; set; } + + /// + /// WhereSql + /// + [Display(Name = "WhereSql"), Description("WhereSql"), MaxLength(-1, ErrorMessage = "WhereSql 不能超过 -1 个字符")] + public string WhereSql { get; set; } + + /// + /// OrderBySql + /// + [Display(Name = "OrderBySql"), Description("OrderBySql"), MaxLength(2000, ErrorMessage = "OrderBySql 不能超过 2000 个字符")] + public string OrderBySql { get; set; } + + /// + /// SqlTopCountSql + /// + [Display(Name = "SqlTopCountSql"), Description("SqlTopCountSql"), MaxLength(-1, ErrorMessage = "SqlTopCountSql 不能超过 -1 个字符")] + public string SqlTopCountSql { get; set; } + + /// + /// SqlGetIDSql + /// + [Display(Name = "SqlGetIDSql"), Description("SqlGetIDSql"), MaxLength(2000, ErrorMessage = "SqlGetIDSql 不能超过 2000 个字符")] + public string SqlGetIDSql { get; set; } + + /// + /// RemarkSz + /// + [Display(Name = "RemarkSz"), Description("RemarkSz"), MaxLength(2000, ErrorMessage = "RemarkSz 不能超过 2000 个字符")] + public string RemarkSz { get; set; } + + /// + /// SortNo + /// + public int? SortNo { get; set; } + + /// + /// IsDefault + /// + public int? IsDefault { get; set; } + + /// + /// Reverse1 + /// + [Display(Name = "Reverse1"), Description("Reverse1"), MaxLength(1000, ErrorMessage = "Reverse1 不能超过 1000 个字符")] + public string Reverse1 { get; set; } + + /// + /// Reverse2 + /// + [Display(Name = "Reverse2"), Description("Reverse2"), MaxLength(1000, ErrorMessage = "Reverse2 不能超过 1000 个字符")] + public string Reverse2 { get; set; } + + /// + /// Reverse3 + /// + [Display(Name = "Reverse3"), Description("Reverse3"), MaxLength(1000, ErrorMessage = "Reverse3 不能超过 1000 个字符")] + public string Reverse3 { get; set; } + + /// + /// Reverse4 + /// + [Display(Name = "Reverse4"), Description("Reverse4"), MaxLength(1000, ErrorMessage = "Reverse4 不能超过 1000 个字符")] + public string Reverse4 { get; set; } + + /// + /// Reverse5 + /// + [Display(Name = "Reverse5"), Description("Reverse5"), MaxLength(1000, ErrorMessage = "Reverse5 不能超过 1000 个字符")] + public string Reverse5 { get; set; } + + /// + /// Reverse6 + /// + [Display(Name = "Reverse6"), Description("Reverse6"), MaxLength(1000, ErrorMessage = "Reverse6 不能超过 1000 个字符")] + public string Reverse6 { get; set; } + + /// + /// Reverse7 + /// + [Display(Name = "Reverse7"), Description("Reverse7"), MaxLength(1000, ErrorMessage = "Reverse7 不能超过 1000 个字符")] + public string Reverse7 { get; set; } + + /// + /// Reverse8 + /// + [Display(Name = "Reverse8"), Description("Reverse8"), MaxLength(1000, ErrorMessage = "Reverse8 不能超过 1000 个字符")] + public string Reverse8 { get; set; } + + /// + /// Reverse9 + /// + [Display(Name = "Reverse9"), Description("Reverse9"), MaxLength(1000, ErrorMessage = "Reverse9 不能超过 1000 个字符")] + public string Reverse9 { get; set; } + + /// + /// SqlIDToName + /// + [Display(Name = "SqlIDToName"), Description("SqlIDToName"), MaxLength(2000, ErrorMessage = "SqlIDToName 不能超过 2000 个字符")] + public string SqlIDToName { get; set; } +} diff --git a/Tiobon.Core.Model/Edit/Ghrs/Ghrs_ListCommonSql.Dto.EditInput.cs b/Tiobon.Core.Model/Edit/Ghrs/Ghrs_ListCommonSql.Dto.EditInput.cs new file mode 100644 index 00000000..a22216b5 --- /dev/null +++ b/Tiobon.Core.Model/Edit/Ghrs/Ghrs_ListCommonSql.Dto.EditInput.cs @@ -0,0 +1,26 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghrs_ListCommonSql.cs +* +*功 能: N / A +* 类 名: Ghrs_ListCommonSql +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/27 11:37:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models; + + +/// +/// Ghrs_ListCommonSql (Dto.EditInput) +/// +public class EditGhrs_ListCommonSqlInput : Ghrs_ListCommonSqlBase +{ +} diff --git a/Tiobon.Core.Model/Insert/Ghrs/Ghrs_ListCommonSql.Dto.InsertInput.cs b/Tiobon.Core.Model/Insert/Ghrs/Ghrs_ListCommonSql.Dto.InsertInput.cs new file mode 100644 index 00000000..a000a7cd --- /dev/null +++ b/Tiobon.Core.Model/Insert/Ghrs/Ghrs_ListCommonSql.Dto.InsertInput.cs @@ -0,0 +1,26 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghrs_ListCommonSql.cs +* +*功 能: N / A +* 类 名: Ghrs_ListCommonSql +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/27 11:37:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models; + + +/// +/// Ghrs_ListCommonSql (Dto.InsertInput) +/// +public class InsertGhrs_ListCommonSqlInput : Ghrs_ListCommonSqlBase +{ +} diff --git a/Tiobon.Core.Model/Models/Ghrs/Ghrs_ListCommonSql.cs b/Tiobon.Core.Model/Models/Ghrs/Ghrs_ListCommonSql.cs new file mode 100644 index 00000000..83fad278 --- /dev/null +++ b/Tiobon.Core.Model/Models/Ghrs/Ghrs_ListCommonSql.cs @@ -0,0 +1,174 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghrs_ListCommonSql.cs +* +*功 能: N / A +* 类 名: Ghrs_ListCommonSql +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/27 11:37:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ +namespace Tiobon.Core.Model.Models; + + +/// +/// Ghrs_ListCommonSql (Model) +/// +[SugarTable("Ghrs_ListCommonSql", "Ghrs_ListCommonSql"), Entity(TableCnName = "Ghrs_ListCommonSql", TableName = "Ghrs_ListCommonSql")] +public class Ghrs_ListCommonSql : BasePoco1 +{ + + /// + /// ListCommonSqlId + /// + [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true), Display(Name = "表主键")] + public int? ListCommonSqlId { get; set; } + + /// + /// ListCommonSqlNo + /// + [Display(Name = "ListCommonSqlNo"), Description("ListCommonSqlNo"), MaxLength(1000, ErrorMessage = "ListCommonSqlNo 不能超过 1000 个字符")] + public string ListCommonSqlNo { get; set; } + + /// + /// ListCommonSqlName + /// + [Display(Name = "ListCommonSqlName"), Description("ListCommonSqlName"), MaxLength(1000, ErrorMessage = "ListCommonSqlName 不能超过 1000 个字符")] + public string ListCommonSqlName { get; set; } + + /// + /// ListCommonSqlType + /// + [Display(Name = "ListCommonSqlType"), Description("ListCommonSqlType"), MaxLength(1000, ErrorMessage = "ListCommonSqlType 不能超过 1000 个字符")] + public string ListCommonSqlType { get; set; } + + /// + /// ListCommonSqlType2 + /// + [Display(Name = "ListCommonSqlType2"), Description("ListCommonSqlType2"), MaxLength(1000, ErrorMessage = "ListCommonSqlType2 不能超过 1000 个字符")] + public string ListCommonSqlType2 { get; set; } + + /// + /// ListComment + /// + [Display(Name = "ListComment"), Description("ListComment"), MaxLength(2000, ErrorMessage = "ListComment 不能超过 2000 个字符")] + public string ListComment { get; set; } + + /// + /// SelectSql + /// + [Display(Name = "SelectSql"), Description("SelectSql"), MaxLength(-1, ErrorMessage = "SelectSql 不能超过 -1 个字符")] + public string SelectSql { get; set; } + + /// + /// JsonTitle + /// + [Display(Name = "JsonTitle"), Description("JsonTitle"), MaxLength(-1, ErrorMessage = "JsonTitle 不能超过 -1 个字符")] + public string JsonTitle { get; set; } + + /// + /// WhereSql + /// + [Display(Name = "WhereSql"), Description("WhereSql"), MaxLength(-1, ErrorMessage = "WhereSql 不能超过 -1 个字符")] + public string WhereSql { get; set; } + + /// + /// OrderBySql + /// + [Display(Name = "OrderBySql"), Description("OrderBySql"), MaxLength(2000, ErrorMessage = "OrderBySql 不能超过 2000 个字符")] + public string OrderBySql { get; set; } + + /// + /// SqlTopCountSql + /// + [Display(Name = "SqlTopCountSql"), Description("SqlTopCountSql"), MaxLength(-1, ErrorMessage = "SqlTopCountSql 不能超过 -1 个字符")] + public string SqlTopCountSql { get; set; } + + /// + /// SqlGetIDSql + /// + [Display(Name = "SqlGetIDSql"), Description("SqlGetIDSql"), MaxLength(2000, ErrorMessage = "SqlGetIDSql 不能超过 2000 个字符")] + public string SqlGetIDSql { get; set; } + + /// + /// RemarkSz + /// + [Display(Name = "RemarkSz"), Description("RemarkSz"), MaxLength(2000, ErrorMessage = "RemarkSz 不能超过 2000 个字符")] + public string RemarkSz { get; set; } + + /// + /// SortNo + /// + public int? SortNo { get; set; } + + /// + /// IsDefault + /// + public int? IsDefault { get; set; } + + /// + /// Reverse1 + /// + [Display(Name = "Reverse1"), Description("Reverse1"), MaxLength(1000, ErrorMessage = "Reverse1 不能超过 1000 个字符")] + public string Reverse1 { get; set; } + + /// + /// Reverse2 + /// + [Display(Name = "Reverse2"), Description("Reverse2"), MaxLength(1000, ErrorMessage = "Reverse2 不能超过 1000 个字符")] + public string Reverse2 { get; set; } + + /// + /// Reverse3 + /// + [Display(Name = "Reverse3"), Description("Reverse3"), MaxLength(1000, ErrorMessage = "Reverse3 不能超过 1000 个字符")] + public string Reverse3 { get; set; } + + /// + /// Reverse4 + /// + [Display(Name = "Reverse4"), Description("Reverse4"), MaxLength(1000, ErrorMessage = "Reverse4 不能超过 1000 个字符")] + public string Reverse4 { get; set; } + + /// + /// Reverse5 + /// + [Display(Name = "Reverse5"), Description("Reverse5"), MaxLength(1000, ErrorMessage = "Reverse5 不能超过 1000 个字符")] + public string Reverse5 { get; set; } + + /// + /// Reverse6 + /// + [Display(Name = "Reverse6"), Description("Reverse6"), MaxLength(1000, ErrorMessage = "Reverse6 不能超过 1000 个字符")] + public string Reverse6 { get; set; } + + /// + /// Reverse7 + /// + [Display(Name = "Reverse7"), Description("Reverse7"), MaxLength(1000, ErrorMessage = "Reverse7 不能超过 1000 个字符")] + public string Reverse7 { get; set; } + + /// + /// Reverse8 + /// + [Display(Name = "Reverse8"), Description("Reverse8"), MaxLength(1000, ErrorMessage = "Reverse8 不能超过 1000 个字符")] + public string Reverse8 { get; set; } + + /// + /// Reverse9 + /// + [Display(Name = "Reverse9"), Description("Reverse9"), MaxLength(1000, ErrorMessage = "Reverse9 不能超过 1000 个字符")] + public string Reverse9 { get; set; } + + /// + /// SqlIDToName + /// + [Display(Name = "SqlIDToName"), Description("SqlIDToName"), MaxLength(2000, ErrorMessage = "SqlIDToName 不能超过 2000 个字符")] + public string SqlIDToName { get; set; } +} diff --git a/Tiobon.Core.Model/Models/Ghrz/Ghrz_Shihua_OA_Employment.cs b/Tiobon.Core.Model/Models/Ghrz/Ghrz_Shihua_OA_Employment.cs index d41c75a4..2e375a02 100644 --- a/Tiobon.Core.Model/Models/Ghrz/Ghrz_Shihua_OA_Employment.cs +++ b/Tiobon.Core.Model/Models/Ghrz/Ghrz_Shihua_OA_Employment.cs @@ -34,6 +34,7 @@ public class Ghrz_Shihua_OA_Employment /// /// EmploymentID /// + [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = false), Display(Name = "表主键")] public int? EmploymentID { get; set; } /// diff --git a/Tiobon.Core.Model/View/Ghrs/Ghrs_ListCommonSql.Dto.View.cs b/Tiobon.Core.Model/View/Ghrs/Ghrs_ListCommonSql.Dto.View.cs new file mode 100644 index 00000000..1a99bae3 --- /dev/null +++ b/Tiobon.Core.Model/View/Ghrs/Ghrs_ListCommonSql.Dto.View.cs @@ -0,0 +1,34 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghrs_ListCommonSql.cs +* +*功 能: N / A +* 类 名: Ghrs_ListCommonSql +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/27 11:37:17 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models; + +/// +/// Ghrs_ListCommonSql(Dto.View1) +/// +public class Ghrs_ListCommonSqlDto : Ghrs_ListCommonSql +{ + /// + /// 创建信息 + /// + public string CreateDataInfo { get; set; } + + /// + /// 修改信息 + /// + public string UpdateDataInfo { get; set; } +} diff --git a/Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs b/Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs index c79ebdec..1f7eba9a 100644 --- a/Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs +++ b/Tiobon.Core.Model/ViewModels/Extend/ResumeTemplateGroupColumn.cs @@ -35,6 +35,13 @@ public class ResumeFormColumn1 public string ColumnType { get; set; } public string MapTableName { get; set; } public string MapColumnName { get; set; } + public string DataType { get; set; } + public string DataSourceType { get; set; } + public bool? IsRequired { get; set; } + + public string DataSource { get; set; } + public string DataSourceID { get; set; } + } diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index 50631a11..fa90628f 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -1,4 +1,5 @@ -using DinkToPdf; +using Amazon.Runtime.Internal.Transform; +using DinkToPdf; using DinkToPdf.Contracts; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; @@ -1222,7 +1223,8 @@ END"; resumeTemplateID = await Db.Ado.GetLongAsync("select top 1 Id from Ghrh_ResumeTemplate where IsEnable=1 and IsPublish=1"); var sql = @$"DECLARE @ResumeTemplateID BIGINT = {resumeTemplateID} - SELECT A.ColumnName, A.ResumeInfoColumnName ColumnNameDesc, D.GroupType, A.MapTableName, A.MapColumnName + SELECT A.ColumnName, A.ResumeInfoColumnName ColumnNameDesc, D.GroupType, A.MapTableName, A.MapColumnName, +A.DataType, A.ColumnType, A.IsRequired, A.DataSourceType, A.DataSource, A.DataSourceID FROM Ghrh_ResumeInfoColumn A LEFT JOIN Ghrh_ResumeTemplateInfoGroupColumn B ON B.ResumeInfoColumnID = A.ID @@ -3681,6 +3683,9 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 var resume = await base.QuerySingle(x => x.IdCardNo == data.IDCardNo); + if (resume is null) + continue; + var deptId = (await Db.Queryable().Where(x => x.DeptNo == data.DeptNo).FirstAsync())?.DeptID; var titleId = (await Db.Queryable().Where(x => x.TitleNo == data.TitleNo).FirstAsync())?.TitleID; var gradeId = (await Db.Queryable().Where(x => x.GradeNo == data.GradeNo).FirstAsync())?.GradeID; @@ -3870,6 +3875,11 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 #endregion if (items.Any()) await Db.Insertable(items).ExecuteCommandAsync(); + + await Db.Updateable() + .SetColumns(it => new Ghrz_Shihua_OA_Employment() { IsRead = 1 }) + .Where(it => it.EmploymentID == data.EmploymentID) + .ExecuteCommandAsync(); } } catch (Exception E) @@ -3984,6 +3994,221 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 } #endregion + #region Excel导入 + public override async Task> DownloadExcel(string menuName) + { + var physicsPath = $"{Environment.CurrentDirectory}{Path.DirectorySeparatorChar}wwwroot"; + var path = $"{$"{Path.DirectorySeparatorChar}files{Path.DirectorySeparatorChar}ExcelTemplate{Path.DirectorySeparatorChar}"}"; + if (!Directory.Exists(physicsPath + path)) + Directory.CreateDirectory(physicsPath + path); + + Type entityType = typeof(Ghre_Teacher); + + DataTable dt = new DataTable("TempTable"); + + var formColumns = await QueryResumeFormColumn(); + string fileName = path + SnowFlakeSingle.instance.getID() + ".xlsx"; + + formColumns.Where(x => x.GroupType == "Base") + .ToList() + .ForEach(x => + { + if (!dt.Columns.Contains(x.ColumnNameDesc)) + dt.Columns.Add(x.ColumnNameDesc, typeof(string)); + }); + + var dr = dt.NewRow(); + dt.Rows.Add(dr); + NPOIHelper.ExportExcel(dt, null, "简历导入模板", physicsPath + fileName); + + var physicsPath1 = physicsPath + fileName; + //if (dataSourceLists.Any()) + // physicsPath1 = physicsPath + path + newFileName; + var result = ServiceResult.OprateSuccess("简历导入模板_" + DateTimeHelper.ConvertToSecondString1(DateTime.Now) + ".xlsx", physicsPath1); + return result; + } + public override async Task> ImportExcel(IFormFile file, string menuName = null, long? MasterId = null) + { + var data = new ExcelData(); + long id = SnowFlakeSingle.instance.getID(); + var physicsPath = $"{Environment.CurrentDirectory}{Path.DirectorySeparatorChar}wwwroot"; + var path = $"{$"{Path.DirectorySeparatorChar}files{Path.DirectorySeparatorChar}import{Path.DirectorySeparatorChar}{id}{Path.DirectorySeparatorChar}"}"; + if (!Directory.Exists(physicsPath + path)) + Directory.CreateDirectory(physicsPath + path); + + var filepath = physicsPath + path + file.FileName; + using (var stream = File.Create(filepath)) + { + await file.CopyToAsync(stream); + } + string extension = Path.GetExtension(filepath); + + bool isExistError = false; + var id1 = SnowFlakeSingle.instance.getID(); + string errorFileName = path + SnowFlakeSingle.instance.getID() + extension; + + var dt = NPOIHelper.ImportExcel(filepath, "简历导入模板"); + if (dt.Columns["Comments"] == null) + dt.Columns.Add("Comments", typeof(string)); + + var formColumns = await QueryResumeFormColumn(); + + formColumns = formColumns.Where(x => x.GroupType == "Base") + .ToList(); + for (int i = 0; i < dt.Rows.Count; i++) + { + var comments = new List(); + bool isContinue = false; + + var dict = new Dictionary + { + { "Id", SnowFlakeSingle.Instance.NextId() }, + { "CreateBy", App.User.ID }, + { "CreateTime", DateTime.Now }, + { "UpdateTime", DateTime.Now } + }; + + + formColumns.ForEach(x => + { + if (!dt.Columns.Contains(x.ColumnNameDesc)) + { + comments.Add("未查询到【" + x.ColumnNameDesc + "】列!"); + data.ErrorCount++; + dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); + isExistError = true; + isContinue = true; + } + }); + + if (isContinue) + continue; + + for (int j = 0; j < formColumns.Count; j++) + { + var column = formColumns[j]; + var value = dt.Rows[i][column.ColumnNameDesc].ToString(); + if (column.IsRequired == true && value.IsNullOrEmpty()) + { + comments.Add(column.ColumnNameDesc + "不能为空!"); + data.ErrorCount++; + dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); + isExistError = true; + continue; + } + if (column.DataSourceType.IsNullOrEmpty()) + { + if (column.DataType == "int" || column.DataType == "decimal") + { + try + { + Convert.ToInt64(value); + } + catch (Exception) + { + comments.Add(column.ColumnNameDesc + "无效的数字类型!"); + data.ErrorCount++; + dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); + isExistError = true; + continue; + } + } + else if (column.DataType == "date") + { + try + { + Convert.ToDateTime(value); + } + catch (Exception) + { + comments.Add(column.ColumnNameDesc + "无效的日期类型!"); + data.ErrorCount++; + dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); + isExistError = true; + continue; + } + } + } + if (value.IsNotEmptyOrNull()) + { + if (column.DataSource.IsNotEmptyOrNull() && column.DataSourceType.IsNotEmptyOrNull()) + { + + if (column.DataSourceType == "CommonList") + { + var commonSql = await Db.Queryable().Where(x => x.ListCommonSqlId == column.DataSource.ObjToInt()).FirstAsync(); + + if (commonSql != null) + { + string sql = @$"SELECT [value] + FROM ({commonSql.SelectSql}) A + WHERE label = '{value}'"; + sql = sql.Replace("{@LangID}", "1"); + var id2 = await Db.Ado.GetLongAsync(sql); + + dict.Add(column.ColumnName, id2); + } + } + else if (column.DataSourceType == "ParaDetailNo") + { + var sql = @$"SELECT ParaDetailNo + FROM Ghrs_ParaDetail + WHERE ParaMasterId IN (SELECT ParaMasterId + FROM Ghrs_ParaMaster + WHERE ParaMasterId = {column.DataSource.ObjToInt()}) + AND IsEnable = 1 + AND ParaDetailName = '{value}'"; + var id2 = await Db.Ado.GetStringAsync(sql); + + dict.Add(column.ColumnName, id2); + } + } + else + dict.Add(column.ColumnName, value); + } + } + + if (dict.ContainsKey("IdCardNo")) + { + if (await base.AnyAsync(x => x.IdCardNo == dict["IdCardNo"].ToString())) + { + comments.Add("证件号码不能重复!"); + data.ErrorCount++; + dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); + isExistError = true; + continue; + } + } + + if (isExistError) + continue; + try + { + dict.Add("Status", "WaitRecommended"); + dict.Add("ApplicationStatus", "Submit"); + await Db.Insertable(dict).AS("Ghrh_Resume").ExecuteCommandAsync(); + data.SuccessCount++; + //data.SuccessCount += list.Count; + } + catch (Exception E) + { + comments.Add(E.Message); + data.ErrorCount++; + dt.Rows[i]["Comments"] = string.Join(";", comments.Select(a => a)); + isExistError = true; + continue; + } + } + if (isExistError) + { + NPOIHelper.ExportExcel(dt, null, "简历导入模板", physicsPath + errorFileName); + data.filePath = "/Advanced" + errorFileName; + } + + return ServiceResult.OprateSuccess("导入成功!", data); + } + #endregion + #region 通用方法 /// /// 记录日志 diff --git a/Tiobon.Core.Services/Ghrs/Ghrs_ListCommonSqlServices.cs b/Tiobon.Core.Services/Ghrs/Ghrs_ListCommonSqlServices.cs new file mode 100644 index 00000000..ddd37d08 --- /dev/null +++ b/Tiobon.Core.Services/Ghrs/Ghrs_ListCommonSqlServices.cs @@ -0,0 +1,15 @@ +namespace Tiobon.Core.Services; + +/// +/// Ghrs_ListCommonSql (服务) +/// +public class Ghrs_ListCommonSqlServices : BaseServices, IGhrs_ListCommonSqlServices +{ + private readonly IBaseRepository _dal; + public Ghrs_ListCommonSqlServices(ICaching caching, IBaseRepository dal) + { + this._dal = dal; + base.BaseDal = dal; + base._caching = caching; + } +} \ No newline at end of file