From b495fa9f03462cf6007e1e035a7ed8abe5382c1c Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期四, 14 八月 2025 13:59:36 +0800 Subject: [PATCH] feat:开发 --- FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/ImportEnterpriseEmployeesCommand.cs | 87 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 86 insertions(+), 1 deletions(-) diff --git a/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/ImportEnterpriseEmployeesCommand.cs b/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/ImportEnterpriseEmployeesCommand.cs index f47b21b..baa4661 100644 --- a/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/ImportEnterpriseEmployeesCommand.cs +++ b/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/ImportEnterpriseEmployeesCommand.cs @@ -1,6 +1,10 @@ 锘縰sing MediatR; +using Microsoft.AspNetCore.Http; +using MiniExcelLibs.Attributes; +using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -11,11 +15,92 @@ /// 瀵煎叆鐏靛伐淇℃伅 /// </summary> [Resource([EnumResourceController.EnterpriseEmployee])] - public class ImportEnterpriseEmployeesCommand : IRequest<int> + public class ImportEnterpriseEmployeesCommand : IRequest<ImportEnterpriseEmployeesCommandResult> { /// <summary> /// Excel鍦板潃 /// </summary> public string ExcelUrl { get; set; } } + + /// <summary> + /// 瀵煎叆鐏靛伐淇℃伅-妯℃澘 + /// </summary> + public class ImportEnterpriseEmployeesCommandModel + { + /// <summary> + /// 濮撳悕 + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鎵嬫満鍙� + /// </summary> + public string ContactPhoneNumber { get; set; } + + /// <summary> + /// 韬唤璇佸彿 + /// </summary> + public string Identity { get; set; } + + /// <summary> + /// 鐢熸棩 + /// </summary> + [JsonIgnore] + public DateTime? Birthday { get; set; } + + /// <summary> + /// 骞撮緞 + /// </summary> + [JsonIgnore] + public int? Age { get; set; } + + /// <summary> + /// 鎬у埆 + /// </summary> + [JsonIgnore] + public EnumUserGender? Gender { get; set; } + } + + /// <summary> + /// 瀵煎叆鐏靛伐淇℃伅-缁撴灉 + /// </summary> + public class ImportEnterpriseEmployeesCommandResult + { + public ImportEnterpriseEmployeesCommandResult() + { + Errors = []; + } + + /// <summary> + /// 鎬绘暟 + /// </summary> + public int TotalCount { get; set; } + + /// <summary> + /// 鎴愬姛鏁伴噺 + /// </summary> + public int SuccessCount { get; set; } + + /// <summary> + /// 澶辫触鏁伴噺 + /// </summary> + public int FailCount { get; set; } + + /// <summary> + /// 閿欒淇℃伅 + /// </summary> + public List<ImportEnterpriseEmployeesCommandResultError> Errors { get; set; } + } + + /// <summary> + /// 瀵煎叆鐏靛伐淇℃伅-缁撴灉-閿欒淇℃伅 + /// </summary> + public class ImportEnterpriseEmployeesCommandResultError : ImportEnterpriseEmployeesCommandModel + { + /// <summary> + /// 閿欒淇℃伅 + /// </summary> + public string ErrorMessage { get; set; } + } } -- Gitblit v1.9.1