diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqSalary/HealthCoachSalaryOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqSalary/HealthCoachSalaryOutput.cs index 323369b..97799c9 100644 --- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqSalary/HealthCoachSalaryOutput.cs +++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqSalary/HealthCoachSalaryOutput.cs @@ -151,5 +151,35 @@ namespace NCC.Extend.Entitys.Dto.LqSalary /// 升单业绩提成 /// public decimal UpgradeCommission { get; set; } + + /// + /// 新客业绩 + /// + public decimal NewCustomerPerformance { get; set; } + + /// + /// 新客转化率 + /// + public decimal NewCustomerConversionRate { get; set; } + + /// + /// 新客提点 + /// + public decimal NewCustomerPoint { get; set; } + + /// + /// 升单人头数 + /// + public decimal UpgradeCustomerCount { get; set; } + + /// + /// 升单业绩 + /// + public decimal UpgradePerformance { get; set; } + + /// + /// 升单提点 + /// + public decimal UpgradePoint { get; set; } } } diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqSalaryExtraCalculationService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqSalaryExtraCalculationService.cs index ec7aabc..601d440 100644 --- a/netcore/src/Modularity/Extend/NCC.Extend/LqSalaryExtraCalculationService.cs +++ b/netcore/src/Modularity/Extend/NCC.Extend/LqSalaryExtraCalculationService.cs @@ -456,13 +456,13 @@ namespace NCC.Extend { // 生成金额 // 基础业绩奖励和合作业绩奖励:0-20000之间 - var baseRewardPerformance = (decimal)(random.NextDouble() * 20000); - var cooperationRewardPerformance = (decimal)(random.NextDouble() * 20000); + var baseRewardPerformance = (decimal)(random.NextDouble() * 10000); + var cooperationRewardPerformance = (decimal)(random.NextDouble() * 10000); // 其他金额字段:10000-30000之间 - var newCustomerPerformance = (decimal)(random.NextDouble() * 20000 + 10000); - var upgradePerformance = (decimal)(random.NextDouble() * 20000 + 10000); - var otherPerformanceAdd = (decimal)(random.NextDouble() * 20000 + 10000); - var otherPerformanceSubtract = (decimal)(random.NextDouble() * 20000 + 10000); + var newCustomerPerformance = (decimal)(random.NextDouble() * 10000); + var upgradePerformance = (decimal)(random.NextDouble() * 10000); + var otherPerformanceAdd = (decimal)(random.NextDouble() * 10000); + var otherPerformanceSubtract = (decimal)(random.NextDouble() * 10000); // 生成转化率(0-60%之间,转换为0-0.6) var newCustomerConversionRate = (decimal)(random.NextDouble() * 0.6); diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqSalaryService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqSalaryService.cs index 93f0df0..1e5c9bf 100644 --- a/netcore/src/Modularity/Extend/NCC.Extend/LqSalaryService.cs +++ b/netcore/src/Modularity/Extend/NCC.Extend/LqSalaryService.cs @@ -110,7 +110,13 @@ namespace NCC.Extend ActualBasePerformance = x.ActualBasePerformance, ActualCooperationPerformance = x.ActualCooperationPerformance, NewCustomerCommission = x.NewCustomerPerformanceCommission, - UpgradeCommission = x.UpgradePerformanceCommission + UpgradeCommission = x.UpgradePerformanceCommission, + NewCustomerPerformance = x.NewCustomerPerformance, + NewCustomerConversionRate = x.NewCustomerConversionRate, + NewCustomerPoint = x.NewCustomerPoint, + UpgradeCustomerCount = x.UpgradeCustomerCount, + UpgradePerformance = x.UpgradePerformance, + UpgradePoint = x.UpgradePoint }) .ToPagedListAsync(input.currentPage, input.pageSize); @@ -367,6 +373,8 @@ namespace NCC.Extend salary.OtherPerformanceSubtract = extraData.OtherPerformanceSubtract; salary.UpgradeCustomerCount = extraData.UpgradeCustomerCount; salary.NewCustomerConversionRate = extraData.NewCustomerConversionRate; + salary.NewCustomerPerformance = extraData.NewCustomerPerformance; + salary.UpgradePerformance = extraData.UpgradePerformance; } // 2.1.2 计算实际基础业绩和实际合作业绩 @@ -493,6 +501,15 @@ namespace NCC.Extend } } + // 补充处理:对于没有战队ID的(个人,或被剔除的),战队业绩等于个人总业绩 + foreach (var salary in employeeStats.Values) + { + if (string.IsNullOrEmpty(salary.GoldTriangleId)) + { + salary.TeamPerformance = salary.TotalPerformance; + } + } + // 4. 计算薪资 (底薪 & 提成) foreach (var salary in employeeStats.Values) { @@ -504,13 +521,15 @@ namespace NCC.Extend salary.HealthCoachBaseSalary = CalculateBaseSalary(salary.Consumption, salary.ProjectCount, isNewStore); // 4.2 提成计算 - // 单人业绩 <= 6000 无提成 + // 业绩门槛: 个人总业绩 <= 6000 无提成 if (salary.TotalPerformance <= 6000) { salary.TotalCommission = 0; salary.BasePerformanceCommission = 0; salary.CooperationPerformanceCommission = 0; salary.ConsultantCommission = 0; + salary.NewCustomerPerformanceCommission = 0; + salary.UpgradePerformanceCommission = 0; } else {