Commit b79763afe72c21dbff9ad76674999ef268645d79
1 parent
61ae65fc
fix: 修正店助主任底薪来源描述及优化查询条件
- 更新店助主任底薪的来源描述,确保准确性。 - 优化数据库查询条件,合并条件以提高可读性和性能。 - 在多个SQL文件中添加空行以提升可读性。
Showing
6 changed files
with
12 additions
and
7 deletions
netcore/src/Modularity/Extend/NCC.Extend/LqShareStatisticsStoreService.cs
| ... | ... | @@ -399,8 +399,7 @@ namespace NCC.Extend |
| 399 | 399 | |
| 400 | 400 | // 2. 店助底薪和提成 |
| 401 | 401 | var assistantSalary = await _db.Queryable<LqAssistantSalaryStatisticsEntity>() |
| 402 | - .Where(x => x.StoreId == entity.StoreId && x.StatisticsMonth == statisticsMonth | |
| 403 | - && x.Position == "店助") | |
| 402 | + .Where(x => x.StoreId == entity.StoreId && x.StatisticsMonth == statisticsMonth && x.Position == "店助") | |
| 404 | 403 | .Select(x => new |
| 405 | 404 | { |
| 406 | 405 | BaseSalary = SqlFunc.AggregateSum(x.BaseSalary), |
| ... | ... | @@ -416,12 +415,14 @@ namespace NCC.Extend |
| 416 | 415 | entity.SalaryHeadcountReward = assistantSalary?.HeadcountReward ?? 0; |
| 417 | 416 | |
| 418 | 417 | // 3. 店助主任底薪和提成 |
| 419 | - var directorSalary = await _db.Queryable<LqDirectorSalaryStatisticsEntity>() | |
| 420 | - .Where(x => x.StoreId == entity.StoreId && x.StatisticsMonth == statisticsMonth) | |
| 418 | + var directorSalary = await _db.Queryable<LqAssistantSalaryStatisticsEntity>() | |
| 419 | + .Where(x => x.StoreId == entity.StoreId && x.StatisticsMonth == statisticsMonth && x.Position == "店助主任") | |
| 421 | 420 | .Select(x => new |
| 422 | 421 | { |
| 423 | - BaseSalary = SqlFunc.AggregateSum(x.ActualBaseSalary), | |
| 424 | - Commission = SqlFunc.AggregateSum(x.TotalCommissionAmount) | |
| 422 | + BaseSalary = SqlFunc.AggregateSum(x.BaseSalary), | |
| 423 | + Commission = SqlFunc.AggregateSum(x.CommissionAmount), | |
| 424 | + PhoneCustody = SqlFunc.AggregateSum(x.PhoneManagementFee), | |
| 425 | + HeadcountReward = SqlFunc.AggregateSum(x.Stage1Reward + x.Stage2Reward) | |
| 425 | 426 | }) |
| 426 | 427 | .FirstAsync(); |
| 427 | 428 | ... | ... |
sql/排查生美业绩统计差异-简化版.sql
sql/排查生美业绩统计差异详细.sql
sql/检查生美业绩统计差异.sql
test_tianwang_api.py
门店股份统计说明.md
| ... | ... | @@ -104,7 +104,7 @@ |
| 104 | 104 | ### 4.1 人工工资-底薪 (base_salary) |
| 105 | 105 | * **人工工资-健康师底薪**: 来源于 `lq_salary_statistics.F_ActualBaseSalary`。 |
| 106 | 106 | * **人工工资-店助底薪**: 来源于 `lq_assistant_salary_statistics.F_ActualBaseSalary` (岗位为“店助”)。 |
| 107 | -* **人工工资-店助主任底薪**: 来源于 `lq_director_salary_statistics.F_ActualBaseSalary` (岗位为“主任”)。 | |
| 107 | +* **人工工资-店助主任底薪**: 来源于 `lq_director_salary_statistics.F_ActualBaseSalary` (岗位为“店助主任”)。 | |
| 108 | 108 | * **人工工资-店长底薪**: 来源于 `lq_store_manager_salary_statistics.F_ActualBaseSalary`。 |
| 109 | 109 | * **人工工资-总经理/经理底薪**: 来源于事业部总经理/经理工资表 `F_ActualBaseSalary` (按门店平均分摊 - 底薪固定4000,按管理门店数平均)。 |
| 110 | 110 | ... | ... |