Commit 5dc762df4603618add5d3aa1406a7992bcb3a1dd

Authored by “wangming”
1 parent 0c63f3b7

Enhance performance statistics with refund metrics

- Added refund performance and count fields to personal and store total performance statistics.
- Introduced actual performance calculations that account for refunds.
- Updated relevant DTOs and entity classes to include new fields.
- Improved front-end tables to display refund-related data in performance statistics views.
antis-ncc-admin/src/views/lqInventory/InventoryInfoDialog.vue
@@ -191,4 +191,3 @@ export default { @@ -191,4 +191,3 @@ export default {
191 text-align: right; 191 text-align: right;
192 } 192 }
193 </style> 193 </style>
194 -  
antis-ncc-admin/src/views/personalPerformanceStatistics/index.vue
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 <el-table-column prop="EmployeeName" label="员工姓名" width="120" fixed="left"></el-table-column> 50 <el-table-column prop="EmployeeName" label="员工姓名" width="120" fixed="left"></el-table-column>
51 <el-table-column prop="StoreName" label="门店名称" width="150" fixed="left"></el-table-column> 51 <el-table-column prop="StoreName" label="门店名称" width="150" fixed="left"></el-table-column>
52 <el-table-column prop="Position" label="岗位" width="100" fixed="left"></el-table-column> 52 <el-table-column prop="Position" label="岗位" width="100" fixed="left"></el-table-column>
53 - <el-table-column prop="GoldTriangleTeam" label="金三角战队" width="120" fixed="left"></el-table-column> 53 + <el-table-column prop="GoldTriangleName" label="金三角战队" width="120" fixed="left"></el-table-column>
54 <el-table-column prop="TotalPerformance" label="总业绩" width="100" align="right"> 54 <el-table-column prop="TotalPerformance" label="总业绩" width="100" align="right">
55 <template slot-scope="scope"> 55 <template slot-scope="scope">
56 {{ formatMoney(scope.row.TotalPerformance) }} 56 {{ formatMoney(scope.row.TotalPerformance) }}
@@ -66,6 +66,22 @@ @@ -66,6 +66,22 @@
66 {{ formatMoney(scope.row.UpgradeOrderPerformance) }} 66 {{ formatMoney(scope.row.UpgradeOrderPerformance) }}
67 </template> 67 </template>
68 </el-table-column> 68 </el-table-column>
  69 + <el-table-column prop="RefundPerformance" label="退单业绩" width="100" align="right">
  70 + <template slot-scope="scope">
  71 + <span style="color: #F56C6C;">{{ formatMoney(scope.row.RefundPerformance) }}</span>
  72 + </template>
  73 + </el-table-column>
  74 + <el-table-column prop="RefundCount" label="退单次数" width="100" align="right">
  75 + <template slot-scope="scope">
  76 + <span style="color: #F56C6C;">{{ scope.row.RefundCount || 0 }}</span>
  77 + </template>
  78 + </el-table-column>
  79 + <el-table-column prop="ActualPerformance" label="实际业绩" width="100" align="right">
  80 + <template slot-scope="scope">
  81 + <span style="color: #67C23A; font-weight: bold;">{{ formatMoney(scope.row.ActualPerformance)
  82 + }}</span>
  83 + </template>
  84 + </el-table-column>
