111
This commit is contained in:
@@ -11,9 +11,9 @@
|
||||
namespace SimpleAdmin.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 审核通过后生成的正式员工档案,是入职流程的最终业务数据。
|
||||
/// 审核通过后生成的员工档案,是入职流程的最终业务数据。
|
||||
/// </summary>
|
||||
[SugarTable("ob_employee", TableDescription = "正式员工档案")]
|
||||
[SugarTable("ob_employee", TableDescription = "员工档案")]
|
||||
[Tenant(SqlSugarConst.DB_DEFAULT)]
|
||||
public class ObEmployee : BaseEntity
|
||||
{
|
||||
@@ -59,6 +59,21 @@ public class ObEmployee : BaseEntity
|
||||
/// </summary>
|
||||
public long PositionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用工类型:full_time 正式用工,part_time 兼职用工。
|
||||
/// </summary>
|
||||
public string EmploymentType { get; set; } = EmployeeEmploymentType.FullTime;
|
||||
|
||||
/// <summary>
|
||||
/// 转正状态:probation 试用期、regular 已转正、not_applicable 不适用。
|
||||
/// </summary>
|
||||
public string RegularizationStatus { get; set; } = EmployeeRegularizationStatus.Probation;
|
||||
|
||||
/// <summary>
|
||||
/// 社保状态:unknown 未维护、not_purchased 未购买、purchased 已购买、stopped 已停保、not_applicable 不适用。
|
||||
/// </summary>
|
||||
public string SocialInsuranceStatus { get; set; } = EmployeeSocialInsuranceStatus.Unknown;
|
||||
|
||||
/// <summary>
|
||||
/// 所属岗位名称,仅用于接口展示,不映射数据库字段。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace SimpleAdmin.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 员工人事材料附件,可关联转正记录及后续扩展的人事业务。
|
||||
/// </summary>
|
||||
[SugarTable("ob_employee_attachment", TableDescription = "员工人事材料附件")]
|
||||
[Tenant(SqlSugarConst.DB_DEFAULT)]
|
||||
public class ObEmployeeAttachment : BaseEntity
|
||||
{
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public long? ChangeRecordId { get; set; }
|
||||
|
||||
public string BusinessType { get; set; }
|
||||
|
||||
public long FileId { get; set; }
|
||||
|
||||
public string FileName { get; set; }
|
||||
|
||||
public DateTime UploadedAt { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string FileSuffix { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string FileSizeInfo { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
namespace SimpleAdmin.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 员工人事信息变更记录,保留转正及后续扩展业务的前后快照。
|
||||
/// </summary>
|
||||
[SugarTable("ob_employee_change_record", TableDescription = "员工人事信息变更记录")]
|
||||
[Tenant(SqlSugarConst.DB_DEFAULT)]
|
||||
public class ObEmployeeChangeRecord : BaseEntity
|
||||
{
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
public string ChangeType { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public DateTime? EffectiveDate { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
|
||||
public string BeforeJson { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
|
||||
public string AfterJson { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<ObEmployeeAttachment> Attachments { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
namespace SimpleAdmin.Application;
|
||||
|
||||
/// <summary>
|
||||
/// 正式员工的一份合同在审核建档时冻结的业务快照。
|
||||
/// 常用日期和薪资使用独立列,全部标准及自定义变量同时保存在 VariablesJson 中。
|
||||
/// </summary>
|
||||
[SugarTable("ob_employee_contract_snapshot", TableDescription = "员工合同快照")]
|
||||
[Tenant(SqlSugarConst.DB_DEFAULT)]
|
||||
public class ObEmployeeContractSnapshot : BaseEntity
|
||||
{
|
||||
/// <summary>正式员工 Id。</summary>
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
/// <summary>来源入职任务 Id。</summary>
|
||||
public long TaskId { get; set; }
|
||||
|
||||
/// <summary>来源任务合同 Id,同一任务合同只允许生成一份员工快照。</summary>
|
||||
public long TaskContractId { get; set; }
|
||||
|
||||
/// <summary>合同模板 Id。</summary>
|
||||
public long TemplateId { get; set; }
|
||||
|
||||
/// <summary>合同模板版本 Id。</summary>
|
||||
public long TemplateVersionId { get; set; }
|
||||
|
||||
/// <summary>合同名称快照。</summary>
|
||||
public string ContractName { get; set; }
|
||||
|
||||
/// <summary>合同类型快照。</summary>
|
||||
public string ContractType { get; set; }
|
||||
|
||||
/// <summary>合同开始日期。</summary>
|
||||
public DateTime? ContractStartDate { get; set; }
|
||||
|
||||
/// <summary>合同结束日期。</summary>
|
||||
public DateTime? ContractEndDate { get; set; }
|
||||
|
||||
/// <summary>合同期限原始文本。</summary>
|
||||
public string ContractTerm { get; set; }
|
||||
|
||||
/// <summary>试用期开始日期。</summary>
|
||||
public DateTime? ProbationStartDate { get; set; }
|
||||
|
||||
/// <summary>试用期结束日期。</summary>
|
||||
public DateTime? ProbationEndDate { get; set; }
|
||||
|
||||
/// <summary>试用期期限原始文本。</summary>
|
||||
public string ProbationTerm { get; set; }
|
||||
|
||||
/// <summary>明确使用 hr.ProbationSalary 保存的试用薪资;不从其他工资项目推算。</summary>
|
||||
public decimal? ProbationSalary { get; set; }
|
||||
|
||||
/// <summary>基本工资。</summary>
|
||||
public decimal? BaseSalary { get; set; }
|
||||
|
||||
/// <summary>岗位工资。</summary>
|
||||
public decimal? PositionSalary { get; set; }
|
||||
|
||||
/// <summary>绩效津贴。</summary>
|
||||
public decimal? PerformanceAllowance { get; set; }
|
||||
|
||||
/// <summary>全勤奖。</summary>
|
||||
public decimal? AttendanceBonus { get; set; }
|
||||
|
||||
/// <summary>转正后薪资。</summary>
|
||||
public decimal? RegularSalary { get; set; }
|
||||
|
||||
/// <summary>工作地点或城市。</summary>
|
||||
public string WorkCity { get; set; }
|
||||
|
||||
/// <summary>合同中的岗位名称。</summary>
|
||||
public string PositionName { get; set; }
|
||||
|
||||
/// <summary>合同中的员工工号。</summary>
|
||||
public string EmployeeNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 以 VariableCode 为键保存该合同当时的全部变量元数据和值。
|
||||
/// 导出时通过稳定编码判断变量是否存在,不依赖可修改的中文名称。
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "json", IsNullable = false)]
|
||||
public string VariablesJson { get; set; }
|
||||
|
||||
/// <summary>快照结构版本。</summary>
|
||||
public int SnapshotVersion { get; set; } = 1;
|
||||
|
||||
/// <summary>快照生成时间。</summary>
|
||||
public DateTime SnapshotAt { get; set; }
|
||||
}
|
||||
@@ -33,6 +33,11 @@ public class ObOnboardingTask : BaseEntity
|
||||
/// </summary>
|
||||
public long PositionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用工类型:full_time 正式用工,part_time 兼职用工。
|
||||
/// </summary>
|
||||
public string EmploymentType { get; set; } = EmployeeEmploymentType.FullTime;
|
||||
|
||||
/// <summary>
|
||||
/// 创建任务时锁定的入职模板 Id。
|
||||
/// </summary>
|
||||
@@ -106,4 +111,4 @@ public class ObOnboardingTask : BaseEntity
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public string OnboardingTemplateName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public static class OnboardingTaskStatus
|
||||
public const string Rejected = "rejected";
|
||||
|
||||
/// <summary>
|
||||
/// 已通过,系统已经生成正式员工档案。
|
||||
/// 已通过,系统已经生成员工档案。
|
||||
/// </summary>
|
||||
public const string Approved = "approved";
|
||||
|
||||
@@ -144,6 +144,55 @@ public static class TaskContractStatus
|
||||
public const string Archived = "archived";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 员工用工类型。
|
||||
/// </summary>
|
||||
public static class EmployeeEmploymentType
|
||||
{
|
||||
public const string FullTime = "full_time";
|
||||
public const string PartTime = "part_time";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 员工转正状态,仅由后台人事操作改变,不根据合同日期自动推算。
|
||||
/// </summary>
|
||||
public static class EmployeeRegularizationStatus
|
||||
{
|
||||
public const string Probation = "probation";
|
||||
public const string Regular = "regular";
|
||||
public const string NotApplicable = "not_applicable";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 员工社保状态。
|
||||
/// </summary>
|
||||
public static class EmployeeSocialInsuranceStatus
|
||||
{
|
||||
public const string Unknown = "unknown";
|
||||
public const string NotPurchased = "not_purchased";
|
||||
public const string Purchased = "purchased";
|
||||
public const string Stopped = "stopped";
|
||||
public const string NotApplicable = "not_applicable";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 员工人事变更类型。
|
||||
/// </summary>
|
||||
public static class EmployeeChangeType
|
||||
{
|
||||
public const string HrInfoUpdate = "hr_info_update";
|
||||
public const string Regularization = "regularization";
|
||||
public const string RegularizationRevoke = "regularization_revoke";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 员工附件业务类型。
|
||||
/// </summary>
|
||||
public static class EmployeeAttachmentBusinessType
|
||||
{
|
||||
public const string Regularization = "regularization";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 电子签服务商。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user