diff --git a/Tiobon.Core.Api/Controllers/Ghra/Ghra_StaffWorkExpController.cs b/Tiobon.Core.Api/Controllers/Ghra/Ghra_StaffWorkExpController.cs new file mode 100644 index 00000000..99a4cd62 --- /dev/null +++ b/Tiobon.Core.Api/Controllers/Ghra/Ghra_StaffWorkExpController.cs @@ -0,0 +1,14 @@ +namespace Tiobon.Core.Api.Controllers; + +/// +/// Ghra_StaffWorkExp(Controller) +/// +[Route("api/[controller]")] +[ApiController, GlobalActionFilter] +[Authorize(Permissions.Name), ApiExplorerSettings(GroupName = Grouping.GroupName_Ghra)] +public class Ghra_StaffWorkExpController : BaseController +{ + public Ghra_StaffWorkExpController(IGhra_StaffWorkExpServices 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 bb940093..6fe825a2 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -1274,6 +1274,121 @@ Reverse5 + + + Ghra_StaffWorkExp (Dto.Base) + + + + + 工作经历ID + + + + + 员工ID + + + + + 开始日期 + + + + + 结束日 + + + + + 公司名 + + + + + 部门名 + + + + + 职称名 + + + + + 公司内 + + + + + 计算年资 + + + + + 本业 + + + + + 年资 + + + + + 离职原因 + + + + + 薪资 + + + + + AttachmentIDs + + + + + RemarkSz + + + + + SortNo + + + + + IsDefault + + + + + Reverse1 + + + + + Reverse2 + + + + + Reverse3 + + + + + Reverse4 + + + + + Reverse5 + + Ghra_Title (Dto.Base) @@ -11267,6 +11382,11 @@ Ghra_StaffTraining (Dto.EditInput) + + + Ghra_StaffWorkExp (Dto.EditInput) + + Ghra_Title (Dto.EditInput) @@ -11677,6 +11797,11 @@ Ghra_StaffTraining (Dto.InsertInput) + + + Ghra_StaffWorkExp (Dto.InsertInput) + + Ghra_Title (Dto.InsertInput) @@ -13498,6 +13623,121 @@ Reverse5 + + + Ghra_StaffWorkExp (Model) + + + + + 工作经历ID + + + + + 员工ID + + + + + 开始日期 + + + + + 结束日 + + + + + 公司名 + + + + + 部门名 + + + + + 职称名 + + + + + 公司内 + + + + + 计算年资 + + + + + 本业 + + + + + 年资 + + + + + 离职原因 + + + + + 薪资 + + + + + AttachmentIDs + + + + + RemarkSz + + + + + SortNo + + + + + IsDefault + + + + + Reverse1 + + + + + Reverse2 + + + + + Reverse3 + + + + + Reverse4 + + + + + Reverse5 + + Ghra_Title (Model) @@ -24362,6 +24602,21 @@ 修改信息 + + + Ghra_StaffWorkExp(Dto.View1) + + + + + 创建信息 + + + + + 修改信息 + + Ghra_Title(Dto.View) diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 74e73fe5..c7af8d54 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -716,6 +716,11 @@ Ghra_StaffTraining(Controller) + + + Ghra_StaffWorkExp(Controller) + + Ghra_Title(Controller) diff --git a/Tiobon.Core.IServices/Ghra/IGhra_StaffWorkExpServices.cs b/Tiobon.Core.IServices/Ghra/IGhra_StaffWorkExpServices.cs new file mode 100644 index 00000000..54be65b6 --- /dev/null +++ b/Tiobon.Core.IServices/Ghra/IGhra_StaffWorkExpServices.cs @@ -0,0 +1,12 @@ +using Tiobon.Core.IServices.BASE; +using Tiobon.Core.Model.Models; + +namespace Tiobon.Core.IServices +{ + /// + /// Ghra_StaffWorkExp(自定义服务接口) + /// + public interface IGhra_StaffWorkExpServices :IBaseServices + { + } +} \ No newline at end of file diff --git a/Tiobon.Core.Model/Base/Ghra/Ghra_StaffWorkExp.Dto.Base.cs b/Tiobon.Core.Model/Base/Ghra/Ghra_StaffWorkExp.Dto.Base.cs new file mode 100644 index 00000000..3e3c647b --- /dev/null +++ b/Tiobon.Core.Model/Base/Ghra/Ghra_StaffWorkExp.Dto.Base.cs @@ -0,0 +1,152 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghra_StaffWorkExp.cs +* +*功 能: N / A +* 类 名: Ghra_StaffWorkExp +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/6 14:37:21 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace Tiobon.Core.Model.Models +{ + + /// + /// Ghra_StaffWorkExp (Dto.Base) + /// + public class Ghra_StaffWorkExpBase + { + + /// + /// 工作经历ID + /// + public int? StaffWorkExpID { get; set; } + + /// + /// 员工ID + /// + public int? StaffID { get; set; } + + /// + /// 开始日期 + /// + public DateTime? BeginDate { get; set; } + + /// + /// 结束日 + /// + public DateTime? EndDate { get; set; } + + /// + /// 公司名 + /// + [Display(Name = "CompanyName"), Description("公司名"), MaxLength(1000, ErrorMessage = "公司名 不能超过 1000 个字符")] + public string CompanyName { get; set; } + + /// + /// 部门名 + /// + [Display(Name = "DeptName"), Description("部门名"), MaxLength(1000, ErrorMessage = "部门名 不能超过 1000 个字符")] + public string DeptName { get; set; } + + /// + /// 职称名 + /// + [Display(Name = "TitleName"), Description("职称名"), MaxLength(1000, ErrorMessage = "职称名 不能超过 1000 个字符")] + public string TitleName { get; set; } + + /// + /// 公司内 + /// + public int? IsCompany { get; set; } + + /// + /// 计算年资 + /// + public int? IsCalSeniority { get; set; } + + /// + /// 本业 + /// + public int? IsBase { get; set; } + + /// + /// 年资 + /// + [Display(Name = "Seniority"), Description("年资"), Column(TypeName = "decimal(18,2)")] + public decimal? Seniority { get; set; } + + /// + /// 离职原因 + /// + [Display(Name = "SeparationReason"), Description("离职原因"), MaxLength(1000, ErrorMessage = "离职原因 不能超过 1000 个字符")] + public string SeparationReason { get; set; } + + /// + /// 薪资 + /// + [Display(Name = "SalaryAmount"), Description("薪资"), Column(TypeName = "decimal(18,2)")] + public decimal? SalaryAmount { get; set; } + + /// + /// AttachmentIDs + /// + [Display(Name = "AttachmentIDs"), Description("AttachmentIDs"), MaxLength(-1, ErrorMessage = "AttachmentIDs 不能超过 -1 个字符")] + public string AttachmentIDs { 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; } + } +} diff --git a/Tiobon.Core.Model/Edit/Ghra/Ghra_StaffWorkExp.Dto.EditInput.cs b/Tiobon.Core.Model/Edit/Ghra/Ghra_StaffWorkExp.Dto.EditInput.cs new file mode 100644 index 00000000..906fda20 --- /dev/null +++ b/Tiobon.Core.Model/Edit/Ghra/Ghra_StaffWorkExp.Dto.EditInput.cs @@ -0,0 +1,27 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghra_StaffWorkExp.cs +* +*功 能: N / A +* 类 名: Ghra_StaffWorkExp +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/6 14:37:21 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models +{ + + /// + /// Ghra_StaffWorkExp (Dto.EditInput) + /// + public class EditGhra_StaffWorkExpInput : Ghra_StaffWorkExpBase + { + } +} diff --git a/Tiobon.Core.Model/Insert/Ghra/Ghra_StaffWorkExp.Dto.InsertInput.cs b/Tiobon.Core.Model/Insert/Ghra/Ghra_StaffWorkExp.Dto.InsertInput.cs new file mode 100644 index 00000000..732e8950 --- /dev/null +++ b/Tiobon.Core.Model/Insert/Ghra/Ghra_StaffWorkExp.Dto.InsertInput.cs @@ -0,0 +1,27 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghra_StaffWorkExp.cs +* +*功 能: N / A +* 类 名: Ghra_StaffWorkExp +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/6 14:37:21 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models +{ + + /// + /// Ghra_StaffWorkExp (Dto.InsertInput) + /// + public class InsertGhra_StaffWorkExpInput : Ghra_StaffWorkExpBase + { + } +} diff --git a/Tiobon.Core.Model/Models/Ghra/Ghra_StaffWorkExp.cs b/Tiobon.Core.Model/Models/Ghra/Ghra_StaffWorkExp.cs new file mode 100644 index 00000000..8cd3b674 --- /dev/null +++ b/Tiobon.Core.Model/Models/Ghra/Ghra_StaffWorkExp.cs @@ -0,0 +1,150 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghra_StaffWorkExp.cs +* +*功 能: N / A +* 类 名: Ghra_StaffWorkExp +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/6 14:37:21 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ +namespace Tiobon.Core.Model.Models; + + +/// +/// Ghra_StaffWorkExp (Model) +/// +[SugarTable("Ghra_StaffWorkExp", "Ghra_StaffWorkExp"), Entity(TableCnName = "Ghra_StaffWorkExp", TableName = "Ghra_StaffWorkExp")] +public class Ghra_StaffWorkExp : BasePoco1 +{ + + /// + /// 工作经历ID + /// + [SugarColumn(IsNullable = false, IsPrimaryKey = true, IsIdentity = true), Display(Name = "表主键")] + public int? StaffWorkExpID { get; set; } + + /// + /// 员工ID + /// + public int? StaffID { get; set; } + + /// + /// 开始日期 + /// + public DateTime? BeginDate { get; set; } + + /// + /// 结束日 + /// + public DateTime? EndDate { get; set; } + + /// + /// 公司名 + /// + [Display(Name = "CompanyName"), Description("公司名"), MaxLength(1000, ErrorMessage = "公司名 不能超过 1000 个字符")] + public string CompanyName { get; set; } + + /// + /// 部门名 + /// + [Display(Name = "DeptName"), Description("部门名"), MaxLength(1000, ErrorMessage = "部门名 不能超过 1000 个字符")] + public string DeptName { get; set; } + + /// + /// 职称名 + /// + [Display(Name = "TitleName"), Description("职称名"), MaxLength(1000, ErrorMessage = "职称名 不能超过 1000 个字符")] + public string TitleName { get; set; } + + /// + /// 公司内 + /// + public int? IsCompany { get; set; } + + /// + /// 计算年资 + /// + public int? IsCalSeniority { get; set; } + + /// + /// 本业 + /// + public int? IsBase { get; set; } + + /// + /// 年资 + /// + [Display(Name = "Seniority"), Description("年资"), Column(TypeName = "decimal(18,2)")] + public decimal? Seniority { get; set; } + + /// + /// 离职原因 + /// + [Display(Name = "SeparationReason"), Description("离职原因"), MaxLength(1000, ErrorMessage = "离职原因 不能超过 1000 个字符")] + public string SeparationReason { get; set; } + + /// + /// 薪资 + /// + [Display(Name = "SalaryAmount"), Description("薪资"), Column(TypeName = "decimal(18,2)")] + public decimal? SalaryAmount { get; set; } + + /// + /// AttachmentIDs + /// + [Display(Name = "AttachmentIDs"), Description("AttachmentIDs"), MaxLength(-1, ErrorMessage = "AttachmentIDs 不能超过 -1 个字符")] + public string AttachmentIDs { 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; } +} diff --git a/Tiobon.Core.Model/View/Ghra/Ghra_StaffWorkExp.Dto.View.cs b/Tiobon.Core.Model/View/Ghra/Ghra_StaffWorkExp.Dto.View.cs new file mode 100644 index 00000000..41ec9eda --- /dev/null +++ b/Tiobon.Core.Model/View/Ghra/Ghra_StaffWorkExp.Dto.View.cs @@ -0,0 +1,34 @@ +/* 代码由框架生成,任何更改都可能导致被代码生成器覆盖,可自行修改。 +* Ghra_StaffWorkExp.cs +* +*功 能: N / A +* 类 名: Ghra_StaffWorkExp +* +* Ver 变更日期 负责人 变更内容 +* ─────────────────────────────────── +*V0.01 2024/12/6 14:37:21 SimonHsiao 初版 +* +* Copyright(c) 2024 Tiobon Corporation. All Rights Reserved. +*┌──────────────────────────────────┐ +*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │ +*│ 作者:SimonHsiao │ +*└──────────────────────────────────┘ +*/ + +namespace Tiobon.Core.Model.Models; + +/// +/// Ghra_StaffWorkExp(Dto.View1) +/// +public class Ghra_StaffWorkExpDto : Ghra_StaffWorkExp +{ +/// +/// 创建信息 +/// +public string CreateDataInfo { get; set; } + +/// +/// 修改信息 +/// +public string UpdateDataInfo { get; set; } +} diff --git a/Tiobon.Core.Services/Ghra/Ghra_StaffWorkExpServices.cs b/Tiobon.Core.Services/Ghra/Ghra_StaffWorkExpServices.cs new file mode 100644 index 00000000..9c89c285 --- /dev/null +++ b/Tiobon.Core.Services/Ghra/Ghra_StaffWorkExpServices.cs @@ -0,0 +1,23 @@ + +using Tiobon.Core.IServices; +using Tiobon.Core.Model.Models; +using Tiobon.Core.Services.BASE; +using Tiobon.Core.IRepository.Base; +using Tiobon.Core.Common.Caches; + +namespace Tiobon.Core.Services +{ + /// + /// Ghra_StaffWorkExp (服务) + /// + public class Ghra_StaffWorkExpServices : BaseServices, IGhra_StaffWorkExpServices + { + private readonly IBaseRepository _dal; + public Ghra_StaffWorkExpServices(ICaching caching, IBaseRepository dal) + { + this._dal = dal; + base.BaseDal = dal; + base._caching = caching; + } + } +} \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index a3223c7e..5893663b 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -3155,7 +3155,36 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 AND C.Status = A.Status"; #region 工作经历 var workExps = await _ghrh_ResumeWorkExpServices.QueryDto(x => x.ResumeId != null && x.ResumeId == id); + for (int i = 0; i < workExps.Count; i++) + { + var workExp = workExps[i]; + var staffEduBG = new Ghra_StaffWorkExp() + { + StaffID = staffId, + BeginDate = workExp.BeginDate, + EndDate = workExp.EndDate, + CompanyName = workExp.CompanyName, + TitleName = workExp.TitleName, + //IsCompany = workExp.IsCompany, + SalaryAmount = workExp.SalaryAmount, + SeparationReason = workExp.SeparationReason, + RemarkSz = workExp.RemarkSz + }; + var staffworkExpId = await Db.Insertable(staffEduBG).ExecuteReturnIdentityAsync(); + var attachments = await Db.Queryable().Where(x => x.TableName == workExp.Id.ObjToString()).ToListAsync(); + if (attachments.Any()) + { + attachments.ForEach(x => + { + x.CreateTime = DateTime.Now; + x.TableName = "Ghra_StaffWorkExp"; + x.StaffID = staffId; + x.TableKeyID = staffworkExpId; + }); + await Db.Insertable(attachments).ExecuteReturnIdentityAsync(); + } + } #endregion #region 证件