69 <el-table-column prop="FirstOrderCount" label="首开单数量" width="100" align="right"></el-table-column> 85 <el-table-column prop="FirstOrderCount" label="首开单数量" width="100" align="right"></el-table-column>
70 <el-table-column prop="UpgradeOrderCount" label="升单数量" width="100" align="right"></el-table-column> 86 <el-table-column prop="UpgradeOrderCount" label="升单数量" width="100" align="right"></el-table-column>
71 <el-table-column prop="OrderCount" label="订单总数" width="100" align="right"></el-table-column> 87 <el-table-column prop="OrderCount" label="订单总数" width="100" align="right"></el-table-column>
antis-ncc-admin/src/views/storeTotalPerformanceStatistics/index.vue
@@ -81,6 +81,12 @@ @@ -81,6 +81,12 @@
81 <span style="color: #F56C6C;">{{ scope.row.RefundCount || 0 }}</span> 81 <span style="color: #F56C6C;">{{ scope.row.RefundCount || 0 }}</span>
82 </template> 82 </template>
83 </el-table-column> 83 </el-table-column>
  84 + <el-table-column prop="ActualPerformance" label="实际业绩" width="120" align="right">
  85 + <template slot-scope="scope">
  86 + <span style="color: #67C23A; font-weight: bold;">{{ formatMoney(scope.row.ActualPerformance)
  87 + }}</span>
  88 + </template>
  89 + </el-table-column>
84 <el-table-column prop="CreateTime" label="创建时间" width="150" align="center"> 90 <el-table-column prop="CreateTime" label="创建时间" width="150" align="center">
85 <template slot-scope="scope"> 91 <template slot-scope="scope">
86 {{ formatDateTime(scope.row.CreateTime) }} 92 {{ formatDateTime(scope.row.CreateTime) }}
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxInfoOutput.cs
@@ -123,21 +123,21 @@ namespace NCC.Extend.Entitys.Dto.LqMdxx @@ -123,21 +123,21 @@ namespace NCC.Extend.Entitys.Dto.LqMdxx
123 /// <summary> 123 /// <summary>
124 /// 门店类别 124 /// 门店类别
125 /// </summary> 125 /// </summary>
126 - public int? StoreCategory { get; set; } 126 + public int? storeCategory { get; set; }
127 127
128 /// <summary> 128 /// <summary>
129 /// 门店类别名称 129 /// 门店类别名称
130 /// </summary> 130 /// </summary>
131 - public string StoreCategoryName => StoreCategory.HasValue ? EnumHelper.GetEnumDesc<StoreCategoryEnum>(StoreCategory.Value) : string.Empty; 131 + public string storeCategoryName => storeCategory.HasValue ? EnumHelper.GetEnumDesc<StoreCategoryEnum>(storeCategory.Value) : string.Empty;
132 132
133 /// <summary> 133 /// <summary>
134 /// 门店类型 134 /// 门店类型
135 /// </summary> 135 /// </summary>
136 - public int? StoreType { get; set; } 136 + public int? storeType { get; set; }
137 137
138 /// <summary> 138 /// <summary>
139 /// 门店类型名称 139 /// 门店类型名称
140 /// </summary> 140 /// </summary>
141 - public string StoreTypeName => StoreType.HasValue ? EnumHelper.GetEnumDesc<StoreTypeEnum>(StoreType.Value) : string.Empty; 141 + public string storeTypeName => storeType.HasValue ? EnumHelper.GetEnumDesc<StoreTypeEnum>(storeType.Value) : string.Empty;
142 } 142 }
143 } 143 }
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxListOutput.cs
@@ -152,21 +152,21 @@ namespace NCC.Extend.Entitys.Dto.LqMdxx @@ -152,21 +152,21 @@ namespace NCC.Extend.Entitys.Dto.LqMdxx
152 /// <summary> 152 /// <summary>
153 /// 门店类别 153 /// 门店类别
154 /// </summary> 154 /// </summary>
155 - public int? StoreCategory { get; set; } 155 + public int? storeCategory { get; set; }
156 156
157 /// <summary> 157 /// <summary>
158 /// 门店类别名称 158 /// 门店类别名称
159 /// </summary> 159 /// </summary>
160 - public string StoreCategoryName => StoreCategory.HasValue ? EnumHelper.GetEnumDesc<StoreCategoryEnum>(StoreCategory.Value) : string.Empty; 160 + public string storeCategoryName => storeCategory.HasValue ? EnumHelper.GetEnumDesc<StoreCategoryEnum>(storeCategory.Value) : string.Empty;
161 161
162 /// <summary> 162 /// <summary>
163 /// 门店类型 163 /// 门店类型
164 /// </summary> 164 /// </summary>
165 - public int? StoreType { get; set; } 165 + public int? storeType { get; set; }
166 166
167 /// <summary> 167 /// <summary>
168 /// 门店类型名称 168 /// 门店类型名称
169 /// </summary> 169 /// </summary>
170 - public string StoreTypeName => StoreType.HasValue ? EnumHelper.GetEnumDesc<StoreTypeEnum>(StoreType.Value) : string.Empty; 170 + public string storeTypeName => storeType.HasValue ? EnumHelper.GetEnumDesc<StoreTypeEnum>(storeType.Value) : string.Empty;
171 } 171 }
172 } 172 }
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatistics/LqStoreTotalPerformanceStatisticsListOutput.cs
@@ -73,6 +73,11 @@ namespace NCC.Extend.Entitys.Dto.LqStatistics @@ -73,6 +73,11 @@ namespace NCC.Extend.Entitys.Dto.LqStatistics
73 public int RefundCount { get; set; } 73 public int RefundCount { get; set; }
74 74
75 /// <summary> 75 /// <summary>
  76 + /// 实际业绩
  77 + /// </summary>
  78 + public decimal ActualPerformance { get; set; }
  79 +
  80 + /// <summary>
