Commit d22582e8 by zhouhaibao

[+]督导团队业绩和个人业绩查询

1 parent 222378e8
...@@ -74,4 +74,10 @@ public class DashboardQueryReq implements Serializable { ...@@ -74,4 +74,10 @@ public class DashboardQueryReq implements Serializable {
@ApiModelProperty(value = "排序方向", example = "1", notes = "排序方向:0.升序 1.降序") @ApiModelProperty(value = "排序方向", example = "1", notes = "排序方向:0.升序 1.降序")
private Integer sortDirection; private Integer sortDirection;
/**
* 是否需要触发AI分析:true-需要,false-不需要
*/
@ApiModelProperty(value = "是否需要触发AI分析", example = "true", notes = "是否需要触发AI分析:true-需要,false-不需要")
private Boolean needAiAnalysis = true;
} }
\ No newline at end of file \ No newline at end of file
...@@ -26,9 +26,9 @@ public class EmployeeBasicInfoReq implements Serializable { ...@@ -26,9 +26,9 @@ public class EmployeeBasicInfoReq implements Serializable {
private String employeeId; private String employeeId;
/** /**
* 督导ID * 手机号
*/ */
@ApiModelProperty(value = "督导ID", example = "123", required = true) @ApiModelProperty(value = "手机号", example = "18845678901", required = true)
private Long supervisorId; private String phone;
} }
\ No newline at end of file \ No newline at end of file
...@@ -163,6 +163,18 @@ public class EmployeeBehaviorDTO implements Serializable { ...@@ -163,6 +163,18 @@ public class EmployeeBehaviorDTO implements Serializable {
private Map<String, String> behaviorTags; private Map<String, String> behaviorTags;
/** /**
* 弱项
*/
@ApiModelProperty(value = "弱项", notes = "弱项")
private Map<String, String> badList;
/**
* 其他
*/
@ApiModelProperty(value = "其他", notes = "其他")
private Map<String, String> ohterList;
/**
* 量化指标 * 量化指标
*/ */
@ApiModelProperty(value = "量化指标") @ApiModelProperty(value = "量化指标")
......
...@@ -33,10 +33,10 @@ public class EmployeeBehaviorReq implements Serializable { ...@@ -33,10 +33,10 @@ public class EmployeeBehaviorReq implements Serializable {
private Long supervisorId; private Long supervisorId;
/** /**
* 场景 * 业务类型:1.延保 2.轻改 3.权益 4.二手车 必传
*/ */
@ApiModelProperty(value = "场景", example = "sales") @ApiModelProperty(value = "业务类型", example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车 必传")
private String scene; private Integer bizs;
/** /**
* 开始日期 * 开始日期
...@@ -56,4 +56,11 @@ public class EmployeeBehaviorReq implements Serializable { ...@@ -56,4 +56,11 @@ public class EmployeeBehaviorReq implements Serializable {
@ApiModelProperty(value = "门店ID", example = "1001") @ApiModelProperty(value = "门店ID", example = "1001")
private Integer merchantId; private Integer merchantId;
/**
* 员工手机号
*/
@ApiModelProperty(value = "员工手机号", example = "13800138000", required = true)
private String phone;
} }
...@@ -99,6 +99,109 @@ public class EmployeePerformanceDTO implements Serializable { ...@@ -99,6 +99,109 @@ public class EmployeePerformanceDTO implements Serializable {
*/ */
@ApiModelProperty(value = "总成交数环比", example = "12%") @ApiModelProperty(value = "总成交数环比", example = "12%")
private String totalDealsRate; private String totalDealsRate;
// 新增指标
/**
* 触客率(指标A064)
*/
@ApiModelProperty(value = "触客率(指标A064)", example = "85%")
private String customerContactRate;
/**
* 转化率(指标A085)
*/
@ApiModelProperty(value = "转化率(指标A085)", example = "75%")
private String conversionRate;
/**
* 渗透率(指标A077)
*/
@ApiModelProperty(value = "渗透率(指标A077)", example = "60%")
private String penetrationRate;
/**
* 平均客单价(指标A095)
*/
@ApiModelProperty(value = "平均客单价(指标A095)", example = "10000")
private Integer avgUnitPrice;
/**
* 新车交付数(指标A062)
*/
@ApiModelProperty(value = "新车交付数(指标A062)", example = "50")
private Integer newCarDeliveryCount;
/**
* 整车延保-渗透率(门店)(指标A067)
*/
@ApiModelProperty(value = "整车延保-渗透率(门店)(指标A067)", example = "45%")
private String vehicleWarrantyPenetrationStore;
/**
* 整车延保-成交数(指标A066)
*/
@ApiModelProperty(value = "整车延保-成交数(指标A066)", example = "20")
private Integer vehicleWarrantyDealCount;
/**
* 电池-渗透率(门店)(指标A094)
*/
@ApiModelProperty(value = "电池-渗透率(门店)(指标A094)", example = "30%")
private String batteryPenetrationStore;
/**
* 电池-成交数(指标A070)
*/
@ApiModelProperty(value = "电池-成交数(指标A070)", example = "15")
private Integer batteryDealCount;
/**
* 安心包-渗透率(门店)(指标A092)
*/
@ApiModelProperty(value = "安心包-渗透率(门店)(指标A092)", example = "25%")
private String safetyPackPenetrationStore;
/**
* 安心包-成交数(指标A086)
*/
@ApiModelProperty(value = "安心包-成交数(指标A086)", example = "10")
private Integer safetyPackDealCount;
/**
* 轮胎成交数(指标A087)
*/
@ApiModelProperty(value = "轮胎成交数(指标A087)", example = "8")
private Integer tireDealCount;
/**
* 轮胎渗透率(门店)(指标A093)
*/
@ApiModelProperty(value = "轮胎渗透率(门店)(指标A093)", example = "20%")
private String tirePenetrationStore;
/**
* 售前触客数(指标A063)
*/
@ApiModelProperty(value = "售前触客数(指标A063)", example = "80")
private Integer preSaleCustomerCount;
/**
* 售后触客数(指标A096)
*/
@ApiModelProperty(value = "售后触客数(指标A096)", example = "49")
private Integer postSaleCustomerCount;
/**
* 售前成交数(指标A097)
*/
@ApiModelProperty(value = "售前成交数(指标A097)", example = "60")
private Integer preSaleDealCount;
/**
* 售后成交数(指标A098)
*/
@ApiModelProperty(value = "售后成交数(指标A098)", example = "41")
private Integer postSaleDealCount;
} }
/** /**
...@@ -136,6 +239,91 @@ public class EmployeePerformanceDTO implements Serializable { ...@@ -136,6 +239,91 @@ public class EmployeePerformanceDTO implements Serializable {
*/ */
@ApiModelProperty(value = "日报完成率", example = "100%") @ApiModelProperty(value = "日报完成率", example = "100%")
private String dailyPerformanceRate; private String dailyPerformanceRate;
// 新增指标
/**
* 触客率(指标A064)
*/
@ApiModelProperty(value = "触客率(指标A064)", example = "85%")
private String customerContactRate;
/**
* 转化率(指标A085)
*/
@ApiModelProperty(value = "转化率(指标A085)", example = "75%")
private String conversionRate;
/**
* 渗透率(指标A077)
*/
@ApiModelProperty(value = "渗透率(指标A077)", example = "60%")
private String penetrationRate;
/**
* 平均客单价(指标A095)
*/
@ApiModelProperty(value = "平均客单价(指标A095)", example = "10000")
private Integer avgUnitPrice;
/**
* 整车延保-渗透率(员工)(指标A0100)
*/
@ApiModelProperty(value = "整车延保-渗透率(员工)(指标A0100)", example = "40%")
private String vehicleWarrantyPenetrationEmployee;
/**
* 整车延保-转化率(指标A099)
*/
@ApiModelProperty(value = "整车延保-转化率(指标A099)", example = "35%")
private String vehicleWarrantyConversionRate;
/**
* 电池-渗透率(员工)(指标A0103)
*/
@ApiModelProperty(value = "电池-渗透率(员工)(指标A0103)", example = "25%")
private String batteryPenetrationEmployee;
/**
* 电池-转化率(指标A091)
*/
@ApiModelProperty(value = "电池-转化率(指标A091)", example = "20%")
private String batteryConversionRate;
/**
* 安心包-渗透率(员工)(指标A0101)
*/
@ApiModelProperty(value = "安心包-渗透率(员工)(指标A0101)", example = "20%")
private String safetyPackPenetrationEmployee;
/**
* 安心包-转化率(指标A089)
*/
@ApiModelProperty(value = "安心包-转化率(指标A089)", example = "15%")
private String safetyPackConversionRate;
/**
* 轮胎渗透率(员工)(指标A0102)
*/
@ApiModelProperty(value = "轮胎渗透率(员工)(指标A0102)", example = "15%")
private String tirePenetrationEmployee;
/**
* 轮胎转化率(指标A090)
*/
@ApiModelProperty(value = "轮胎转化率(指标A090)", example = "10%")
private String tireConversionRate;
/**
* 售前转化率(指标A0104)
*/
@ApiModelProperty(value = "售前转化率(指标A0104)", example = "80%")
private String preSaleConversionRate;
/**
* 售后转化率(指标A0105)
*/
@ApiModelProperty(value = "售后转化率(指标A0105)", example = "65%")
private String postSaleConversionRate;
} }
/** /**
......
...@@ -26,6 +26,12 @@ public class EmployeeStoreTransferDTO implements Serializable { ...@@ -26,6 +26,12 @@ public class EmployeeStoreTransferDTO implements Serializable {
private Integer id; private Integer id;
/** /**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "44210895")
private Integer merchantId;
/**
* 门店名称 * 门店名称
*/ */
@ApiModelProperty(value = "门店名称", example = "深圳市南山界4S店") @ApiModelProperty(value = "门店名称", example = "深圳市南山界4S店")
......
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* 员工调店记录请求DTO * 员工调店记录请求DTO
...@@ -31,4 +32,21 @@ public class EmployeeStoreTransferReq implements Serializable { ...@@ -31,4 +32,21 @@ public class EmployeeStoreTransferReq implements Serializable {
@ApiModelProperty(value = "督导ID", example = "123", required = true) @ApiModelProperty(value = "督导ID", example = "123", required = true)
private Long supervisorId; private Long supervisorId;
/**
* 员工手机号
*/
@ApiModelProperty(value = "员工手机号", example = "19144475436", required = true)
private String phoneNumber;
/**
* 业务类型:1.延保 2.轻改 3.权益 4.二手车
*/
@ApiModelProperty(value = "业务类型", example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车")
private Integer bizs;
/**
* 督导的权限门店集合
*/
@ApiModelProperty(value = "督导的权限门店集合", example = "[44210895, 44210896]")
private List<Integer> merchantIds;
} }
...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.supervisor.dto; ...@@ -2,6 +2,7 @@ package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -95,4 +96,124 @@ public class RecordingItemDTO implements Serializable { ...@@ -95,4 +96,124 @@ public class RecordingItemDTO implements Serializable {
@ApiModelProperty(value = "优秀案例提交按钮是否可点击", example = "true") @ApiModelProperty(value = "优秀案例提交按钮是否可点击", example = "true")
private Boolean caseSubmitButtonEnabled; private Boolean caseSubmitButtonEnabled;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "44210895")
private Integer merchantId;
/**
* 销售UUID
*/
@ApiModelProperty(value = "销售UUID", example = "123_456")
private String salesUuid;
/**
* 销售姓名
*/
@ApiModelProperty(value = "销售姓名", example = "张三")
private String salesName;
/**
* 汽车品牌
*/
@ApiModelProperty(value = "汽车品牌", example = "别克")
private String carBrand;
/**
* 接待开始时间
*/
@ApiModelProperty(value = "接待开始时间", example = "2026-02-01 10:00:00")
private Date receptionStartTime;
/**
* 接待结束时间
*/
@ApiModelProperty(value = "接待结束时间", example = "2026-02-01 11:00:00")
private Date receptionEndTime;
/**
* 接待状态
*/
@ApiModelProperty(value = "接待状态", example = "1")
private Integer receptionStatus;
/**
* 员工UUID
*/
@ApiModelProperty(value = "员工UUID", example = "123_456")
private String staffUuid;
/**
* 录音URL
*/
@ApiModelProperty(value = "录音URL", example = "http://example.com/recording.mp3")
private String recordingUrl;
/**
* 购车方式
*/
@ApiModelProperty(value = "购车方式", example = "贷款")
private String carPurchaseMethod;
/**
* 检查历史标志
*/
@ApiModelProperty(value = "检查历史标志", example = "true")
private Boolean checkHistoryFlag;
/**
* 批次ID
*/
@ApiModelProperty(value = "批次ID", example = "123")
private Integer batchId;
/**
* 质检评分
*/
@ApiModelProperty(value = "质检评分", example = "63")
private Integer score;
/**
* 模型类型
*/
@ApiModelProperty(value = "模型类型", example = "1")
private Integer modelType;
/**
* 检查类型
*/
@ApiModelProperty(value = "检查类型", example = "1")
private Integer checkType;
/**
* 订单完成标志
*/
@ApiModelProperty(value = "订单完成标志", example = "true")
private Boolean orderFinishFlag;
/**
* 一车品牌
*/
@ApiModelProperty(value = "一车品牌", example = "别克")
private String oneCarBrand;
/**
* 攻防评分
*/
@ApiModelProperty(value = "攻防评分", example = "6.7")
private Double gfScroe;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号", example = "13812345678")
private String phoneNumber;
/**
* 商户名称
*/
@ApiModelProperty(value = "商户名称", example = "深圳市南山界4S店")
private String merchantName;
} }
\ No newline at end of file \ No newline at end of file
...@@ -50,4 +50,10 @@ public class RecordingListDTO implements Serializable { ...@@ -50,4 +50,10 @@ public class RecordingListDTO implements Serializable {
@ApiModelProperty(value = "每页大小", example = "10") @ApiModelProperty(value = "每页大小", example = "10")
private Integer pageSize; private Integer pageSize;
/**
* 按日期分组的摘要信息列表
*/
@ApiModelProperty(value = "按日期分组的摘要信息列表")
private List<RecordingSummaryDTO> dateSummaryList;
} }
\ No newline at end of file \ No newline at end of file
...@@ -40,13 +40,13 @@ public class RecordingQueryReq implements Serializable { ...@@ -40,13 +40,13 @@ public class RecordingQueryReq implements Serializable {
/** /**
* 开始日期 * 开始日期
*/ */
@ApiModelProperty(value = "开始日期", example = "2026-02-01") @ApiModelProperty(value = "开始日期", example = "2026-02-01", required = true)
private String startDate; private String startDate;
/** /**
* 结束日期 * 结束日期
*/ */
@ApiModelProperty(value = "结束日期", example = "2026-02-29") @ApiModelProperty(value = "结束日期", example = "2026-02-29", required = true)
private String endDate; private String endDate;
/** /**
...@@ -67,4 +67,16 @@ public class RecordingQueryReq implements Serializable { ...@@ -67,4 +67,16 @@ public class RecordingQueryReq implements Serializable {
@ApiModelProperty(value = "接待结果(成交/战败)", example = "成交") @ApiModelProperty(value = "接待结果(成交/战败)", example = "成交")
private String receptionResult; private String receptionResult;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "44210895", required = true)
private Integer merchantId;
/**
* 业务类型
*/
@ApiModelProperty(value = "业务类型", example = "1", required = true)
private Integer biz;
} }
\ No newline at end of file \ No newline at end of file
...@@ -75,6 +75,12 @@ ...@@ -75,6 +75,12 @@
<artifactId>rpc-dj-pe-analysis-api</artifactId> <artifactId>rpc-dj-pe-analysis-api</artifactId>
<version>5.7.0-SNAPSHOT</version> <version>5.7.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file \ No newline at end of file
...@@ -16,4 +16,8 @@ public class SmartcarlifeDubboConfig extends DubboConfig { ...@@ -16,4 +16,8 @@ public class SmartcarlifeDubboConfig extends DubboConfig {
public StaffBaseInfoRemote staffBaseInfoRemote() { public StaffBaseInfoRemote staffBaseInfoRemote() {
return factory.builder(StaffBaseInfoRemote.class).check(check).timeout(timeout).version("1.0.0").build(); return factory.builder(StaffBaseInfoRemote.class).check(check).timeout(timeout).version("1.0.0").build();
} }
@Bean
public ShopMerchantDirectorConfigRemote ShopMerchantDirectorConfigRemote() {
return factory.builder(ShopMerchantDirectorConfigRemote.class).check(check).timeout(timeout).version("1.0.0").build();
}
} }
package cn.com.glsx.dj.supervisor.mapper; package cn.com.glsx.dj.supervisor.mapper;
import cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferDTO;
import cn.com.glsx.dj.supervisor.dto.RecordingItemDTO;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* 业务场景Mapper * 业务场景Mapper
* <p> * <p>
* 用于查询员工的业务场景标签 * 用于查询员工的业务场景标签、调店记录和录音列表
* </p> * </p>
* *
* @author fanfr * @author fanfr
...@@ -22,7 +26,140 @@ public interface BusinessSceneMapper { ...@@ -22,7 +26,140 @@ public interface BusinessSceneMapper {
* @param phoneNumber 手机号 * @param phoneNumber 手机号
* @return 业务场景标签,格式为逗号分隔的字符串 * @return 业务场景标签,格式为逗号分隔的字符串
*/ */
@Select("SELECT COALESCE(GROUP_CONCAT(DISTINCT CASE WHEN go.scene_type = 1 THEN '1' WHEN go.scene_type = 0 THEN CASE WHEN go.business_type = 1 THEN '2' WHEN go.business_type = 2 THEN '3' END END ORDER BY CASE WHEN go.scene_type = 1 THEN '1' WHEN go.scene_type = 0 AND go.business_type = 1 THEN '2' WHEN go.scene_type = 0 AND go.business_type = 2 THEN '3' END SEPARATOR ', '), '') AS staff_scene_label FROM dj_car_life_staff_info si LEFT JOIN dj_car_life_goods_order go ON si.staff_uuid = go.seller_user_id AND go.install_upgrade_time >= DATE_SUB(CURDATE(), INTERVAL 30 DAY) WHERE si.phone_number = #{phoneNumber} GROUP BY si.phone_number")
String getBusinessSceneByPhoneNumber(@Param("phoneNumber") String phoneNumber); String getBusinessSceneByPhoneNumber(@Param("phoneNumber") String phoneNumber);
/**
* 查询员工调店记录
* <p>
* 根据业务类型和场景类型查询员工调店记录
* biz = 1, scene_type = 0, business_type = 2 (延保)
* biz = 2, scene_type = 1 (轻改)
* biz = 3, scene_type = 0, business_type = 1 (权益)
* </p>
*
* @param phoneNumber 员工手机号
* @param merchantIds 督导的权限门店集合
* @param bizs 业务类型
* @return 员工调店记录列表
*/
List<EmployeeStoreTransferDTO> getEmployeeStoreTransferRecords(
@Param("phoneNumber") String phoneNumber,
@Param("merchantIds") List<Integer> merchantIds,
@Param("bizs") Integer bizs
);
/**
* 查询录音列表
* <p>
* 根据员工UUID、门店ID、业务类型和日期范围查询录音列表
* </p>
*
* @param merchantId 门店ID
* @param uuid 员工UUID
* @param biz 业务类型
* @param startDate 开始日期
* @param endDate 结束日期
* @return 录音列表
*/
List<RecordingItemDTO> getRecordingList(
@Param("merchantId") Integer merchantId,
@Param("uuid") String uuid,
@Param("biz") Integer biz,
@Param("startDate") String startDate,
@Param("endDate") String endDate
);
/**
* 获取考勤统计和着装预警数据
* <p>
* 根据员工手机号和日期范围查询考勤统计和着装预警数据
* </p>
*
* @param staffPhone 员工手机号
* @param startDate 开始日期
* @param endDate 结束日期
* @return 考勤统计和着装预警数据
*/
Map<String, Object> getAttendanceAndDressCodeData(
@Param("staffPhone") String staffPhone,
@Param("startDate") String startDate,
@Param("endDate") String endDate
);
/**
* 获取日报统计数据
* <p>
* 根据员工UUID、门店ID、业务类型和日期范围查询日报统计数据
* </p>
*
* @param staffUuid 员工UUID
* @param merchantId 门店ID
* @param biz 业务类型
* @param startDate 开始日期
* @param endDate 结束日期
* @return 日报统计数据
*/
Map<String, Object> getDailyReportData(
@Param("staffUuid") String staffUuid,
@Param("merchantId") Integer merchantId,
@Param("biz") Integer biz,
@Param("startDate") String startDate,
@Param("endDate") String endDate
);
/**
* 获取客户接待数据
* <p>
* 根据门店ID、业务类型和日期范围查询客户接待数据
* </p>
*
* @param merchantId 门店ID
* @param biz 业务类型
* @param startDate 开始日期
* @param endDate 结束日期
* @return 客户接待数据
*/
Map<String, Object> getCustomerReceptionData(
@Param("merchantId") Integer merchantId,
@Param("biz") Integer biz,
@Param("startDate") String startDate,
@Param("endDate") String endDate
);
/**
* 获取录音分析数据
* <p>
* 根据员工UUID、门店ID、业务类型和日期范围查询录音分析数据
* </p>
*
* @param staffUuid 嘘工UUID
* @param merchantId 门店ID
* @param biz 业务类型
* @param startDate 开始日期
* @param endDate 结束日期
* @param receptionCount 接待数量
* @return 录音分析数据
*/
Map<String, Object> getRecordingAnalysisData(
@Param("staffUuid") String staffUuid,
@Param("merchantId") Integer merchantId,
@Param("biz") Integer biz,
@Param("startDate") String startDate,
@Param("endDate") String endDate,
@Param("receptionCount") Integer receptionCount
);
/**
* 获取行为标签数据
* <p>
* 根据员工手机号列表查询行为标签数据
* </p>
*
* @param phones 员工手机号列表
* @return 行为标签数据
*/
List<Map<String, Object>> getBehaviorTags(
@Param("phones") List<String> phones
);
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!