From 5c45bc53e2c18e45130c21048df4af4896455c6d Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期五, 12 九月 2025 15:58:48 +0800 Subject: [PATCH] feat:开发 --- FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/ImportEnterpriseEmployeesCommand.cs | 89 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 87 insertions(+), 2 deletions(-) diff --git a/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/ImportEnterpriseEmployeesCommand.cs b/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/ImportEnterpriseEmployeesCommand.cs index f47b21b..49537cd 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; @@ -10,12 +14,93 @@ /// <summary> /// 瀵煎叆鐏靛伐淇℃伅 /// </summary> - [Resource([EnumResourceController.EnterpriseEmployee])] - public class ImportEnterpriseEmployeesCommand : IRequest<int> + [Resource([EnumResourceController.UserServerEnterpriseEmployee])] + 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