76 /// 创建时间 81 /// 创建时间
77 /// </summary> 82 /// </summary>
78 public DateTime CreateTime { get; set; } 83 public DateTime CreateTime { get; set; }
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsPersonalPerformance/LqStatisticsPersonalPerformanceListOutput.cs
@@ -93,6 +93,21 @@ namespace NCC.Extend.Entitys.Dto.LqStatisticsPersonalPerformance @@ -93,6 +93,21 @@ namespace NCC.Extend.Entitys.Dto.LqStatisticsPersonalPerformance
93 public decimal UpgradeOrderPerformance { get; set; } 93 public decimal UpgradeOrderPerformance { get; set; }
94 94
95 /// <summary> 95 /// <summary>
  96 + /// 退单业绩
  97 + /// </summary>
  98 + public decimal RefundPerformance { get; set; }
  99 +
  100 + /// <summary>
  101 + /// 退单次数
  102 + /// </summary>
  103 + public int RefundCount { get; set; }
  104 +
  105 + /// <summary>
  106 + /// 实际业绩
  107 + /// </summary>
  108 + public decimal ActualPerformance { get; set; }
  109 +
  110 + /// <summary>
96 /// 最后订单日期 111 /// 最后订单日期
97 /// </summary> 112 /// </summary>
98 public DateTime? LastOrderDate { get; set; } 113 public DateTime? LastOrderDate { get; set; }
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreTotalPerformance/LqStatisticsStoreTotalPerformanceListOutput.cs
@@ -86,5 +86,10 @@ namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreTotalPerformance @@ -86,5 +86,10 @@ namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreTotalPerformance
86 /// 创建时间 86 /// 创建时间
87 /// </summary> 87 /// </summary>
88 public DateTime? createTime { get; set; } 88 public DateTime? createTime { get; set; }
  89 +
  90 + /// <summary>
  91 + /// 实际业绩
  92 + /// </summary>
  93 + public decimal actualPerformance { get; set; }
89 } 94 }
90 } 95 }
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_personal_performance/LqStatisticsPersonalPerformanceEntity.cs
@@ -114,6 +114,24 @@ namespace NCC.Extend.Entitys.lq_statistics_personal_performance @@ -114,6 +114,24 @@ namespace NCC.Extend.Entitys.lq_statistics_personal_performance
114 public decimal UpgradeOrderPerformance { get; set; } 114 public decimal UpgradeOrderPerformance { get; set; }
115 115
116 /// <summary> 116 /// <summary>
  117 + /// 退单业绩
  118 + /// </summary>
  119 + [SugarColumn(ColumnName = "F_RefundPerformance")]
  120 + public decimal RefundPerformance { get; set; }
  121 +
  122 + /// <summary>
  123 + /// 退单次数
  124 + /// </summary>
  125 + [SugarColumn(ColumnName = "F_RefundCount")]
  126 + public int RefundCount { get; set; }
  127 +
  128 + /// <summary>
  129 + /// 实际业绩
  130 + /// </summary>
  131 + [SugarColumn(ColumnName = "F_ActualPerformance")]
  132 + public decimal ActualPerformance { get; set; }
  133 +
  134 + /// <summary>
