using System; using System.Collections.Generic; using System.Threading.Tasks; using LqSalaryCalculationService.Models; namespace LqSalaryCalculationService.Services { /// /// 工资核算服务接口 /// public interface ISalaryCalculationService { /// /// 初始化用户信息到工资表 /// /// 计算月份 (格式: yyyy-MM) /// 初始化结果 Task InitializeUserInfoAsync(string calculationMonth); /// /// 执行工资核算 /// /// 计算月份 (格式: yyyy-MM) /// 核算结果 Task CalculateSalaryAsync(string calculationMonth); /// /// 获取员工业绩数据 /// /// 计算月份 /// 员工业绩列表 Task> GetEmployeePerformanceAsync(string calculationMonth); /// /// 计算健康师工资 /// /// 业绩数据 /// 工资计算结果 Task CalculateHealthWorkerSalaryAsync(EmployeePerformance performance); /// /// 计算金三角提成 /// /// 团队业绩 /// 团队成员数 /// 提成比例 decimal CalculateTeamCommissionRate(decimal teamPerformance, int memberCount); /// /// 计算门店管理员工资 /// /// 业绩数据 /// 工资计算结果 Task CalculateManagerSalaryAsync(EmployeePerformance performance); /// /// 导出工资报表 /// /// 工资列表 /// 输出路径 /// 导出文件路径 Task ExportSalaryReportAsync(List salaries, string outputPath); /// /// 发送邮件通知 /// /// 核算结果 /// 发送结果 Task SendEmailNotificationAsync(SalaryCalculationResult result); } /// /// 员工业绩数据模型 /// public class EmployeePerformance { public string EmployeeId { get; set; } = string.Empty; public string EmployeeName { get; set; } = string.Empty; public string StoreId { get; set; } = string.Empty; public string StoreName { get; set; } = string.Empty; public string Position { get; set; } = string.Empty; public string PositionCategory { get; set; } = string.Empty; public decimal TotalPerformance { get; set; } public decimal ConsumptionPerformance { get; set; } public int ProjectCount { get; set; } public int CustomerCount { get; set; } public decimal TeamPerformance { get; set; } public bool IsNewStore { get; set; } public decimal StoreLifeLine { get; set; } public string TeamId { get; set; } = string.Empty; public int TeamMemberCount { get; set; } } /// /// 工资核算结果 /// public class SalaryCalculationResult { public bool Success { get; set; } public string Message { get; set; } = string.Empty; public List Salaries { get; set; } = new List(); public string OutputFilePath { get; set; } = string.Empty; public DateTime CalculationTime { get; set; } = DateTime.Now; public string CalculationMonth { get; set; } = string.Empty; } /// /// 用户信息初始化结果 /// public class UserInfoInitResult { public bool Success { get; set; } public string Message { get; set; } = string.Empty; public int UserCount { get; set; } public DateTime InitTime { get; set; } = DateTime.Now; public string CalculationMonth { get; set; } = string.Empty; } }