Blame view

项目文档相关/docs/接口地址清单-储扣分析和店长三项指标.md 7.66 KB
fd65ae16   “wangming”   feat: inventory a...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
  # 接口地址清单
  
  ## 一、门店驾驶舱服务(LqStoreDashboard)
  
  **基础路径**`/api/Extend/LqStoreDashboard`
  
  ### 1. 获取门店驾驶舱统计数据(含储扣分析)
  - **接口地址**`POST /api/Extend/LqStoreDashboard/GetStatistics`
  - **功能说明**:获取指定门店在指定月份的统计数据,包括开单业绩、消耗业绩、完成率、净业绩、储扣分析等
  - **请求参数**
  ```json
  {
    "storeId": "门店ID",
    "statisticsMonth": "202601"
  }
  ```
  - **返回字段**(新增储扣相关):
    - `DeductAmount`:储扣总金额
    - `DeductCount`:储扣次数(按开单计数)
    - `DeductDetailCount`:储扣明细次数
    - `DeductPenetrationRate`:储扣渗透率
    - `DeductAmountRatio`:储扣金额占比
    - `AvgDeductAmount`:平均储扣金额
    - `DeductMemberCount`:储扣会员数
    - `LifeBeautyDeductAmount`:生美储扣金额
    - `MedicalBeautyDeductAmount`:医美储扣金额
    - `TechBeautyDeductAmount`:科美储扣金额
    - `ProductDeductAmount`:产品储扣金额
    - `StorageCardDeductAmount`:储值卡类型储扣金额
    - `ItemDeductAmount`:品项类型储扣金额
  
  ### 2. 获取门店各分类月度业绩(近12个月)
  - **接口地址**`POST /api/Extend/LqStoreDashboard/GetCategoryMonthlyPerformance`
  - **功能说明**:获取指定门店近12个月各分类(生美、医美、科美、产品)的消耗业绩数据
  
  ### 3. 获取门店会员转化漏斗数据
  - **接口地址**`POST /api/Extend/LqStoreDashboard/GetMemberConversionFunnel`
  - **功能说明**:获取指定门店在指定月份的会员转化漏斗数据(拓客-邀约-预约-开单链路)
  
  ### 4. 获取门店客单价与项目数关系数据
  - **接口地址**`POST /api/Extend/LqStoreDashboard/GetCustomerPriceProjectRelation`
  - **功能说明**:获取指定门店在指定月份的客单价与项目数关系数据(用于散点图)
  
  ### 5. 获取门店一周运营热力图数据
  - **接口地址**`POST /api/Extend/LqStoreDashboard/GetWeeklyHeatmap`
  - **功能说明**:获取指定门店在指定月份的一周运营热力图数据(周一到周日,每个时间段9:00-21:00的客流量)
  
  ---
  
  ## 二、店长三项指标统计服务(LqStatistics)
  
  **基础路径**`/api/Extend/LqStatistics`
  
  ### 1. 获取当月全部店长三项指标对比
  - **接口地址**`POST /api/Extend/LqStatistics/get-store-manager-indicators-comparison`
  - **功能说明**:统计指定月份所有店长的三项指标完成情况,包括业绩、人头、消耗指标的完成度和底薪信息
  - **请求参数**
  ```json
  {
    "statisticsMonth": "202601",
    "storeIds": ["门店ID1", "门店ID2"],  // 可选
    "isNewStore": null,  // 可选,true=新店,false=老店,null=全部
    "storeType": null,  // 可选,门店类型
    "indicatorStatus": null  // 可选,"all_reached"=全部达标,"partial"=部分达标,"all_unreached"=全部未达标,null=全部
  }
  ```
  - **返回结构**
  ```json
  {
    "code": 200,
    "msg": "操作成功",
    "data": {
      "list": [
        {
          "StoreId": "门店ID",
          "StoreName": "门店名称",
          "EmployeeId": "员工ID",
          "EmployeeName": "员工姓名",
          "PerformanceIndicator": {
            "Target": 180000.0,
            "Actual": 22728.0,
            "CompletionRate": 12.63,
            "Reached": "否"
          },
          "HeadCountIndicator": {
            "Target": 0.0,
            "Actual": 81,
            "CompletionRate": 0.0,
            "Reached": "是"
          },
          "ConsumeIndicator": {
            "Target": 0.0,
            "Actual": 55634.56,
            "CompletionRate": 0.0,
            "Reached": "是",
            "IsAssessed": true
          },
          "BaseSalary": {
            "FixedSalary": 4000.0,
            "UnreachedIndicatorCount": 1,
            "AssessmentDeduction": 500.0,
            "FlagshipStoreDeduction": 800.0,
            "ActualSalary": 2700.0
          }
        }
      ],
      "summary": {
        "TotalCount": 29,
        "AllReachedCount": 0,
        "PartialReachedCount": 29,
        "AllUnreachedCount": 0,
        "AveragePerformanceCompletionRate": 50.49,
        "AverageHeadCountCompletionRate": 0.0,
        "AverageConsumeCompletionRate": 0.0
      }
    }
  }
  ```
  
  ### 2. 获取店长全年三项指标数据
  - **接口地址**`POST /api/Extend/LqStatistics/get-store-manager-yearly-indicators`
  - **功能说明**:统计指定店长在指定年份的所有月份的三项指标完成情况
  - **请求参数**
  ```json
  {
    "employeeId": "店长ID",
    "year": 2026
  }
  ```
  - **返回结构**
  ```json
  {
    "code": 200,
    "msg": "操作成功",
    "data": {
      "EmployeeId": "19983587302",
      "EmployeeName": "曾玉莲",
      "Year": 2026,
      "MonthlyData": [
        {
          "Month": "202601",
          "StoreName": "绿纤犀浦店",
          "PerformanceIndicator": {...},
          "HeadCountIndicator": {...},
          "ConsumeIndicator": {...},
          "BaseSalary": {...}
        }
      ],
      "YearlySummary": {
        "TotalMonths": 12,
        "WorkedMonths": 3,
        "AveragePerformanceCompletionRate": 7.61,
        "AverageHeadCountCompletionRate": 0.0,
        "AverageConsumeCompletionRate": 0.0,
        "AllReachedMonths": 2,
        "PartialReachedMonths": 1,
        "AllUnreachedMonths": 0,
        "AverageActualSalary": 3833.33,
        "TotalAssessmentDeduction": 500.0
      }
    }
  }
  ```
  
  ---
  
  ## 三、接口调用示例
  
  ### 示例1:查询门店驾驶舱统计数据(含储扣分析)
  ```bash
8daf47d0   “wangming”   修改访问地址
171
  curl -X POST "http://localhost:2015/api/Extend/LqStoreDashboard/GetStatistics" \
fd65ae16   “wangming”   feat: inventory a...
172
173
174
175
176
177
178
179
180
181
    -H "Authorization: Bearer {TOKEN}" \
    -H "Content-Type: application/json" \
    -d '{
      "storeId": "1649328471923847193",
      "statisticsMonth": "202601"
    }'
  ```
  
  ### 示例2:查询当月全部店长三项指标对比
  ```bash
8daf47d0   “wangming”   修改访问地址
182
  curl -X POST "http://localhost:2015/api/Extend/LqStatistics/get-store-manager-indicators-comparison" \
fd65ae16   “wangming”   feat: inventory a...
183
184
185
186
187
188
189
190
191
192
    -H "Authorization: Bearer {TOKEN}" \
    -H "Content-Type: application/json" \
    -d '{
      "statisticsMonth": "202601",
      "indicatorStatus": "all_reached"
    }'
  ```
  
  ### 示例3:查询店长全年三项指标数据
  ```bash
8daf47d0   “wangming”   修改访问地址
193
  curl -X POST "http://localhost:2015/api/Extend/LqStatistics/get-store-manager-yearly-indicators" \
fd65ae16   “wangming”   feat: inventory a...
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
    -H "Authorization: Bearer {TOKEN}" \
    -H "Content-Type: application/json" \
    -d '{
      "employeeId": "19983587302",
      "year": 2026
    }'
  ```
  
  ---
  
  ## 四、接口快速索引
  
  | 功能 | 接口地址 | 方法 |
  |------|---------|------|
  | 门店驾驶舱统计(含储扣) | `/api/Extend/LqStoreDashboard/GetStatistics` | POST |
  | 当月全部店长对比 | `/api/Extend/LqStatistics/get-store-manager-indicators-comparison` | POST |
  | 店长全年数据 | `/api/Extend/LqStatistics/get-store-manager-yearly-indicators` | POST |
  | 门店分类月度业绩 | `/api/Extend/LqStoreDashboard/GetCategoryMonthlyPerformance` | POST |
  | 会员转化漏斗 | `/api/Extend/LqStoreDashboard/GetMemberConversionFunnel` | POST |
  | 客单价项目数关系 | `/api/Extend/LqStoreDashboard/GetCustomerPriceProjectRelation` | POST |
  | 一周运营热力图 | `/api/Extend/LqStoreDashboard/GetWeeklyHeatmap` | POST |
  
  ---
  
  ## 五、注意事项
  
  1. **认证**:所有接口都需要在Header中携带 `Authorization: Bearer {TOKEN}`
  2. **Content-Type**:POST请求需要设置 `Content-Type: application/json`
  3. **时间格式**
     - 统计月份格式:`YYYYMM`(如:202601)
     - 时间范围格式:`yyyy-MM-dd HH:mm:ss`
8daf47d0   “wangming”   修改访问地址
225
  4. **服务地址**:默认 `http://localhost:2015`(根据实际部署环境调整)
fd65ae16   “wangming”   feat: inventory a...
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
  
  ---
  
  ## 六、测试数据参考
  
  ### 测试门店ID
  - 绿纤南湖店:`1649328471923847193`
  - 其他门店:`1649328471923847173`
  
  ### 测试月份
  - 202601(2026年1月)
  - 202512(2025年12月)
  
  ### 测试店长ID
  - 曾玉莲:`19983587302`
  - 肖静梅:`13551112519`