117 /// 最后订单日期 135 /// 最后订单日期
118 /// </summary> 136 /// </summary>
119 [SugarColumn(ColumnName = "F_LastOrderDate")] 137 [SugarColumn(ColumnName = "F_LastOrderDate")]
netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_store_total_performance/LqStatisticsStoreTotalPerformanceEntity.cs
@@ -102,6 +102,12 @@ namespace NCC.Extend.Entitys.lq_statistics_store_total_performance @@ -102,6 +102,12 @@ namespace NCC.Extend.Entitys.lq_statistics_store_total_performance
102 public int RefundCount { get; set; } 102 public int RefundCount { get; set; }
103 103
104 /// <summary> 104 /// <summary>
  105 + /// 实际业绩
  106 + /// </summary>
  107 + [SugarColumn(ColumnName = "F_ActualPerformance")]
  108 + public decimal ActualPerformance { get; set; }
  109 +
  110 + /// <summary>
105 /// 创建时间 111 /// 创建时间
106 /// </summary> 112 /// </summary>
107 [SugarColumn(ColumnName = "F_CreateTime")] 113 [SugarColumn(ColumnName = "F_CreateTime")]
netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
@@ -1179,6 +1179,25 @@ namespace NCC.Extend.LqKdKdjlb @@ -1179,6 +1179,25 @@ namespace NCC.Extend.LqKdKdjlb
1179 } 1179 }
1180 #endregion 1180 #endregion
1181 1181
  1182 + #region 获取状态枚举内容(所有的状态通用)
  1183 + /// <summary>
  1184 + /// 获取状态枚举内容
  1185 + /// </summary>
  1186 + /// <returns>状态枚举列表</returns>
  1187 + [HttpGet("status-enum")]
  1188 + public List<EnumOutput> GetStatusEnum()
  1189 + {
  1190 + return Enum.GetValues<StatusEnum>()
  1191 + .Select(e => new EnumOutput
  1192 + {
  1193 + Value = (int)e,
  1194 + Name = e.ToString(),
  1195 + Description = e.GetDescription(),
  1196 + })
  1197 + .ToList();
  1198 + }
  1199 + #endregion
  1200 +
