金三角业绩统计接口说明.md 3.05 KB

金三角业绩统计接口说明

接口概述

新增了金三角业绩统计查询接口,根据金三角成员状态进行不同的统计方式。

接口地址

GET /api/Extend/LqYcsdJsj/GetJsjPerformance

功能说明

根据金三角成员状态进行不同的统计方式:

  1. 活跃成员:业绩计入金三角总业绩
  2. 非活跃成员:按单人业绩统计,金三角名称为"门店名+姓名"

请求参数

参数名 类型 必填 说明
startMonth string 开始月份,格式:yyyyMM
endMonth string 结束月份,格式:yyyyMM
jsjId string 金三角ID,用于查询特定金三角
storeId string 门店ID,用于查询特定门店

响应参数

字段名 类型 说明
JsjId string 金三角ID(非活跃成员时为用户ID)
JsjName string 金三角名称(非活跃成员时为"门店名+姓名")
Month string 月份(格式:yyyyMM)
StoreId string 门店ID
StoreName string 门店名称
OrderCount int 订单数量
TotalPerformance decimal 总业绩
LastOrderDate DateTime? 最后订单日期
FirstOrderDate DateTime? 首次订单日期
StatisticsType string 统计类型(ACTIVE-活跃金三角业绩,INACTIVE-单人业绩)
MemberName string 成员姓名(仅单人业绩时使用)

示例请求

GET /api/Extend/LqYcsdJsj/GetJsjPerformance?startMonth=202401&endMonth=202412

示例响应

{
  "code": 200,
  "msg": "操作成功",
  "data": [
    {
      "jsjId": "123456789",
      "jsjName": "金三角A组",
      "month": "202412",
      "storeId": "store001",
      "storeName": "绿纤川音店",
      "orderCount": 15,
      "totalPerformance": 50000.00,
      "lastOrderDate": "2024-12-15T14:30:00",
      "firstOrderDate": "2024-12-01T09:00:00",
      "statisticsType": "ACTIVE",
      "memberName": null
    },
    {
      "jsjId": "987654321",
      "jsjName": "绿纤川音店-张三",
      "month": "202412",
      "storeId": "store001",
      "storeName": "绿纤川音店",
      "orderCount": 8,
      "totalPerformance": 25000.00,
      "lastOrderDate": "2024-12-14T16:20:00",
      "firstOrderDate": "2024-12-02T10:15:00",
      "statisticsType": "INACTIVE",
      "memberName": "张三"
    }
  ]
}

业务逻辑

  1. 活跃成员统计

    • 查询状态为"ACTIVE"的金三角成员
    • 将业绩计入金三角总业绩
    • 按金三角分组统计
  2. 非活跃成员统计

    • 查询状态为"INACTIVE"的金三角成员
    • 按单人业绩统计
    • 金三角名称为"门店名+姓名"格式
  3. 数据排序

    • 按月份降序(最新的月份在前)
    • 按总业绩降序(业绩高的在前)

注意事项

  • 所有查询都是只读操作,不会修改数据库数据
  • 支持按月统计,可以指定月份范围
  • 支持按金三角ID和门店ID进行筛选
  • 返回结果包含统计类型标识,便于前端区分处理