diff --git a/antis-ncc-admin/src/views/lqInventory/InventoryInfoDialog.vue b/antis-ncc-admin/src/views/lqInventory/InventoryInfoDialog.vue
index 6a8e065..94adeef 100644
--- a/antis-ncc-admin/src/views/lqInventory/InventoryInfoDialog.vue
+++ b/antis-ncc-admin/src/views/lqInventory/InventoryInfoDialog.vue
@@ -191,4 +191,3 @@ export default {
text-align: right;
}
-
diff --git a/antis-ncc-admin/src/views/personalPerformanceStatistics/index.vue b/antis-ncc-admin/src/views/personalPerformanceStatistics/index.vue
index bf027cd..aa584a5 100644
--- a/antis-ncc-admin/src/views/personalPerformanceStatistics/index.vue
+++ b/antis-ncc-admin/src/views/personalPerformanceStatistics/index.vue
@@ -50,7 +50,7 @@
-
+
{{ formatMoney(scope.row.TotalPerformance) }}
@@ -66,6 +66,22 @@
{{ formatMoney(scope.row.UpgradeOrderPerformance) }}
+
+
+ {{ formatMoney(scope.row.RefundPerformance) }}
+
+
+
+
+ {{ scope.row.RefundCount || 0 }}
+
+
+
+
+ {{ formatMoney(scope.row.ActualPerformance)
+ }}
+
+
diff --git a/antis-ncc-admin/src/views/storeTotalPerformanceStatistics/index.vue b/antis-ncc-admin/src/views/storeTotalPerformanceStatistics/index.vue
index 0a5a9c5..950a7d9 100644
--- a/antis-ncc-admin/src/views/storeTotalPerformanceStatistics/index.vue
+++ b/antis-ncc-admin/src/views/storeTotalPerformanceStatistics/index.vue
@@ -81,6 +81,12 @@
{{ scope.row.RefundCount || 0 }}
+
+
+ {{ formatMoney(scope.row.ActualPerformance)
+ }}
+
+
{{ formatDateTime(scope.row.CreateTime) }}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/HealthCoachStatisticsOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/HealthCoachStatisticsOutput.cs
new file mode 100644
index 0000000..43973dd
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/HealthCoachStatisticsOutput.cs
@@ -0,0 +1,83 @@
+namespace NCC.Extend.Entitys.Dto.LqKdKdjlb
+{
+ ///
+ /// 健康师统计输出
+ ///
+ public class HealthCoachStatisticsOutput
+ {
+ ///
+ /// 健康师ID
+ ///
+ public string employeeId { get; set; }
+
+ ///
+ /// 健康师姓名
+ ///
+ public string employeeName { get; set; }
+
+ ///
+ /// 门店ID
+ ///
+ public string storeId { get; set; }
+
+ ///
+ /// 门店名称
+ ///
+ public string storeName { get; set; }
+
+ ///
+ /// 事业部ID
+ ///
+ public string departmentId { get; set; }
+
+ ///
+ /// 事业部名称
+ ///
+ public string departmentName { get; set; }
+
+ ///
+ /// 邀约人数 - 统计该健康师在指定时间周期内邀约的客户数量(按客户去重)
+ ///
+ public int inviteCount { get; set; }
+
+ ///
+ /// 预约人数 - 统计该健康师在指定时间周期内预约的客户数量(按客户去重,无论预约状态)
+ ///
+ public int appointmentCount { get; set; }
+
+ ///
+ /// 到店人数 - 统计该健康师在指定时间周期内已确认到店的客户数量(按客户去重,仅统计状态为'已确认'的预约)
+ ///
+ public int visitCount { get; set; }
+
+ ///
+ /// 开单人数 - 统计该健康师在指定时间周期内开单的客户数量(按开单记录去重)
+ ///
+ public int billingCount { get; set; }
+
+ ///
+ /// 开单金额 - 统计该健康师在指定时间周期内的开单业绩总金额
+ ///
+ public decimal billingAmount { get; set; }
+
+ ///
+ /// 消耗金额 - 统计该健康师在指定时间周期内的消耗业绩总金额
+ ///
+ public decimal consumeAmount { get; set; }
+
+ ///
+ /// 人头 - 统计该健康师在指定时间周期内服务的唯一客户数量(按客户去重)
+ ///
+ public int headCount { get; set; }
+
+ ///
+ /// 人次 - 统计该健康师在指定时间周期内服务的客户人次(按客户+日期去重,同一客户不同天算多次)
+ ///
+ public int personCount { get; set; }
+
+ ///
+ /// 消耗项目数 - 统计该健康师在指定时间周期内消耗的项目总次数
+ ///
+ public int projectCount { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/HealthCoachStatisticsQueryInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/HealthCoachStatisticsQueryInput.cs
new file mode 100644
index 0000000..4dc317d
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqKdKdjlb/HealthCoachStatisticsQueryInput.cs
@@ -0,0 +1,36 @@
+using NCC.Common.Filter;
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqKdKdjlb
+{
+ ///
+ /// 健康师统计查询输入
+ ///
+ public class HealthCoachStatisticsQueryInput : PageInputBase
+ {
+ ///
+ /// 开始时间
+ ///
+ public DateTime? StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ public DateTime? EndTime { get; set; }
+
+ ///
+ /// 事业部ID
+ ///
+ public string DepartmentId { get; set; }
+
+ ///
+ /// 门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 健康师姓名
+ ///
+ public string EmployeeName { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxInfoOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxInfoOutput.cs
index 1438b6c..2adec93 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxInfoOutput.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxInfoOutput.cs
@@ -123,21 +123,21 @@ namespace NCC.Extend.Entitys.Dto.LqMdxx
///
/// 门店类别
///
- public int? StoreCategory { get; set; }
+ public int? storeCategory { get; set; }
///
/// 门店类别名称
///
- public string StoreCategoryName => StoreCategory.HasValue ? EnumHelper.GetEnumDesc(StoreCategory.Value) : string.Empty;
+ public string storeCategoryName => storeCategory.HasValue ? EnumHelper.GetEnumDesc(storeCategory.Value) : string.Empty;
///
/// 门店类型
///
- public int? StoreType { get; set; }
+ public int? storeType { get; set; }
///
/// 门店类型名称
///
- public string StoreTypeName => StoreType.HasValue ? EnumHelper.GetEnumDesc(StoreType.Value) : string.Empty;
+ public string storeTypeName => storeType.HasValue ? EnumHelper.GetEnumDesc(storeType.Value) : string.Empty;
}
}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxListOutput.cs
index 64df5e5..a332430 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxListOutput.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqMdxx/LqMdxxListOutput.cs
@@ -152,21 +152,21 @@ namespace NCC.Extend.Entitys.Dto.LqMdxx
///
/// 门店类别
///
- public int? StoreCategory { get; set; }
+ public int? storeCategory { get; set; }
///
/// 门店类别名称
///
- public string StoreCategoryName => StoreCategory.HasValue ? EnumHelper.GetEnumDesc(StoreCategory.Value) : string.Empty;
+ public string storeCategoryName => storeCategory.HasValue ? EnumHelper.GetEnumDesc(storeCategory.Value) : string.Empty;
///
/// 门店类型
///
- public int? StoreType { get; set; }
+ public int? storeType { get; set; }
///
/// 门店类型名称
///
- public string StoreTypeName => StoreType.HasValue ? EnumHelper.GetEnumDesc(StoreType.Value) : string.Empty;
+ public string storeTypeName => storeType.HasValue ? EnumHelper.GetEnumDesc(storeType.Value) : string.Empty;
}
}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPackageInfo/ActivityStatisticsInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPackageInfo/ActivityStatisticsInput.cs
new file mode 100644
index 0000000..be246de
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPackageInfo/ActivityStatisticsInput.cs
@@ -0,0 +1,32 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace NCC.Extend.Entitys.Dto.LqPackageInfo
+{
+ ///
+ /// 营销活动统计查询输入参数
+ ///
+ public class ActivityStatisticsInput
+ {
+ ///
+ /// 营销活动ID
+ ///
+ [Required(ErrorMessage = "营销活动ID不能为空")]
+ public string ActivityId { get; set; }
+
+ ///
+ /// 开始时间(可选,默认为活动开始时间)
+ ///
+ public DateTime? StartTime { get; set; }
+
+ ///
+ /// 结束时间(可选,默认为活动结束时间)
+ ///
+ public DateTime? EndTime { get; set; }
+
+ ///
+ /// 门店ID列表(可选)
+ ///
+ public string[] StoreIds { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPackageInfo/ActivityStatisticsOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPackageInfo/ActivityStatisticsOutput.cs
new file mode 100644
index 0000000..2cc73dc
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqPackageInfo/ActivityStatisticsOutput.cs
@@ -0,0 +1,55 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqPackageInfo
+{
+ ///
+ /// 营销活动统计输出结果
+ ///
+ public class ActivityStatisticsOutput
+ {
+ ///
+ /// 营销活动ID
+ ///
+ public string ActivityId { get; set; }
+
+ ///
+ /// 营销活动名称
+ ///
+ public string ActivityName { get; set; }
+
+ ///
+ /// 开单数量
+ ///
+ public int BillingCount { get; set; }
+
+ ///
+ /// 开单金额
+ ///
+ public decimal BillingAmount { get; set; }
+
+ ///
+ /// 退卡数量
+ ///
+ public int RefundCount { get; set; }
+
+ ///
+ /// 退卡金额
+ ///
+ public decimal RefundAmount { get; set; }
+
+ ///
+ /// 净开单数量(开单数量 - 退卡数量)
+ ///
+ public int NetBillingCount { get; set; }
+
+ ///
+ /// 净开单金额(开单金额 - 退卡金额)
+ ///
+ public decimal NetBillingAmount { get; set; }
+
+ ///
+ /// 退卡率(退卡数量 / 开单数量)
+ ///
+ public decimal RefundRate { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/BusinessStatisticsInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/BusinessStatisticsInput.cs
new file mode 100644
index 0000000..76d0514
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/BusinessStatisticsInput.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqReport
+{
+ ///
+ /// 业务统计查询输入
+ ///
+ public class BusinessStatisticsInput
+ {
+ ///
+ /// 开始时间
+ ///
+ public DateTime? StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ public DateTime? EndTime { get; set; }
+
+ ///
+ /// 门店ID列表
+ ///
+ public string[] StoreIds { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/BusinessStatisticsOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/BusinessStatisticsOutput.cs
new file mode 100644
index 0000000..5f59484
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/BusinessStatisticsOutput.cs
@@ -0,0 +1,38 @@
+namespace NCC.Extend.Entitys.Dto.LqReport
+{
+ ///
+ /// 业务统计输出
+ ///
+ public class BusinessStatisticsOutput
+ {
+ ///
+ /// 开单总金额
+ ///
+ public decimal TotalBillingAmount { get; set; }
+
+ ///
+ /// 耗卡总金额
+ ///
+ public decimal TotalConsumeAmount { get; set; }
+
+ ///
+ /// 退卡总金额
+ ///
+ public decimal TotalRefundAmount { get; set; }
+
+ ///
+ /// 开单人数
+ ///
+ public int BillingCount { get; set; }
+
+ ///
+ /// 耗卡人数
+ ///
+ public int ConsumeCount { get; set; }
+
+ ///
+ /// 退卡人数
+ ///
+ public int RefundCount { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/CustomerTypeStatisticsInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/CustomerTypeStatisticsInput.cs
new file mode 100644
index 0000000..3dd09b9
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/CustomerTypeStatisticsInput.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqReport
+{
+ ///
+ /// 客户类型统计查询输入
+ ///
+ public class CustomerTypeStatisticsInput
+ {
+ ///
+ /// 开始时间
+ ///
+ public DateTime? StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ public DateTime? EndTime { get; set; }
+
+ ///
+ /// 门店ID列表
+ ///
+ public string[] StoreIds { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/CustomerTypeStatisticsOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/CustomerTypeStatisticsOutput.cs
new file mode 100644
index 0000000..8d47268
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/CustomerTypeStatisticsOutput.cs
@@ -0,0 +1,43 @@
+namespace NCC.Extend.Entitys.Dto.LqReport
+{
+ ///
+ /// 客户类型统计输出
+ ///
+ public class CustomerTypeStatisticsOutput
+ {
+ ///
+ /// 线索客户数量
+ ///
+ public int LeadCount { get; set; }
+
+ ///
+ /// 新客数量
+ ///
+ public int NewCustomerCount { get; set; }
+
+ ///
+ /// 散客数量
+ ///
+ public int CasualCustomerCount { get; set; }
+
+ ///
+ /// 会员数量
+ ///
+ public int MemberCount { get; set; }
+
+ ///
+ /// 拓客总人数
+ ///
+ public int TotalInviteCount { get; set; }
+
+ ///
+ /// 消耗人数(有消耗金额的)
+ ///
+ public int ConsumeCount { get; set; }
+
+ ///
+ /// 转化率(消耗人数/拓客人数)
+ ///
+ public decimal ConversionRate { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/ItemStatisticsInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/ItemStatisticsInput.cs
new file mode 100644
index 0000000..8321f0a
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/ItemStatisticsInput.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqReport
+{
+ ///
+ /// 品项统计查询输入
+ ///
+ public class ItemStatisticsInput
+ {
+ ///
+ /// 开始时间
+ ///
+ public DateTime? StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ public DateTime? EndTime { get; set; }
+
+ ///
+ /// 门店ID列表
+ ///
+ public string[] StoreIds { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/ItemStatisticsOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/ItemStatisticsOutput.cs
new file mode 100644
index 0000000..f097db8
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/ItemStatisticsOutput.cs
@@ -0,0 +1,53 @@
+namespace NCC.Extend.Entitys.Dto.LqReport
+{
+ ///
+ /// 品项统计输出
+ ///
+ public class ItemStatisticsOutput
+ {
+ ///
+ /// 品项ID
+ ///
+ public string ItemId { get; set; }
+
+ ///
+ /// 品项名称
+ ///
+ public string ItemName { get; set; }
+
+ ///
+ /// 品项编号
+ ///
+ public string ItemNumber { get; set; }
+
+ ///
+ /// 开单数量
+ ///
+ public int BillingCount { get; set; }
+
+ ///
+ /// 开单金额
+ ///
+ public decimal BillingAmount { get; set; }
+
+ ///
+ /// 消耗数量
+ ///
+ public int ConsumeCount { get; set; }
+
+ ///
+ /// 消耗金额
+ ///
+ public decimal ConsumeAmount { get; set; }
+
+ ///
+ /// 退卡数量
+ ///
+ public int RefundCount { get; set; }
+
+ ///
+ /// 退卡金额
+ ///
+ public decimal RefundAmount { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/StorePerformanceComparisonInput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/StorePerformanceComparisonInput.cs
new file mode 100644
index 0000000..da2934e
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/StorePerformanceComparisonInput.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace NCC.Extend.Entitys.Dto.LqReport
+{
+ ///
+ /// 门店业绩对比统计查询输入
+ ///
+ public class StorePerformanceComparisonInput
+ {
+ ///
+ /// 开始时间
+ ///
+ public DateTime? StartTime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ public DateTime? EndTime { get; set; }
+
+ ///
+ /// 门店ID列表
+ ///
+ public string[] StoreIds { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/StorePerformanceComparisonOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/StorePerformanceComparisonOutput.cs
new file mode 100644
index 0000000..c6c17bb
--- /dev/null
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqReport/StorePerformanceComparisonOutput.cs
@@ -0,0 +1,43 @@
+namespace NCC.Extend.Entitys.Dto.LqReport
+{
+ ///
+ /// 门店业绩对比统计输出
+ ///
+ public class StorePerformanceComparisonOutput
+ {
+ ///
+ /// 门店ID
+ ///
+ public string StoreId { get; set; }
+
+ ///
+ /// 门店名称
+ ///
+ public string StoreName { get; set; }
+
+ ///
+ /// 目标业绩
+ ///
+ public decimal TargetPerformance { get; set; }
+
+ ///
+ /// 实际开单业绩
+ ///
+ public decimal ActualPerformance { get; set; }
+
+ ///
+ /// 完成率(实际业绩/目标业绩)
+ ///
+ public decimal CompletionRate { get; set; }
+
+ ///
+ /// 差额(实际业绩-目标业绩)
+ ///
+ public decimal Difference { get; set; }
+
+ ///
+ /// 是否达标(实际业绩 >= 目标业绩)
+ ///
+ public bool IsTargetAchieved { get; set; }
+ }
+}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatistics/LqStoreTotalPerformanceStatisticsListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatistics/LqStoreTotalPerformanceStatisticsListOutput.cs
index 85ffc47..85c8c1d 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatistics/LqStoreTotalPerformanceStatisticsListOutput.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatistics/LqStoreTotalPerformanceStatisticsListOutput.cs
@@ -73,6 +73,11 @@ namespace NCC.Extend.Entitys.Dto.LqStatistics
public int RefundCount { get; set; }
///
+ /// 实际业绩
+ ///
+ public decimal ActualPerformance { get; set; }
+
+ ///
/// 创建时间
///
public DateTime CreateTime { get; set; }
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsPersonalPerformance/LqStatisticsPersonalPerformanceListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsPersonalPerformance/LqStatisticsPersonalPerformanceListOutput.cs
index e89c7a1..fd53b78 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsPersonalPerformance/LqStatisticsPersonalPerformanceListOutput.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsPersonalPerformance/LqStatisticsPersonalPerformanceListOutput.cs
@@ -93,6 +93,21 @@ namespace NCC.Extend.Entitys.Dto.LqStatisticsPersonalPerformance
public decimal UpgradeOrderPerformance { get; set; }
///
+ /// 退单业绩
+ ///
+ public decimal RefundPerformance { get; set; }
+
+ ///
+ /// 退单次数
+ ///
+ public int RefundCount { get; set; }
+
+ ///
+ /// 实际业绩
+ ///
+ public decimal ActualPerformance { get; set; }
+
+ ///
/// 最后订单日期
///
public DateTime? LastOrderDate { get; set; }
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreTotalPerformance/LqStatisticsStoreTotalPerformanceListOutput.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreTotalPerformance/LqStatisticsStoreTotalPerformanceListOutput.cs
index ae48dcb..8d56eda 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreTotalPerformance/LqStatisticsStoreTotalPerformanceListOutput.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/LqStatisticsStoreTotalPerformance/LqStatisticsStoreTotalPerformanceListOutput.cs
@@ -86,5 +86,10 @@ namespace NCC.Extend.Entitys.Dto.LqStatisticsStoreTotalPerformance
/// 创建时间
///
public DateTime? createTime { get; set; }
+
+ ///
+ /// 实际业绩
+ ///
+ public decimal actualPerformance { get; set; }
}
}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_personal_performance/LqStatisticsPersonalPerformanceEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_personal_performance/LqStatisticsPersonalPerformanceEntity.cs
index 97e21b2..9d9ec05 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_personal_performance/LqStatisticsPersonalPerformanceEntity.cs
+++ b/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
public decimal UpgradeOrderPerformance { get; set; }
///
+ /// 退单业绩
+ ///
+ [SugarColumn(ColumnName = "F_RefundPerformance")]
+ public decimal RefundPerformance { get; set; }
+
+ ///
+ /// 退单次数
+ ///
+ [SugarColumn(ColumnName = "F_RefundCount")]
+ public int RefundCount { get; set; }
+
+ ///
+ /// 实际业绩
+ ///
+ [SugarColumn(ColumnName = "F_ActualPerformance")]
+ public decimal ActualPerformance { get; set; }
+
+ ///
/// 最后订单日期
///
[SugarColumn(ColumnName = "F_LastOrderDate")]
diff --git a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_store_total_performance/LqStatisticsStoreTotalPerformanceEntity.cs b/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_store_total_performance/LqStatisticsStoreTotalPerformanceEntity.cs
index 2508ed3..fb326e1 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Entity/lq_statistics_store_total_performance/LqStatisticsStoreTotalPerformanceEntity.cs
+++ b/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
public int RefundCount { get; set; }
///
+ /// 实际业绩
+ ///
+ [SugarColumn(ColumnName = "F_ActualPerformance")]
+ public decimal ActualPerformance { get; set; }
+
+ ///
/// 创建时间
///
[SugarColumn(ColumnName = "F_CreateTime")]
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
index 869a939..7b141a3 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqKdKdjlbService.cs
@@ -1179,6 +1179,25 @@ namespace NCC.Extend.LqKdKdjlb
}
#endregion
+ #region 获取状态枚举内容(所有的状态通用)
+ ///
+ /// 获取状态枚举内容
+ ///
+ /// 状态枚举列表
+ [HttpGet("status-enum")]
+ public List GetStatusEnum()
+ {
+ return Enum.GetValues()
+ .Select(e => new EnumOutput
+ {
+ Value = (int)e,
+ Name = e.ToString(),
+ Description = e.GetDescription(),
+ })
+ .ToList();
+ }
+ #endregion
+
#region 修改开单记录
///
/// 修改开单记录
@@ -2486,7 +2505,7 @@ namespace NCC.Extend.LqKdKdjlb
{
Id = YitIdHelper.NextId().ToString(),
Gltkbh = refundId,
- Jks = jks.Jks,
+ Jks = jks.Jkszh,
Jksxm = jks.Jksxm,
Jkszh = jks.Jkszh,
Jksyj = (totalItemDeduction / refundKdyjEntities.Count()),
@@ -2588,7 +2607,7 @@ namespace NCC.Extend.LqKdKdjlb
{
Id = YitIdHelper.NextId().ToString(),
Glkdbh = billingId,
- Jks = jks.Jks,
+ Jks = jks.Jkszh,
Jksxm = jks.Jksxm,
Jkszh = jks.Jkszh,
Jksyj = jks.Jksyj.ToString(),
@@ -2710,6 +2729,229 @@ namespace NCC.Extend.LqKdKdjlb
}
#endregion
+ #region 门店整体统计表
+ ///
+ /// 门店整体统计表
+ ///
+ ///
+ /// 统计每个健康师在指定时间周期内的各项数据指标
+ /// 包括:邀约人数、预约人数、到店人数、开单人数、开单金额、消耗金额、人头、人次、消耗项目数
+ ///
+ /// 示例请求:
+ /// ```json
+ /// {
+ /// "startTime": "2025-10-01",
+ /// "endTime": "2025-10-31",
+ /// "departmentId": "部门ID",
+ /// "storeId": "门店ID",
+ /// "employeeName": "健康师姓名"
+ /// }
+ /// ```
+ ///
+ /// 参数说明:
+ /// - startTime: 开始时间(可选,默认为当月1号)
+ /// - endTime: 结束时间(可选,默认为当前时间)
+ /// - departmentId: 事业部ID(可选)
+ /// - storeId: 门店ID(可选)
+ /// - employeeName: 健康师姓名(可选)
+ ///
+ /// 返回字段说明:
+ /// - EmployeeId: 健康师ID
+ /// - EmployeeName: 健康师姓名
+ /// - StoreId: 门店ID
+ /// - StoreName: 门店名称
+ /// - DepartmentId: 事业部ID
+ /// - DepartmentName: 事业部名称
+ /// - InviteCount: 邀约人数(按客户去重)
+ /// - AppointmentCount: 预约人数(按客户去重,无论预约状态)
+ /// - VisitCount: 到店人数(按客户去重,仅统计状态为'已确认'的预约)
+ /// - BillingCount: 开单人数(按开单记录去重)
+ /// - BillingAmount: 开单金额(开单业绩总金额)
+ /// - ConsumeAmount: 消耗金额(消耗业绩总金额)
+ /// - HeadCount: 人头(按客户去重)
+ /// - PersonCount: 人次(按客户+日期去重,同一客户不同天算多次)
+ /// - ProjectCount: 消耗项目数(项目总次数)
+ ///
+ /// 查询参数
+ /// 健康师统计数据列表
+ /// 成功返回统计数据
+ /// 参数错误
+ /// 服务器错误
+ [HttpGet("get-health-coach-statistics")]
+ public async Task GetHealthCoachStatistics([FromQuery] HealthCoachStatisticsQueryInput input)
+ {
+ try
+ {
+ // 设置默认时间范围(如果未提供,默认为当月)
+ var startTime = input.StartTime ?? new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
+ var endTime = input.EndTime ?? DateTime.Now;
+
+ // 构建SQL查询
+ var sql = $@"
+ SELECT
+ u.F_Id as EmployeeId,
+ u.F_REALNAME as EmployeeName,
+ u.F_MDID as StoreId,
+ md.dm as StoreName,
+ md.syb as DepartmentId,
+ dept.F_FullName as DepartmentName,
+
+ -- 邀约人数
+ COALESCE(invite_stats.InviteCount, 0) as InviteCount,
+
+ -- 预约人数(无论状态)
+ COALESCE(appointment_stats.AppointmentCount, 0) as AppointmentCount,
+
+ -- 到店人数(已确认状态)
+ COALESCE(visit_stats.VisitCount, 0) as VisitCount,
+
+ -- 开单人数和金额
+ COALESCE(billing_stats.BillingCount, 0) as BillingCount,
+ COALESCE(billing_stats.BillingAmount, 0) as BillingAmount,
+
+ -- 消耗相关统计
+ COALESCE(consume_stats.ConsumeAmount, 0) as ConsumeAmount,
+ COALESCE(consume_stats.HeadCount, 0) as HeadCount,
+ COALESCE(consume_stats.PersonCount, 0) as PersonCount,
+ COALESCE(consume_stats.ProjectCount, 0) as ProjectCount
+
+ FROM BASE_USER u
+ LEFT JOIN lq_mdxx md ON u.F_MDID = md.F_Id
+ LEFT JOIN base_organize dept ON md.syb = dept.F_Id
+
+ -- 邀约统计子查询
+ LEFT JOIN (
+ SELECT
+ yyr as EmployeeId,
+ COUNT(DISTINCT yykh) as InviteCount
+ FROM lq_yaoyjl
+ WHERE yyr IS NOT NULL
+ AND F_CreateTime >= @startTime
+ AND F_CreateTime <= @endTime
+ GROUP BY yyr
+ ) invite_stats ON u.F_Id = invite_stats.EmployeeId
+
+ -- 预约统计子查询
+ LEFT JOIN (
+ SELECT
+ yyr as EmployeeId,
+ COUNT(DISTINCT gk) as AppointmentCount
+ FROM lq_yyjl
+ WHERE yyr IS NOT NULL
+ AND F_CreateTime >= @startTime
+ AND F_CreateTime <= @endTime
+ GROUP BY yyr
+ ) appointment_stats ON u.F_Id = appointment_stats.EmployeeId
+
+ -- 到店统计子查询
+ LEFT JOIN (
+ SELECT
+ yyr as EmployeeId,
+ COUNT(DISTINCT gk) as VisitCount
+ FROM lq_yyjl
+ WHERE yyr IS NOT NULL
+ AND F_Status = '已确认'
+ AND F_CreateTime >= @startTime
+ AND F_CreateTime <= @endTime
+ GROUP BY yyr
+ ) visit_stats ON u.F_Id = visit_stats.EmployeeId
+
+ -- 开单统计子查询
+ LEFT JOIN (
+ SELECT
+ jkszh as EmployeeId,
+ COUNT(DISTINCT glkdbh) as BillingCount,
+ SUM(CAST(jksyj AS DECIMAL(18,2))) as BillingAmount
+ FROM lq_kd_jksyj
+ WHERE jkszh IS NOT NULL
+ AND F_IsEffective = 1
+ AND yjsj >= @startTime
+ AND yjsj <= @endTime
+ GROUP BY jkszh
+ ) billing_stats ON u.F_Id = billing_stats.EmployeeId
+
+ -- 消耗统计子查询
+ LEFT JOIN (
+ SELECT
+ jksyj.jkszh as EmployeeId,
+ SUM(jksyj.jksyj) as ConsumeAmount,
+ COUNT(DISTINCT hyhk.hy) as HeadCount,
+ COUNT(DISTINCT CONCAT(jksyj.jkszh, '_', hyhk.hy, '_', DATE(hyhk.hksj))) as PersonCount,
+ SUM(jksyj.F_kdpxNumber) as ProjectCount
+ FROM lq_xh_jksyj jksyj
+ INNER JOIN lq_xh_hyhk hyhk ON jksyj.glkdbh = hyhk.F_Id
+ WHERE jksyj.jkszh IS NOT NULL
+ AND jksyj.F_IsEffective = 1
+ AND hyhk.F_IsEffective = 1
+ AND hyhk.hksj >= @startTime
+ AND hyhk.hksj <= @endTime
+ GROUP BY jksyj.jkszh
+ ) consume_stats ON u.F_Id = consume_stats.EmployeeId
+
+ WHERE u.F_GW = '健康师'
+ ";
+
+ // 添加条件过滤
+ var conditions = new List();
+ var parameters = new List
+ {
+ new SugarParameter("@startTime", startTime),
+ new SugarParameter("@endTime", endTime)
+ };
+
+ if (!string.IsNullOrEmpty(input.DepartmentId))
+ {
+ conditions.Add("md.syb = @departmentId");
+ parameters.Add(new SugarParameter("@departmentId", input.DepartmentId));
+ }
+ if (!string.IsNullOrEmpty(input.StoreId))
+ {
+ conditions.Add("u.F_MDID = @storeId");
+ parameters.Add(new SugarParameter("@storeId", input.StoreId));
+ }
+
+ if (!string.IsNullOrEmpty(input.EmployeeName))
+ {
+ conditions.Add("u.F_REALNAME LIKE @employeeName");
+ parameters.Add(new SugarParameter("@employeeName", $"%{input.EmployeeName}%"));
+ }
+
+ if (conditions.Any())
+ {
+ sql += " AND " + string.Join(" AND ", conditions);
+ }
+
+ sql += " ORDER BY u.F_REALNAME";
+
+ // 执行查询
+ var allData = await _db.Ado.SqlQueryAsync(sql, parameters);
+
+ // 手动分页
+ var totalCount = allData.Count;
+ var pagedData = allData
+ .Skip((input.currentPage - 1) * input.pageSize)
+ .Take(input.pageSize)
+ .ToList();
+
+ // 直接返回分页结果
+ return new
+ {
+ list = pagedData,
+ pagination = new
+ {
+ pageIndex = input.currentPage,
+ pageSize = input.pageSize,
+ totalCount = totalCount
+ }
+ };
+ }
+ catch (Exception ex)
+ {
+ _logger.LogError(ex, "获取健康师统计数据失败");
+ throw NCCException.Oh($"获取健康师统计数据失败:{ex.Message}");
+ }
+ }
+ #endregion
}
}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqMdxxService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqMdxxService.cs
index 90a7359..2ebf5f9 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend/LqMdxxService.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqMdxxService.cs
@@ -24,6 +24,7 @@ using NCC.DataEncryption;
using NCC.ClayObject;
using NCC.Extend.Entitys.Enum;
using NCC.Code;
+using NCC.Extend.Entitys.Dto.Common;
namespace NCC.Extend.LqMdxx
{
@@ -120,8 +121,8 @@ namespace NCC.Extend.LqMdxx
rt1 = it.Rt1,
rt2 = it.Rt2,
rc = it.Rc,
- StoreCategory = it.StoreCategory,
- StoreType = it.StoreType,
+ storeCategory = it.StoreCategory,
+ storeType = it.StoreType,
}).MergeTable().OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize);
return PageResult.SqlSugarPageResult(data);
}
@@ -191,8 +192,21 @@ namespace NCC.Extend.LqMdxx
gsmc = it.Gsmc,
fr = it.Fr,
ywsb = it.Ywsb,
- StoreCategory = it.StoreCategory,
- StoreType = it.StoreType,
+ jyb = it.Jyb,
+ kjb = it.Kjb,
+ dxmb = it.Dxmb,
+ syb = it.Syb,
+ gsqssj = it.Gsqssj,
+ gszzsj = it.Gszzsj,
+ status = it.Status,
+ xsyj = it.Xsyj,
+ xhyj = it.Xhyj,
+ xms = it.Xms,
+ rt1 = it.Rt1,
+ rt2 = it.Rt2,
+ rc = it.Rc,
+ storeCategory = it.StoreCategory,
+ storeType = it.StoreType,
}).MergeTable().OrderBy(sidx + " " + input.sort).ToListAsync();
return data;
}
@@ -359,11 +373,14 @@ namespace NCC.Extend.LqMdxx
///
///
[HttpGet("Selector/StoreCategory")]
- public async Task GetStoreCategorySelector()
+ public List GetStoreCategorySelector()
{
- //从Enum中获取门店类别
- var storeCategoryEnum = EnumExtensions.GetEnumDescDictionary(typeof(StoreCategoryEnum));
- return new { list = storeCategoryEnum };
+ return Enum.GetValues().Select(e => new EnumOutput
+ {
+ Value = (int)e,
+ Name = e.ToString(),
+ Description = e.GetDescription(),
+ }).ToList();
}
#endregion
@@ -373,11 +390,18 @@ namespace NCC.Extend.LqMdxx
///
///
[HttpGet("Selector/StoreType")]
- public async Task GetStoreTypeSelector()
+ public List GetStoreTypeSelector()
{
//从Enum中获取门店类型
- var storeTypeEnum = EnumExtensions.GetEnumDescDictionary(typeof(StoreTypeEnum));
- return new { list = storeTypeEnum };
+ var storeTypeEnum = Enum.GetValues()
+ .Select(e => new EnumOutput
+ {
+ Value = (int)e,
+ Name = e.ToString(),
+ Description = e.GetDescription(),
+ })
+ .ToList();
+ return storeTypeEnum;
}
#endregion
}
diff --git a/netcore/src/Modularity/Extend/NCC.Extend/LqPackageInfoService.cs b/netcore/src/Modularity/Extend/NCC.Extend/LqPackageInfoService.cs
index 709f452..2b4aff6 100644
--- a/netcore/src/Modularity/Extend/NCC.Extend/LqPackageInfoService.cs
+++ b/netcore/src/Modularity/Extend/NCC.Extend/LqPackageInfoService.cs
@@ -551,5 +551,163 @@ namespace NCC.Extend.LqPackageInfo
return output;
}
#endregion
+
+ #region 营销活动统计
+ ///
+ /// 获取营销活动统计数据
+ ///
+ ///
+ /// 统计指定营销活动的开单、退卡相关数据
+ /// 包括:开单数量、开单金额、退卡数量、退卡金额、净开单数量、净开单金额、退卡率
+ ///
+ /// 示例请求:
+ /// ```json
+ /// {
+ /// "activityId": "营销活动ID",
+ /// "startTime": "2025-10-01",
+ /// "endTime": "2025-10-31",
+ /// "storeIds": ["门店ID1", "门店ID2"]
+ /// }
+ /// ```
+ ///
+ /// 参数说明:
+ /// - activityId: 营销活动ID(必填)
+ /// - startTime: 开始时间(可选,默认为活动开始时间)
+ /// - endTime: 结束时间(可选,默认为活动结束时间)
+ /// - storeIds: 门店ID列表(可选)
+ ///
+ /// 返回字段说明:
+ /// - ActivityId: 营销活动ID
+ /// - ActivityName: 营销活动名称
+ /// - BillingCount: 开单数量
+ /// - BillingAmount: 开单金额
+ /// - RefundCount: 退卡数量
+ /// - RefundAmount: 退卡金额
+ /// - NetBillingCount: 净开单数量(开单数量 - 退卡数量)
+ /// - NetBillingAmount: 净开单金额(开单金额 - 退卡金额)
+ /// - RefundRate: 退卡率(退卡数量 / 开单数量)
+ ///
+ /// 查询参数
+ /// 营销活动统计数据
+ /// 成功返回统计数据
+ /// 参数错误
+ /// 服务器错误
+ [HttpPost("get-activity-statistics")]
+ public async Task