1182 #region 修改开单记录 1201 #region 修改开单记录
1183 /// <summary> 1202 /// <summary>
1184 /// 修改开单记录 1203 /// 修改开单记录
@@ -2486,7 +2505,7 @@ namespace NCC.Extend.LqKdKdjlb @@ -2486,7 +2505,7 @@ namespace NCC.Extend.LqKdKdjlb
2486 { 2505 {
2487 Id = YitIdHelper.NextId().ToString(), 2506 Id = YitIdHelper.NextId().ToString(),
2488 Gltkbh = refundId, 2507 Gltkbh = refundId,
2489 - Jks = jks.Jks, 2508 + Jks = jks.Jkszh,
2490 Jksxm = jks.Jksxm, 2509 Jksxm = jks.Jksxm,
2491 Jkszh = jks.Jkszh, 2510 Jkszh = jks.Jkszh,
2492 Jksyj = (totalItemDeduction / refundKdyjEntities.Count()), 2511 Jksyj = (totalItemDeduction / refundKdyjEntities.Count()),
@@ -2588,7 +2607,7 @@ namespace NCC.Extend.LqKdKdjlb @@ -2588,7 +2607,7 @@ namespace NCC.Extend.LqKdKdjlb
2588 { 2607 {
2589 Id = YitIdHelper.NextId().ToString(), 2608 Id = YitIdHelper.NextId().ToString(),
2590 Glkdbh = billingId, 2609 Glkdbh = billingId,
2591 - Jks = jks.Jks, 2610 + Jks = jks.Jkszh,
2592 Jksxm = jks.Jksxm, 2611 Jksxm = jks.Jksxm,
2593 Jkszh = jks.Jkszh, 2612 Jkszh = jks.Jkszh,
2594 Jksyj = jks.Jksyj.ToString(), 2613 Jksyj = jks.Jksyj.ToString(),
@@ -2709,7 +2728,5 @@ namespace NCC.Extend.LqKdKdjlb @@ -2709,7 +2728,5 @@ namespace NCC.Extend.LqKdKdjlb
2709 } 2728 }
2710 } 2729 }
2711 #endregion 2730 #endregion
2712 -  
2713 -  
2714 } 2731 }
2715 } 2732 }
netcore/src/Modularity/Extend/NCC.Extend/LqMdxxService.cs
@@ -24,6 +24,7 @@ using NCC.DataEncryption; @@ -24,6 +24,7 @@ using NCC.DataEncryption;
24 using NCC.ClayObject; 24 using NCC.ClayObject;
25 using NCC.Extend.Entitys.Enum; 25 using NCC.Extend.Entitys.Enum;
26 using NCC.Code; 26 using NCC.Code;
  27 +using NCC.Extend.Entitys.Dto.Common;
27 28
28 namespace NCC.Extend.LqMdxx 29 namespace NCC.Extend.LqMdxx
29 { 30 {
@@ -120,8 +121,8 @@ namespace NCC.Extend.LqMdxx @@ -120,8 +121,8 @@ namespace NCC.Extend.LqMdxx
120 rt1 = it.Rt1, 121 rt1 = it.Rt1,
121 rt2 = it.Rt2, 122 rt2 = it.Rt2,
122 rc = it.Rc, 123 rc = it.Rc,
123 - StoreCategory = it.StoreCategory,  
124 - StoreType = it.StoreType, 124 + storeCategory = it.StoreCategory,
  125 + storeType = it.StoreType,
125 }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); 126 }).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
126 return PageResult<LqMdxxListOutput>.SqlSugarPageResult(data); 127 return PageResult<LqMdxxListOutput>.SqlSugarPageResult(data);
127 } 128 }
@@ -191,8 +192,21 @@ namespace NCC.Extend.LqMdxx @@ -191,8 +192,21 @@ namespace NCC.Extend.LqMdxx
191 gsmc = it.Gsmc, 192 gsmc = it.Gsmc,
192 fr = it.Fr, 193 fr = it.Fr,
193 ywsb = it.Ywsb, 194 ywsb = it.Ywsb,
194 - StoreCategory = it.StoreCategory,  
195 - StoreType = it.StoreType, 195 + jyb = it.Jyb,
  196 + kjb = it.Kjb,
  197 + dxmb = it.Dxmb,
  198 + syb = it.Syb,
  199 + gsqssj = it.Gsqssj,
  200 + gszzsj = it.Gszzsj,
  201 + status = it.Status,
  202 + xsyj = it.Xsyj,
  203 + xhyj = it.Xhyj,
  204 + xms = it.Xms,
  205 + rt1 = it.Rt1,
  206 + rt2 = it.Rt2,
  207 + rc = it.Rc,
  208 + storeCategory = it.StoreCategory,
  209 + storeType = it.StoreType,
196 }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync(); 210 }).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync();
197 return data; 211 return data;
198 } 212 }
@@ -359,11 +373,14 @@ namespace NCC.Extend.LqMdxx @@ -359,11 +373,14 @@ namespace NCC.Extend.LqMdxx
359 /// </summary> 373 /// </summary>
360 /// <returns></returns> 374 /// <returns></returns>
361 [HttpGet("Selector/StoreCategory")] 375 [HttpGet("Selector/StoreCategory")]
362 - public async Task<dynamic> GetStoreCategorySelector() 376 + public List<EnumOutput> GetStoreCategorySelector()
363 { 377 {
364 - //从Enum中获取门店类别  
365 - var storeCategoryEnum = EnumExtensions.GetEnumDescDictionary(typeof(StoreCategoryEnum));  
366 - return new { list = storeCategoryEnum }; 378 + return Enum.GetValues<StoreCategoryEnum>().Select(e => new EnumOutput
  379 + {
  380 + Value = (int)e,
  381 + Name = e.ToString(),
  382 + Description = e.GetDescription(),
  383 + }).ToList();
367 } 384 }
368 #endregion 385 #endregion
369 386
@@ -373,11 +390,18 @@ namespace NCC.Extend.LqMdxx @@ -373,11 +390,18 @@ namespace NCC.Extend.LqMdxx
373 /// </summary> 390 /// </summary>
374 /// <returns></returns> 391 /// <returns></returns>
375 [HttpGet("Selector/StoreType")] 392 [HttpGet("Selector/StoreType")]
376 - public async Task<dynamic> GetStoreTypeSelector() 393 + public List<EnumOutput> GetStoreTypeSelector()
377 { 394 {
378 //从Enum中获取门店类型 395 //从Enum中获取门店类型
379 - var storeTypeEnum = EnumExtensions.GetEnumDescDictionary(typeof(StoreTypeEnum));  
380 - return new { list = storeTypeEnum }; 396 + var storeTypeEnum = Enum.GetValues<StoreTypeEnum>()
  397 + .Select(e => new EnumOutput
  398 + {
  399 + Value = (int)e,
  400 + Name = e.ToString(),
  401 + Description = e.GetDescription(),
  402 + })
  403 + .ToList();
  404 + return storeTypeEnum;
381 } 405 }
382 #endregion 406 #endregion
383 } 407 }
netcore/src/Modularity/Extend/NCC.Extend/LqStatisticsService.cs
@@ -1432,6 +1432,8 @@ namespace NCC.Extend.LqStatistics @@ -1432,6 +1432,8 @@ namespace NCC.Extend.LqStatistics
1432 order_stats.FirstOrderDate, 1432 order_stats.FirstOrderDate,
1433 COALESCE(coop_stats.CooperationPerformance, 0) AS CooperationPerformance, 1433 COALESCE(coop_stats.CooperationPerformance, 0) AS CooperationPerformance,
1434 COALESCE(base_stats.BasePerformance, 0) AS BasePerformance, 1434 COALESCE(base_stats.BasePerformance, 0) AS BasePerformance,
  1435 + COALESCE(refund_stats.RefundPerformance, 0) AS RefundPerformance,
  1436 + COALESCE(refund_stats.RefundCount, 0) AS RefundCount,
1435 order_stats.TotalPerformance 1437 order_stats.TotalPerformance
1436 FROM ( 1438 FROM (
1437 -- 按开单记录统计基础数据,避免重复计算 1439 -- 按开单记录统计基础数据,避免重复计算
@@ -1541,6 +1543,23 @@ namespace NCC.Extend.LqStatistics @@ -1541,6 +1543,23 @@ namespace NCC.Extend.LqStatistics
1541 AND (xmzl.fl3 IS NULL OR xmzl.fl3 != '合作业绩') 1543 AND (xmzl.fl3 IS NULL OR xmzl.fl3 != '合作业绩')
1542 GROUP BY jksyj.jkszh 1544 GROUP BY jksyj.jkszh
1543 ) base_stats ON order_stats.EmployeeId = base_stats.EmployeeId 1545 ) base_stats ON order_stats.EmployeeId = base_stats.EmployeeId
  1546 + LEFT JOIN (
  1547 + -- 退单业绩统计
  1548 + SELECT
  1549 + hytk_jksyj.jkszh AS EmployeeId,
  1550 + SUM(CAST(hytk_jksyj.jksyj AS DECIMAL(18,2))) AS RefundPerformance,
  1551 + COUNT(*) AS RefundCount
  1552 + FROM lq_hytk_jksyj hytk_jksyj
  1553 + INNER JOIN lq_hytk_hytk hytk ON hytk_jksyj.gltkbh = hytk.F_Id
  1554 + WHERE hytk_jksyj.jksyj IS NOT NULL
  1555 + AND hytk_jksyj.jksyj != ''
  1556 + AND hytk_jksyj.jksyj != '0'
  1557 + AND hytk_jksyj.F_IsEffective = 1
  1558 + AND hytk.F_IsEffective = 1
  1559 + AND YEAR(hytk_jksyj.tksj) = @year
  1560 + AND MONTH(hytk_jksyj.tksj) = @month
  1561 + GROUP BY hytk_jksyj.jks
  1562 + ) refund_stats ON order_stats.EmployeeId = refund_stats.EmployeeId
1544 ORDER BY order_stats.TotalPerformance DESC"; 1563 ORDER BY order_stats.TotalPerformance DESC";
1545 1564
1546 // 解析统计月份 1565 // 解析统计月份
@@ -1582,9 +1601,12 @@ namespace NCC.Extend.LqStatistics @@ -1582,9 +1601,12 @@ namespace NCC.Extend.LqStatistics
1582 Position = stats.Position?.ToString() ?? "", 1601 Position = stats.Position?.ToString() ?? "",
1583 EmployeeId = stats.EmployeeId?.ToString() ?? "", 1602 EmployeeId = stats.EmployeeId?.ToString() ?? "",
1584 EmployeeName = stats.EmployeeName?.ToString() ?? "", 1603 EmployeeName = stats.EmployeeName?.ToString() ?? "",
1585 - TotalPerformance = Convert.ToDecimal(stats.TotalPerformance ?? 0), 1604 + TotalPerformance = Convert.ToDecimal(stats.TotalPerformance ?? 0) - Convert.ToDecimal(stats.RefundPerformance ?? 0),
1586 BasePerformance = Convert.ToDecimal(stats.BasePerformance ?? 0), 1605 BasePerformance = Convert.ToDecimal(stats.BasePerformance ?? 0),
1587 CooperationPerformance = Convert.ToDecimal(stats.CooperationPerformance ?? 0), 1606 CooperationPerformance = Convert.ToDecimal(stats.CooperationPerformance ?? 0),
  1607 + RefundPerformance = Convert.ToDecimal(stats.RefundPerformance ?? 0),
  1608 + RefundCount = Convert.ToInt32(stats.RefundCount ?? 0),
  1609 + ActualPerformance = Convert.ToDecimal(stats.TotalPerformance ?? 0) - Convert.ToDecimal(stats.RefundPerformance ?? 0),
1588 OrderCount = Convert.ToInt32(stats.OrderCount ?? 0), 1610 OrderCount = Convert.ToInt32(stats.OrderCount ?? 0),
1589 FirstOrderCount = Convert.ToInt32(stats.FirstOrderCount ?? 0), 1611 FirstOrderCount = Convert.ToInt32(stats.FirstOrderCount ?? 0),
1590 UpgradeOrderCount = Convert.ToInt32(stats.UpgradeOrderCount ?? 0), 1612 UpgradeOrderCount = Convert.ToInt32(stats.UpgradeOrderCount ?? 0),
@@ -1665,7 +1687,7 @@ namespace NCC.Extend.LqStatistics @@ -1665,7 +1687,7 @@ namespace NCC.Extend.LqStatistics
1665 } 1687 }
1666 1688
1667 /// <summary> 1689 /// <summary>
1668 - /// 分页查询个人开单业绩统计数据 1690 + /// 分页查询个人开单业绩统计数据(在用)
1669 /// </summary> 1691 /// </summary>
1670 /// <remarks> 1692 /// <remarks>
1671 /// 分页查询个人业绩统计数据,支持多条件筛选 1693 /// 分页查询个人业绩统计数据,支持多条件筛选
@@ -1727,7 +1749,10 @@ namespace NCC.Extend.LqStatistics @@ -1727,7 +1749,10 @@ namespace NCC.Extend.LqStatistics
1727 UpgradeOrderPerformance = it.UpgradeOrderPerformance, 1749 UpgradeOrderPerformance = it.UpgradeOrderPerformance,
1728 LastOrderDate = it.LastOrderDate, 1750 LastOrderDate = it.LastOrderDate,
1729 FirstOrderDate = it.FirstOrderDate, 1751 FirstOrderDate = it.FirstOrderDate,
1730 - CreateTime = it.CreateTime 1752 + CreateTime = it.CreateTime,
  1753 + RefundPerformance = it.RefundPerformance,
  1754 + RefundCount = it.RefundCount,
  1755 + ActualPerformance = it.ActualPerformance
1731 }).ToPagedListAsync(input.currentPage, input.pageSize); 1756 }).ToPagedListAsync(input.currentPage, input.pageSize);
1732 1757
1733 return new 1758 return new
@@ -2588,6 +2613,7 @@ namespace NCC.Extend.LqStatistics @@ -2588,6 +2613,7 @@ namespace NCC.Extend.LqStatistics
2588 UpgradeOrderPerformance = Convert.ToDecimal(data.F_UpgradeOrderPerformance ?? 0), 2613 UpgradeOrderPerformance = Convert.ToDecimal(data.F_UpgradeOrderPerformance ?? 0),
2589 RefundAmount = Convert.ToDecimal(data.F_RefundAmount ?? 0), 2614 RefundAmount = Convert.ToDecimal(data.F_RefundAmount ?? 0),
2590 RefundCount = Convert.ToInt32(data.F_RefundCount ?? 0), 2615 RefundCount = Convert.ToInt32(data.F_RefundCount ?? 0),
  2616 + ActualPerformance = Convert.ToDecimal(data.F_TotalOrderPerformance ?? 0) - Convert.ToDecimal(data.F_RefundAmount ?? 0),
2591 CreateTime = DateTime.Now 2617 CreateTime = DateTime.Now
2592 }).ToList(); 2618 }).ToList();
2593 2619
@@ -2671,6 +2697,9 @@ namespace NCC.Extend.LqStatistics @@ -2671,6 +2697,9 @@ namespace NCC.Extend.LqStatistics
2671 upgradeOrderCount = it.UpgradeOrderCount, 2697 upgradeOrderCount = it.UpgradeOrderCount,
2672 firstOrderPerformance = it.FirstOrderPerformance, 2698 firstOrderPerformance = it.FirstOrderPerformance,
2673 upgradeOrderPerformance = it.UpgradeOrderPerformance, 2699 upgradeOrderPerformance = it.UpgradeOrderPerformance,
  2700 + refundAmount = it.RefundAmount,
  2701 + refundCount = it.RefundCount,
  2702 + actualPerformance = it.ActualPerformance,
2674 createTime = it.CreateTime 2703 createTime = it.CreateTime
2675 }) 2704 })
2676 .OrderBy(sidx + " " + input.sort) 2705 .OrderBy(sidx + " " + input.sort)
@@ -3329,7 +3358,8 @@ namespace NCC.Extend.LqStatistics @@ -3329,7 +3358,8 @@ namespace NCC.Extend.LqStatistics
3329 UpgradeOrderCount = it.UpgradeOrderCount, 3358 UpgradeOrderCount = it.UpgradeOrderCount,
3330 RefundAmount = it.RefundAmount, 3359 RefundAmount = it.RefundAmount,
3331 RefundCount = it.RefundCount, 3360 RefundCount = it.RefundCount,
3332 - CreateTime = it.CreateTime.HasValue ? it.CreateTime.Value : DateTime.Now 3361 + CreateTime = it.CreateTime.HasValue ? it.CreateTime.Value : DateTime.Now,
  3362 + ActualPerformance = it.ActualPerformance
3333 }).ToList(); 3363 }).ToList();
3334 3364
3335 return new 3365 return new