Commit d286ece3 by zhouhaibao

[+]驻店员工逻辑调整

1 parent 9a79d868
Showing 17 changed files with 254 additions and 233 deletions
......@@ -25,59 +25,59 @@ public class DashboardQueryReq implements Serializable {
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true, notes = "督导ID")
@ApiModelProperty(notes = "督导ID", example = "123", required = true)
@NotNull
private String supervisorId;
/**
* 当前选中的开始日期
*/
@ApiModelProperty(value = "当前选中的开始日期", example = "2026-02-01", required = true, notes = "当前选中的开始日期")
@ApiModelProperty(notes = "当前选中的开始日期", example = "2026-02-01", required = true)
@NotNull
private String startDate; // 当前选中的基准日期
/**
* 当前选中的结束日期
*/
@ApiModelProperty(value = "当前选中的结束日期", example = "2026-02-29", required = true, notes = "当前选中的结束日期")
@ApiModelProperty(notes = "当前选中的结束日期", example = "2026-02-29", required = true)
@NotNull
private String endDate;
/**
* 日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部
*/
@ApiModelProperty(value = "日期类型", example = "0", required = true, notes = "日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部")
@ApiModelProperty(notes = "日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部", example = "0", required = true)
@NotNull
private Integer dateType;
/**
* 业务类型:1.延保 2.轻改 3.权益 4.二手车 必传
*/
@ApiModelProperty(value = "业务类型", example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车 必传")
@ApiModelProperty(notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车 必传", example = "1")
private Integer bizs;
/**
* 门店ID列表
*/
@ApiModelProperty(value = "门店ID列表", notes = "门店ID列表")
@ApiModelProperty(notes = "门店ID列表")
private List<Integer> merchantIds;
/**
* 排序字段:1.产值 2.客单价 3.转化率 4.成交数 5.战败数 6.录音数
*/
@ApiModelProperty(value = "排序字段", example = "1", notes = "排序字段:1.产值 2.客单价 3.转化率 4.成交数 5.战败数 6.录音数")
@ApiModelProperty(notes = "排序字段:1.产值 2.客单价 3.转化率 4.成交数 5.战败数 6.录音数", example = "1")
private Integer sortField;
/**
* 排序方向:0.升序 1.降序
*/
@ApiModelProperty(value = "排序方向", example = "1", notes = "排序方向:0.升序 1.降序")
@ApiModelProperty(notes = "排序方向:0.升序 1.降序", example = "1")
private Integer sortDirection;
/**
* 是否需要触发AI分析:true-需要,false-不需要
*/
@ApiModelProperty(value = "是否需要触发AI分析", example = "true", notes = "是否需要触发AI分析:true-需要,false-不需要")
@ApiModelProperty(notes = "是否需要触发AI分析:true-需要,false-不需要", example = "true")
private Boolean needAiAnalysis = true;
}
\ No newline at end of file
......@@ -22,79 +22,79 @@ public class EmployeeBasicInfoDTO implements Serializable {
/**
* 姓名
*/
@ApiModelProperty(value = "姓名", example = "周芳")
@ApiModelProperty(notes = "姓名", example = "周芳")
private String name;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号", example = "13812345678")
@ApiModelProperty(notes = "手机号", example = "13812345678")
private String phone;
/**
* 归属业务
*/
@ApiModelProperty(value = "归属业务", example = "延保")
@ApiModelProperty(notes = "归属业务", example = "延保")
private String business;
/**
* 入职时间
*/
@ApiModelProperty(value = "入职时间", example = "2025-12-12")
@ApiModelProperty(notes = "入职时间", example = "2025-12-12")
private String entryDate;
/**
* 年龄
*/
@ApiModelProperty(value = "年龄", example = "33")
@ApiModelProperty(notes = "年龄", example = "33")
private Integer age;
/**
* 出生日期
*/
@ApiModelProperty(value = "出生日期", example = "1993-03-26")
@ApiModelProperty(notes = "出生日期", example = "1993-03-26")
private String birthday;
/**
* 民族
*/
@ApiModelProperty(value = "民族", example = "汉")
@ApiModelProperty(notes = "民族", example = "汉")
private String ethnicity;
/**
* 籍贯
*/
@ApiModelProperty(value = "籍贯", example = "陕西省/延安市")
@ApiModelProperty(notes = "籍贯", example = "陕西省/延安市")
private String origin;
/**
* 入职部门
*/
@ApiModelProperty(value = "入职部门", example = "运营零售部门")
@ApiModelProperty(notes = "入职部门", example = "运营零售部门")
private String department;
/**
* 职务
*/
@ApiModelProperty(value = "职务", example = "延保门店销售")
@ApiModelProperty(notes = "职务", example = "延保门店销售")
private String position;
/**
* 直线经理
*/
@ApiModelProperty(value = "直线经理", example = "XXX")
@ApiModelProperty(notes = "直线经理", example = "XXX")
private String manager;
/**
* 性别
*/
@ApiModelProperty(value = "性别", example = "女")
@ApiModelProperty(notes = "性别", example = "女")
private String gender;
/**
* 政治面貌
*/
@ApiModelProperty(value = "政治面貌", example = "党员")
@ApiModelProperty(notes = "政治面貌", example = "党员")
private String politicalStatus;
}
......@@ -22,13 +22,13 @@ public class EmployeeBasicInfoReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
@ApiModelProperty(notes = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号", example = "18845678901", required = true)
@ApiModelProperty(notes = "手机号", example = "18845678901", required = true)
private String phone;
}
\ No newline at end of file
......@@ -24,37 +24,37 @@ public class EmployeeBehaviorDTO implements Serializable {
/**
* AI建议
*/
@ApiModelProperty(value = "AI建议", example = "该员工学习时长领先但线索转化率低于平均水平,建议加强成交环节的实操带教")
@ApiModelProperty(notes = "AI建议", example = "该员工学习时长领先但线索转化率低于平均水平,建议加强成交环节的实操带教")
private String aiSuggestion;
/**
* 考勤统计
*/
@ApiModelProperty(value = "考勤统计")
@ApiModelProperty(notes = "考勤统计")
private AttendanceData attendance;
/**
* 日报统计
*/
@ApiModelProperty(value = "日报统计")
@ApiModelProperty(notes = "日报统计")
private DailyReportData dailyReport;
/**
* 客户接待
*/
@ApiModelProperty(value = "客户接待")
@ApiModelProperty(notes = "客户接待")
private CustomerReceptionData customerReception;
/**
* 录音分析
*/
@ApiModelProperty(value = "录音分析")
@ApiModelProperty(notes = "录音分析")
private RecordingAnalysisData recordingAnalysis;
/**
* 着装预警
*/
@ApiModelProperty(value = "着装预警")
@ApiModelProperty(notes = "着装预警")
private DressCodeWarningData dressCodeWarning;
/**
......@@ -66,25 +66,25 @@ public class EmployeeBehaviorDTO implements Serializable {
/**
* 打卡天数
*/
@ApiModelProperty(value = "打卡天数", example = "1")
@ApiModelProperty(notes = "打卡天数", example = "1")
private Integer checkInDays;
/**
* 迟到次数
*/
@ApiModelProperty(value = "迟到次数", example = "1")
@ApiModelProperty(notes = "迟到次数", example = "1")
private Integer late;
/**
* 早退次数
*/
@ApiModelProperty(value = "早退次数", example = "1")
@ApiModelProperty(notes = "早退次数", example = "1")
private Integer earlyLeave;
/**
* 旷工次数
*/
@ApiModelProperty(value = "旷工次数", example = "1")
@ApiModelProperty(notes = "旷工次数", example = "1")
private Integer absenteeism;
}
......@@ -97,31 +97,31 @@ public class EmployeeBehaviorDTO implements Serializable {
/**
* 已提交
*/
@ApiModelProperty(value = "已提交", example = "0")
@ApiModelProperty(notes = "已提交", example = "0")
private Integer submitted;
/**
* 未提交
*/
@ApiModelProperty(value = "未提交", example = "1")
@ApiModelProperty(notes = "未提交", example = "1")
private Integer notSubmitted;
/**
* 在岗
*/
@ApiModelProperty(value = "在岗", example = "0")
@ApiModelProperty(notes = "在岗", example = "0")
private Integer onDuty;
/**
* 调休
*/
@ApiModelProperty(value = "调休", example = "0")
@ApiModelProperty(notes = "调休", example = "0")
private Integer rest;
/**
* 日报完成率
*/
@ApiModelProperty(value = "日报完成率", example = "85%")
@ApiModelProperty(notes = "日报完成率", example = "85%")
private String completionRate;
}
......@@ -134,19 +134,19 @@ public class EmployeeBehaviorDTO implements Serializable {
/**
* 实际交车数(指标A062)
*/
@ApiModelProperty(value = "实际交车数(指标A062)", example = "4")
@ApiModelProperty(notes = "实际交车数(指标A062)", example = "4")
private Integer actualDelivery;
/**
* 接待数量(指标A084)
*/
@ApiModelProperty(value = "接待数量(指标A084)", example = "2")
@ApiModelProperty(notes = "接待数量(指标A084)", example = "2")
private Integer receptionCount;
/**
* 未触客数
*/
@ApiModelProperty(value = "未触客数", example = "2")
@ApiModelProperty(notes = "未触客数", example = "2")
private Integer notTouched;
}
......@@ -159,25 +159,25 @@ public class EmployeeBehaviorDTO implements Serializable {
/**
* 行为标签
*/
@ApiModelProperty(value = "行为标签")
@ApiModelProperty(notes = "行为标签")
private Map<String, String> behaviorTags;
/**
* 弱项
*/
@ApiModelProperty(value = "弱项", notes = "弱项")
@ApiModelProperty(notes = "弱项")
private Map<String, String> badList;
/**
* 其他
*/
@ApiModelProperty(value = "其他", notes = "其他")
@ApiModelProperty(notes = "其他")
private Map<String, String> ohterList;
/**
* 量化指标
*/
@ApiModelProperty(value = "量化指标")
@ApiModelProperty(notes = "量化指标")
private QuantitativeIndicators quantitativeIndicators;
}
......@@ -190,43 +190,43 @@ public class EmployeeBehaviorDTO implements Serializable {
/**
* 录音数
*/
@ApiModelProperty(value = "录音数", example = "2")
@ApiModelProperty(notes = "录音数", example = "2")
private Integer recordingCount;
/**
* 成交数
*/
@ApiModelProperty(value = "成交数", example = "1")
@ApiModelProperty(notes = "成交数", example = "1")
private Integer dealCount;
/**
* 战败数
*/
@ApiModelProperty(value = "战败数", example = "1")
@ApiModelProperty(notes = "战败数", example = "1")
private Integer defeatCount;
/**
* 成交率
*/
@ApiModelProperty(value = "成交率", example = "50%")
@ApiModelProperty(notes = "成交率", example = "50%")
private String dealRate;
/**
* 质检平均分
*/
@ApiModelProperty(value = "质检平均分", example = "2")
@ApiModelProperty(notes = "质检平均分", example = "2")
private Integer qualityScore;
/**
* 攻防平均分
*/
@ApiModelProperty(value = "攻防平均分", example = "1")
@ApiModelProperty(notes = "攻防平均分", example = "1")
private Integer attackDefenseScore;
/**
* 录音缺失率
*/
@ApiModelProperty(value = "录音缺失率", example = "1")
@ApiModelProperty(notes = "录音缺失率", example = "1")
private Integer recordingMissingRate;
}
......@@ -239,7 +239,7 @@ public class EmployeeBehaviorDTO implements Serializable {
/**
* 预警次数
*/
@ApiModelProperty(value = "预警次数", example = "1")
@ApiModelProperty(notes = "预警次数", example = "1")
private Integer warningCount;
}
......
......@@ -23,43 +23,43 @@ public class EmployeeBehaviorReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
@ApiModelProperty(notes = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
@ApiModelProperty(notes = "督导ID", example = "123", required = true)
private Long supervisorId;
/**
* 业务类型:1.延保 2.轻改 3.权益 4.二手车 必传
*/
@ApiModelProperty(value = "业务类型", example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车 必传")
@ApiModelProperty(example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车 必传")
private Integer bizs;
/**
* 开始日期
*/
@ApiModelProperty(value = "开始日期", example = "2026-02-01")
@ApiModelProperty(notes = "开始日期", example = "2026-02-01")
private String startDate;
/**
* 结束日期
*/
@ApiModelProperty(value = "结束日期", example = "2026-02-29")
@ApiModelProperty(notes = "结束日期", example = "2026-02-29")
private String endDate;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "1001")
@ApiModelProperty(notes = "门店ID", example = "1001")
private Integer merchantId;
/**
* 员工手机号
*/
@ApiModelProperty(value = "员工手机号", example = "13800138000", required = true)
@ApiModelProperty(notes = "员工手机号", example = "13800138000", required = true)
private String phone;
......
......@@ -25,25 +25,25 @@ public class EmployeePerformanceDTO implements Serializable {
/**
* AI建议
*/
@ApiModelProperty(value = "AI建议", example = "该员工学习时长领先但线索转化率低于平均水平,建议加强成交环节的实操带教")
@ApiModelProperty(notes = "AI建议", example = "该员工学习时长领先但线索转化率低于平均水平,建议加强成交环节的实操带教")
private String aiSuggestion;
/**
* 门店数据
*/
@ApiModelProperty(value = "门店数据")
@ApiModelProperty(notes = "门店数据")
private StorePerformanceData storeData;
/**
* 人员数据
*/
@ApiModelProperty(value = "人员数据")
@ApiModelProperty(notes = "人员数据")
private EmployeeData employeeData;
/**
* 个人产值趋势
*/
@ApiModelProperty(value = "个人产值趋势")
@ApiModelProperty(notes = "个人产值趋势")
private List<TrendData> trendData;
/**
......@@ -55,152 +55,152 @@ public class EmployeePerformanceDTO implements Serializable {
/**
* 总产值(指标A036)
*/
@ApiModelProperty(value = "总产值(指标A036)", example = "15000")
@ApiModelProperty(notes = "总产值(指标A036)", example = "15000")
private Integer totalValue;
/**
* 总产值环比
*/
@ApiModelProperty(value = "总产值环比", example = "10%")
@ApiModelProperty(notes = "总产值环比", example = "10%")
private String totalValueRate;
/**
* 客单价(指标A076)
*/
@ApiModelProperty(value = "客单价(指标A076)", example = "12000")
@ApiModelProperty(notes = "客单价(指标A076)", example = "12000")
private Integer averagePrice;
/**
* 客单价环比
*/
@ApiModelProperty(value = "客单价环比", example = "5%")
@ApiModelProperty(notes = "客单价环比", example = "5%")
private String averagePriceRate;
/**
* 总触客数(指标A084)
*/
@ApiModelProperty(value = "总触客数(指标A084)", example = "129")
@ApiModelProperty(notes = "总触客数(指标A084)", example = "129")
private Integer totalCustomers;
/**
* 总触客数环比
*/
@ApiModelProperty(value = "总触客数环比", example = "8%")
@ApiModelProperty(notes = "总触客数环比", example = "8%")
private String totalCustomersRate;
/**
* 总成交数(指标A075)
*/
@ApiModelProperty(value = "总成交数(指标A075)", example = "101")
@ApiModelProperty(notes = "总成交数(指标A075)", example = "101")
private Integer totalDeals;
/**
* 总成交数环比
*/
@ApiModelProperty(value = "总成交数环比", example = "12%")
@ApiModelProperty(notes = "总成交数环比", example = "12%")
private String totalDealsRate;
// 新增指标
/**
* 触客率(指标A064)
*/
@ApiModelProperty(value = "触客率(指标A064)", example = "85%")
@ApiModelProperty(notes = "触客率(指标A064)", example = "85%")
private String customerContactRate;
/**
* 转化率(指标A085)
*/
@ApiModelProperty(value = "转化率(指标A085)", example = "75%")
@ApiModelProperty(notes = "转化率(指标A085)", example = "75%")
private String conversionRate;
/**
* 渗透率(指标A077)
*/
@ApiModelProperty(value = "渗透率(指标A077)", example = "60%")
@ApiModelProperty(notes = "渗透率(指标A077)", example = "60%")
private String penetrationRate;
/**
* 平均客单价(指标A095)
*/
@ApiModelProperty(value = "平均客单价(指标A095)", example = "10000")
@ApiModelProperty(notes = "平均客单价(指标A095)", example = "10000")
private Integer avgUnitPrice;
/**
* 新车交付数(指标A062)
*/
@ApiModelProperty(value = "新车交付数(指标A062)", example = "50")
@ApiModelProperty(notes = "新车交付数(指标A062)", example = "50")
private Integer newCarDeliveryCount;
/**
* 整车延保-渗透率(门店)(指标A067)
*/
@ApiModelProperty(value = "整车延保-渗透率(门店)(指标A067)", example = "45%")
@ApiModelProperty(notes = "整车延保-渗透率(门店)(指标A067)", example = "45%")
private String vehicleWarrantyPenetrationStore;
/**
* 整车延保-成交数(指标A066)
*/
@ApiModelProperty(value = "整车延保-成交数(指标A066)", example = "20")
@ApiModelProperty(notes = "整车延保-成交数(指标A066)", example = "20")
private Integer vehicleWarrantyDealCount;
/**
* 电池-渗透率(门店)(指标A094)
*/
@ApiModelProperty(value = "电池-渗透率(门店)(指标A094)", example = "30%")
@ApiModelProperty(notes = "电池-渗透率(门店)(指标A094)", example = "30%")
private String batteryPenetrationStore;
/**
* 电池-成交数(指标A070)
*/
@ApiModelProperty(value = "电池-成交数(指标A070)", example = "15")
@ApiModelProperty(notes = "电池-成交数(指标A070)", example = "15")
private Integer batteryDealCount;
/**
* 安心包-渗透率(门店)(指标A092)
*/
@ApiModelProperty(value = "安心包-渗透率(门店)(指标A092)", example = "25%")
@ApiModelProperty(notes = "安心包-渗透率(门店)(指标A092)", example = "25%")
private String safetyPackPenetrationStore;
/**
* 安心包-成交数(指标A086)
*/
@ApiModelProperty(value = "安心包-成交数(指标A086)", example = "10")
@ApiModelProperty(notes = "安心包-成交数(指标A086)", example = "10")
private Integer safetyPackDealCount;
/**
* 轮胎成交数(指标A087)
*/
@ApiModelProperty(value = "轮胎成交数(指标A087)", example = "8")
@ApiModelProperty(notes = "轮胎成交数(指标A087)", example = "8")
private Integer tireDealCount;
/**
* 轮胎渗透率(门店)(指标A093)
*/
@ApiModelProperty(value = "轮胎渗透率(门店)(指标A093)", example = "20%")
@ApiModelProperty(notes = "轮胎渗透率(门店)(指标A093)", example = "20%")
private String tirePenetrationStore;
/**
* 售前触客数(指标A063)
*/
@ApiModelProperty(value = "售前触客数(指标A063)", example = "80")
@ApiModelProperty(notes = "售前触客数(指标A063)", example = "80")
private Integer preSaleCustomerCount;
/**
* 售后触客数(指标A096)
*/
@ApiModelProperty(value = "售后触客数(指标A096)", example = "49")
@ApiModelProperty(notes = "售后触客数(指标A096)", example = "49")
private Integer postSaleCustomerCount;
/**
* 售前成交数(指标A097)
*/
@ApiModelProperty(value = "售前成交数(指标A097)", example = "60")
@ApiModelProperty(notes = "售前成交数(指标A097)", example = "60")
private Integer preSaleDealCount;
/**
* 售后成交数(指标A098)
*/
@ApiModelProperty(value = "售后成交数(指标A098)", example = "41")
@ApiModelProperty(notes = "售后成交数(指标A098)", example = "41")
private Integer postSaleDealCount;
}
......@@ -213,178 +213,178 @@ public class EmployeePerformanceDTO implements Serializable {
/**
* 总产值
*/
@ApiModelProperty(value = "总产值", example = "93196")
@ApiModelProperty(notes = "总产值", example = "93196")
private Integer totalValue;
/**
* 总产值环比
*/
@ApiModelProperty(value = "总产值环比", example = "15%")
@ApiModelProperty(notes = "总产值环比", example = "15%")
private String totalValueRate;
/**
* 客单价
*/
@ApiModelProperty(value = "客单价", example = "11649.5")
@ApiModelProperty(notes = "客单价", example = "11649.5")
private Double averagePrice;
/**
* 客单价环比
*/
@ApiModelProperty(value = "客单价环比", example = "8%")
@ApiModelProperty(notes = "客单价环比", example = "8%")
private String averagePriceRate;
/**
* 日报完成率
*/
@ApiModelProperty(value = "日报完成率", example = "100%")
@ApiModelProperty(notes = "日报完成率", example = "100%")
private String dailyPerformanceRate;
// 新增指标
/**
* 触客率(指标A064)
*/
@ApiModelProperty(value = "触客率(指标A064)", example = "85%")
@ApiModelProperty(notes = "触客率(指标A064)", example = "85%")
private String customerContactRate;
/**
* 转化率(指标A085)
*/
@ApiModelProperty(value = "转化率(指标A085)", example = "75%")
@ApiModelProperty(notes = "转化率(指标A085)", example = "75%")
private String conversionRate;
/**
* 渗透率(指标A077)
*/
@ApiModelProperty(value = "渗透率(指标A077)", example = "60%")
@ApiModelProperty(notes = "渗透率(指标A077)", example = "60%")
private String penetrationRate;
/**
* 平均客单价(指标A095)
*/
@ApiModelProperty(value = "平均客单价(指标A095)", example = "10000")
@ApiModelProperty(notes = "平均客单价(指标A095)", example = "10000")
private Integer avgUnitPrice;
/**
* 整车延保-渗透率(员工)(指标A0100)
*/
@ApiModelProperty(value = "整车延保-渗透率(员工)(指标A0100)", example = "40%")
@ApiModelProperty(notes = "整车延保-渗透率(员工)(指标A0100)", example = "40%")
private String vehicleWarrantyPenetrationEmployee;
/**
* 整车延保-转化率(指标A099)
*/
@ApiModelProperty(value = "整车延保-转化率(指标A099)", example = "35%")
@ApiModelProperty(notes = "整车延保-转化率(指标A099)", example = "35%")
private String vehicleWarrantyConversionRate;
/**
* 电池-渗透率(员工)(指标A0103)
*/
@ApiModelProperty(value = "电池-渗透率(员工)(指标A0103)", example = "25%")
@ApiModelProperty(notes = "电池-渗透率(员工)(指标A0103)", example = "25%")
private String batteryPenetrationEmployee;
/**
* 电池-转化率(指标A091)
*/
@ApiModelProperty(value = "电池-转化率(指标A091)", example = "20%")
@ApiModelProperty(notes = "电池-转化率(指标A091)", example = "20%")
private String batteryConversionRate;
/**
* 安心包-渗透率(员工)(指标A0101)
*/
@ApiModelProperty(value = "安心包-渗透率(员工)(指标A0101)", example = "20%")
@ApiModelProperty(notes = "安心包-渗透率(员工)(指标A0101)", example = "20%")
private String safetyPackPenetrationEmployee;
/**
* 安心包-转化率(指标A089)
*/
@ApiModelProperty(value = "安心包-转化率(指标A089)", example = "15%")
@ApiModelProperty(notes = "安心包-转化率(指标A089)", example = "15%")
private String safetyPackConversionRate;
/**
* 轮胎渗透率(员工)(指标A0102)
*/
@ApiModelProperty(value = "轮胎渗透率(员工)(指标A0102)", example = "15%")
@ApiModelProperty(notes = "轮胎渗透率(员工)(指标A0102)", example = "15%")
private String tirePenetrationEmployee;
/**
* 轮胎转化率(指标A090)
*/
@ApiModelProperty(value = "轮胎转化率(指标A090)", example = "10%")
@ApiModelProperty(notes = "轮胎转化率(指标A090)", example = "10%")
private String tireConversionRate;
/**
* 售前转化率(指标A0104)
*/
@ApiModelProperty(value = "售前转化率(指标A0104)", example = "80%")
@ApiModelProperty(notes = "售前转化率(指标A0104)", example = "80%")
private String preSaleConversionRate;
/**
* 售后转化率(指标A0105)
*/
@ApiModelProperty(value = "售后转化率(指标A0105)", example = "65%")
@ApiModelProperty(notes = "售后转化率(指标A0105)", example = "65%")
private String postSaleConversionRate;
// 新增字段
/**
* 触客数(指标A084)
*/
@ApiModelProperty(value = "触客数(指标A084)", example = "100")
@ApiModelProperty(notes = "触客数(指标A084)", example = "100")
private Integer customerCount;
/**
* 成交数(指标A075)
*/
@ApiModelProperty(value = "成交数(指标A075)", example = "80")
@ApiModelProperty(notes = "成交数(指标A075)", example = "80")
private Integer dealCount;
/**
* 整车延保-成交数(指标A066)
*/
@ApiModelProperty(value = "整车延保-成交数(指标A066)", example = "20")
@ApiModelProperty(notes = "整车延保-成交数(指标A066)", example = "20")
private Integer vehicleWarrantyDealCount;
/**
* 电池-成交数(指标A070)
*/
@ApiModelProperty(value = "电池-成交数(指标A070)", example = "15")
@ApiModelProperty(notes = "电池-成交数(指标A070)", example = "15")
private Integer batteryDealCount;
/**
* 安心包-成交数(指标A086)
*/
@ApiModelProperty(value = "安心包-成交数(指标A086)", example = "10")
@ApiModelProperty(notes = "安心包-成交数(指标A086)", example = "10")
private Integer safetyPackDealCount;
/**
* 轮胎成交数(指标A087)
*/
@ApiModelProperty(value = "轮胎成交数(指标A087)", example = "8")
@ApiModelProperty(notes = "轮胎成交数(指标A087)", example = "8")
private Integer tireDealCount;
// 新增字段
/**
* 售前触客数(指标A063)
*/
@ApiModelProperty(value = "售前触客数(指标A063)", example = "50")
@ApiModelProperty(notes = "售前触客数(指标A063)", example = "50")
private Integer preSaleCustomerCount;
/**
* 售后触客数(指标A096)
*/
@ApiModelProperty(value = "售后触客数(指标A096)", example = "50")
@ApiModelProperty(notes = "售后触客数(指标A096)", example = "50")
private Integer postSaleCustomerCount;
/**
* 售前成交数(指标A097)
*/
@ApiModelProperty(value = "售前成交数(指标A097)", example = "40")
@ApiModelProperty(notes = "售前成交数(指标A097)", example = "40")
private Integer preSaleDealCount;
/**
* 售后成交数(指标A098)
*/
@ApiModelProperty(value = "售后成交数(指标A098)", example = "40")
@ApiModelProperty(notes = "售后成交数(指标A098)", example = "40")
private Integer postSaleDealCount;
}
......@@ -397,13 +397,13 @@ public class EmployeePerformanceDTO implements Serializable {
/**
* 日期
*/
@ApiModelProperty(value = "日期", example = "2026-02-24")
@ApiModelProperty(notes = "日期", example = "2026-02-24")
private String date;
/**
* 产值
*/
@ApiModelProperty(value = "产值", example = "10000")
@ApiModelProperty(notes = "产值", example = "10000")
private Integer value;
}
......
......@@ -24,44 +24,44 @@ public class EmployeePerformanceReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
@ApiModelProperty(notes = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
@ApiModelProperty(notes = "督导ID", example = "123", required = true)
private Long supervisorId;
/**
* 日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部
*/
@ApiModelProperty(value = "日期类型", example = "0", required = true, notes = "日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部")
@ApiModelProperty(example = "0", required = true, notes = "日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部")
@NotNull
private Integer dateType;
/**
* 业务类型:1.延保 2.轻改 3.权益 4.二手车 必传
*/
@ApiModelProperty(value = "业务类型", example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车 必传")
@ApiModelProperty(example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车 必传")
private Integer bizs;
/**
* 开始日期
*/
@ApiModelProperty(value = "开始日期", example = "2026-02-01")
@ApiModelProperty(notes = "开始日期", example = "2026-02-01")
private String startDate;
/**
* 结束日期
*/
@ApiModelProperty(value = "结束日期", example = "2026-02-29")
@ApiModelProperty(notes = "结束日期", example = "2026-02-29")
private String endDate;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "1001")
@ApiModelProperty(notes = "门店ID", example = "1001")
private Integer merchantId;
......
......@@ -22,25 +22,25 @@ public class EmployeeStoreTransferDTO implements Serializable {
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "44210895")
@ApiModelProperty(notes = "门店ID", example = "44210895")
private Integer merchantId;
/**
* 员工ID
*/
@ApiModelProperty(value = "员工uuid", example = "544554455445")
@ApiModelProperty(notes = "员工uuid", example = "544554455445")
private String employeeId;
/**
* 门店名称
*/
@ApiModelProperty(value = "门店名称", example = "深圳市南山界4S店")
@ApiModelProperty(notes = "门店名称", example = "深圳市南山界4S店")
private String merchantName;
/**
* 开始日期
*/
@ApiModelProperty(value = "开始日期", example = "2025-12-12")
@ApiModelProperty(notes = "开始日期", example = "2025-12-12")
private String startDate;
......
......@@ -24,18 +24,18 @@ public class EmployeeStoreTransferReq implements Serializable {
/**
* 员工手机号
*/
@ApiModelProperty(value = "员工手机号", example = "19144475436", required = true)
@ApiModelProperty(notes = "员工手机号", example = "19144475436", required = true)
private String phoneNumber;
/**
* 业务类型:1.延保 2.轻改 3.权益 4.二手车
*/
@ApiModelProperty(value = "业务类型", example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车")
@ApiModelProperty(example = "1", notes = "业务类型:1.延保 2.轻改 3.权益 4.二手车")
private Integer bizs;
/**
* 督导的权限门店集合
*/
@ApiModelProperty(value = "督导的权限门店集合", example = "[44210895, 44210896]")
@ApiModelProperty(notes = "督导的权限门店集合", example = "[44210895, 44210896]")
private List<Integer> merchantIds;
}
package cn.com.glsx.dj.supervisor.dto;
import cn.com.glsx.dj.supervisor.enums.ExcellentCaseReviewStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.Column;
import lombok.Data;
import java.io.Serializable;
......@@ -23,55 +25,55 @@ public class RecordingItemDTO implements Serializable {
/**
* 录音ID
*/
@ApiModelProperty(value = "录音ID", example = "123")
@ApiModelProperty(notes = "录音ID", example = "123")
private Long recordingId;
/**
* 客户姓名
*/
@ApiModelProperty(value = "客户姓名", example = "李四")
@ApiModelProperty(notes = "客户姓名", example = "李四")
private String customerName;
/**
* 客户手机号
*/
@ApiModelProperty(value = "客户手机号", example = "13812345678")
@ApiModelProperty(notes = "客户手机号", example = "13812345678")
private String customerPhone;
/**
* 驻店人员
*/
@ApiModelProperty(value = "驻店人员", example = "张三")
@ApiModelProperty(notes = "驻店人员", example = "张三")
private String storeStaff;
/**
* 归属门店
*/
@ApiModelProperty(value = "归属门店", example = "深圳市南山界4S店")
@ApiModelProperty(notes = "归属门店", example = "深圳市南山界4S店")
private String storeName;
/**
* 客户类型识别
*/
@ApiModelProperty(value = "客户类型识别", example = "潜在客户")
@ApiModelProperty(notes = "客户类型识别", example = "潜在客户")
private String customerType;
/**
* 车型
*/
@ApiModelProperty(value = "车型", example = "GL8")
@ApiModelProperty(notes = "车型", example = "GL8")
private String carModel;
/**
* 接待时间
*/
@ApiModelProperty(value = "接待时间", example = "2026-02-01 10:00:00")
@ApiModelProperty(notes = "接待时间", example = "2026-02-01 10:00:00")
private String receptionTime;
/**
* 接待结果(成交/战败)
*/
@ApiModelProperty(value = "接待结果(成交/战败)", example = "成交")
@ApiModelProperty(notes = "接待结果(成交/战败)", example = "成交")
private String receptionResult;
/**
......@@ -81,139 +83,153 @@ public class RecordingItemDTO implements Serializable {
* 2: 通过
* 3: 驳回
*/
@ApiModelProperty(value = "优秀案例提交状态", example = "0")
@ApiModelProperty(notes = "优秀案例提交状态", example = "0")
private Integer caseSubmitStatus;
/**
* 优秀案例提交状态文案
*/
@ApiModelProperty(value = "优秀案例提交状态文案", example = "提交优秀案例")
@ApiModelProperty(notes = "优秀案例提交状态文案", example = "提交优秀案例")
private String caseSubmitStatusText;
/**
* 优秀案例提交按钮是否可点击
*/
@ApiModelProperty(value = "优秀案例提交按钮是否可点击", example = "true")
@ApiModelProperty(notes = "优秀案例提交按钮是否可点击", example = "true")
private Boolean caseSubmitButtonEnabled;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "44210895")
@ApiModelProperty(notes = "门店ID", example = "44210895")
private Integer merchantId;
/**
* 销售UUID
*/
@ApiModelProperty(value = "销售UUID", example = "123_456")
@ApiModelProperty(notes = "销售UUID", example = "123_456")
private String salesUuid;
/**
* 销售姓名
*/
@ApiModelProperty(value = "销售姓名", example = "张三")
@ApiModelProperty(notes = "销售姓名", example = "张三")
private String salesName;
/**
* 汽车品牌
*/
@ApiModelProperty(value = "汽车品牌", example = "别克")
@ApiModelProperty(notes = "汽车品牌", example = "别克")
private String carBrand;
/**
* 接待开始时间
*/
@ApiModelProperty(value = "接待开始时间", example = "2026-02-01 10:00:00")
@ApiModelProperty(notes = "接待开始时间", example = "2026-02-01 10:00:00")
private Date receptionStartTime;
/**
* 接待结束时间
*/
@ApiModelProperty(value = "接待结束时间", example = "2026-02-01 11:00:00")
@ApiModelProperty(notes = "接待结束时间", example = "2026-02-01 11:00:00")
private Date receptionEndTime;
/**
* 接待状态
*/
@ApiModelProperty(value = "接待状态", example = "1")
@ApiModelProperty(notes = "接待状态", example = "1")
private Integer receptionStatus;
/**
* 员工UUID
*/
@ApiModelProperty(value = "员工UUID", example = "123_456")
@ApiModelProperty(notes = "员工UUID", example = "123_456")
private String staffUuid;
/**
* 录音URL
*/
@ApiModelProperty(value = "录音URL", example = "http://example.com/recording.mp3")
@ApiModelProperty(notes = "录音URL", example = "http://example.com/recording.mp3")
private String recordingUrl;
/**
* 购车方式
*/
@ApiModelProperty(value = "购车方式", example = "贷款")
@ApiModelProperty(notes = "购车方式", example = "贷款")
private String carPurchaseMethod;
/**
* 检查历史标志
*/
@ApiModelProperty(value = "检查历史标志", example = "true")
@ApiModelProperty(notes = "检查历史标志", example = "true")
private Boolean checkHistoryFlag;
/**
* 批次ID
*/
@ApiModelProperty(value = "批次ID", example = "123")
@ApiModelProperty(notes = "批次ID", example = "123")
private Integer batchId;
/**
* 质检评分
*/
@ApiModelProperty(value = "质检评分", example = "63")
@ApiModelProperty(notes = "质检评分", example = "63")
private Integer score;
/**
* 模型类型
*/
@ApiModelProperty(value = "模型类型", example = "1")
@ApiModelProperty(notes = "模型类型", example = "1")
private Integer modelType;
/**
* 检查类型
*/
@ApiModelProperty(value = "检查类型", example = "1")
@ApiModelProperty(notes = "检查类型", example = "1")
private Integer checkType;
/**
* 订单完成标志
*/
@ApiModelProperty(value = "订单完成标志", example = "true")
@ApiModelProperty(notes = "订单完成标志", example = "true")
private Boolean orderFinishFlag;
/**
* 一车品牌
*/
@ApiModelProperty(value = "一车品牌", example = "别克")
@ApiModelProperty(notes = "一车品牌", example = "别克")
private String oneCarBrand;
/**
* 攻防评分
*/
@ApiModelProperty(value = "攻防评分", example = "6.7")
@ApiModelProperty(notes = "攻防评分", example = "6.7")
private Double gfScroe;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号", example = "13812345678")
@ApiModelProperty(notes = "手机号", example = "13812345678")
private String phoneNumber;
/**
* 商户名称
*/
@ApiModelProperty(value = "商户名称", example = "深圳市南山界4S店")
@ApiModelProperty(notes = "商户名称", example = "深圳市南山界4S店")
private String merchantName;
/**
* 审核状态
* <p>
* 0 - 待审核(默认)
* 1 - 通过
* 2 - 驳回
* </p>
*
* @see ExcellentCaseReviewStatusEnum
*/
@Column(name = "review_status")
private Integer reviewStatus;
}
\ No newline at end of file
......@@ -23,37 +23,37 @@ public class RecordingListDTO implements Serializable {
/**
* 录音摘要信息
*/
@ApiModelProperty(value = "录音摘要信息")
@ApiModelProperty(notes = "录音摘要信息")
private RecordingSummaryDTO summary;
/**
* 录音列表
*/
@ApiModelProperty(value = "录音列表")
@ApiModelProperty(notes = "录音列表")
private List<RecordingItemDTO> recordingList;
/**
* 总记录数
*/
@ApiModelProperty(value = "总记录数", example = "10")
@ApiModelProperty(notes = "总记录数", example = "10")
private Integer totalCount;
/**
* 当前页码
*/
@ApiModelProperty(value = "当前页码", example = "1")
@ApiModelProperty(notes = "当前页码", example = "1")
private Integer pageNum;
/**
* 每页大小
*/
@ApiModelProperty(value = "每页大小", example = "10")
@ApiModelProperty(notes = "每页大小", example = "10")
private Integer pageSize;
/**
* 按日期分组的摘要信息列表
*/
@ApiModelProperty(value = "按日期分组的摘要信息列表")
@ApiModelProperty(notes = "按日期分组的摘要信息列表")
private List<RecordingSummaryDTO> dateSummaryList;
}
\ No newline at end of file
......@@ -22,61 +22,61 @@ public class RecordingQueryReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
@ApiModelProperty(notes = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
@ApiModelProperty(notes = "督导ID", example = "123", required = true)
private Long supervisorId;
/**
* 日期
*/
@ApiModelProperty(value = "日期", example = "2026-02-01")
@ApiModelProperty(notes = "日期", example = "2026-02-01")
private String date;
/**
* 开始日期
*/
@ApiModelProperty(value = "开始日期", example = "2026-02-01", required = true)
@ApiModelProperty(notes = "开始日期", example = "2026-02-01", required = true)
private String startDate;
/**
* 结束日期
*/
@ApiModelProperty(value = "结束日期", example = "2026-02-29", required = true)
@ApiModelProperty(notes = "结束日期", example = "2026-02-29", required = true)
private String endDate;
/**
* 页码
*/
@ApiModelProperty(value = "页码", example = "1")
@ApiModelProperty(notes = "页码", example = "1")
private Integer pageNum;
/**
* 每页大小
*/
@ApiModelProperty(value = "每页大小", example = "10")
@ApiModelProperty(notes = "每页大小", example = "10")
private Integer pageSize;
/**
* 接待结果(成交/战败)
*/
@ApiModelProperty(value = "接待结果(成交/战败)", example = "成交")
@ApiModelProperty(notes = "接待结果(成交/战败)", example = "成交")
private String receptionResult;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "44210895", required = true)
@ApiModelProperty(notes = "门店ID", example = "44210895", required = true)
private Integer merchantId;
/**
* 业务类型
*/
@ApiModelProperty(value = "业务类型", example = "1", required = true)
@ApiModelProperty(notes = "业务类型", example = "1", required = true)
private Integer biz;
}
\ No newline at end of file
......@@ -22,25 +22,25 @@ public class RecordingSummaryDTO implements Serializable {
/**
* 日期
*/
@ApiModelProperty(value = "日期", example = "2月1日")
@ApiModelProperty(notes = "日期", example = "2月1日")
private String date;
/**
* 总录音数
*/
@ApiModelProperty(value = "总录音数", example = "10")
@ApiModelProperty(notes = "总录音数", example = "10")
private Integer totalRecordings;
/**
* 成交数
*/
@ApiModelProperty(value = "成交数", example = "3")
@ApiModelProperty(notes = "成交数", example = "3")
private Integer dealCount;
/**
* 战败数
*/
@ApiModelProperty(value = "战败数", example = "2")
@ApiModelProperty(notes = "战败数", example = "2")
private Integer defeatCount;
}
\ No newline at end of file
......@@ -24,25 +24,25 @@ public class SupervisorDashboardVO implements Serializable {
/**
* 日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部
*/
@ApiModelProperty(value = "日期类型", example = "0", notes = "日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部")
@ApiModelProperty(notes = "日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部", example = "0")
private Integer dateType;
/**
* 核心指标 (来自 BI)
*/
@ApiModelProperty(value = "核心指标 (来自 BI)")
@ApiModelProperty(notes = "核心指标 (来自 BI)")
private DashboardMetrics metrics;
/**
* 员工列表 (用于排行)
*/
@ApiModelProperty(value = "员工列表 (用于排行)")
@ApiModelProperty(notes = "员工列表 (用于排行)")
private List<EmployeeRanking> employeeList;
/**
* AI 分析建议
*/
@ApiModelProperty(value = "AI 分析建议", example = "根据数据分析,建议关注低绩效员工的培训和辅导,提升整体业绩水平")
@ApiModelProperty(notes = "AI 分析建议", example = "根据数据分析,建议关注低绩效员工的培训和辅导,提升整体业绩水平")
private String aiAnalysisSuggestion;
}
......@@ -13,8 +13,11 @@ import cn.com.glsx.dj.supervisor.dto.EmployeeBehaviorDTO;
import cn.com.glsx.dj.supervisor.dto.EmployeeBehaviorReq;
import cn.com.glsx.dj.supervisor.dto.EmployeePerformanceDTO;
import cn.com.glsx.dj.supervisor.dto.EmployeeRanking;
import cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferDTO;
import cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferReq;
import cn.com.glsx.dj.supervisor.dto.RecordingItemDTO;
import cn.com.glsx.dj.supervisor.dto.RecordingListDTO;
import cn.com.glsx.dj.supervisor.dto.RecordingQueryReq;
import cn.com.glsx.dj.supervisor.dto.RecordingSummaryDTO;
import cn.com.glsx.dj.supervisor.dto.SupervisorDashboardVO;
import cn.com.glsx.dj.supervisor.mapper.RecordingStatsMapper;
......@@ -28,9 +31,12 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.core.util.DateUtils;
import cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO;
import cn.com.glsx.merchants.remote.MerchantUserRemote;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
......@@ -998,7 +1004,7 @@ public class SupervisorDashboardService {
// 2. 调用北森接口获取人员基本信息
log.info("调用北森接口获取人员基本信息,手机号:{}", phoneNumber);
java.util.List<String> phoneNumbers = new java.util.ArrayList<>();
List<String> phoneNumbers = new ArrayList<>();
phoneNumbers.add(phoneNumber);
RpcResponse<List<BeisenEmployeeInfoDTO>> beisenResponse = merchantUserRemote.selectByPhones(phoneNumbers);
......@@ -1064,19 +1070,19 @@ public class SupervisorDashboardService {
* @param birthday 生日日期
* @return 年龄
*/
private Integer calculateAge(java.util.Date birthday) {
private Integer calculateAge(Date birthday) {
if (birthday == null) {
return null;
}
java.util.Calendar cal = java.util.Calendar.getInstance();
int currentYear = cal.get(java.util.Calendar.YEAR);
int currentMonth = cal.get(java.util.Calendar.MONTH) + 1;
int currentDay = cal.get(java.util.Calendar.DAY_OF_MONTH);
Calendar cal = Calendar.getInstance();
int currentYear = cal.get(Calendar.YEAR);
int currentMonth = cal.get(Calendar.MONTH) + 1;
int currentDay = cal.get(Calendar.DAY_OF_MONTH);
cal.setTime(birthday);
int birthYear = cal.get(java.util.Calendar.YEAR);
int birthMonth = cal.get(java.util.Calendar.MONTH) + 1;
int birthDay = cal.get(java.util.Calendar.DAY_OF_MONTH);
int birthYear = cal.get(Calendar.YEAR);
int birthMonth = cal.get(Calendar.MONTH) + 1;
int birthDay = cal.get(Calendar.DAY_OF_MONTH);
int age = currentYear - birthYear;
if (currentMonth < birthMonth || (currentMonth == birthMonth && currentDay < birthDay)) {
......@@ -1188,8 +1194,8 @@ public class SupervisorDashboardService {
// 1. 获取门店数据(不传员工id)
// 一次请求所有指标,用逗号隔开
java.util.Map<String, java.math.BigDecimal> storeMetrics = new java.util.HashMap<>();
java.util.Map<String, String> storeRates = new java.util.HashMap<>(); // 环比数据
Map<String, java.math.BigDecimal> storeMetrics = new HashMap<>();
Map<String, String> storeRates = new HashMap<>(); // 环比数据
String storeItemCodes = "A036,A076,A084,A075"; // 门店指标编码:总产值、客单价、总触客数、总成交数
cn.com.glsx.dj.supervisor.service.DataBizQueryParamsDTO storeQueryParams = new cn.com.glsx.dj.supervisor.service.DataBizQueryParamsDTO();
......@@ -1201,7 +1207,7 @@ public class SupervisorDashboardService {
storeQueryParams.setDateType(req.getDateType());
String storeJsonBody = cn.hutool.json.JSONUtil.toJsonStr(storeQueryParams);
cn.com.glsx.dj.supervisor.model.DataResp<java.util.List<cn.com.glsx.dj.supervisor.model.DataBusinessDTO>> storeDataResp = getDataStatsService.getListDataResp(storeJsonBody);
cn.com.glsx.dj.supervisor.model.DataResp<List<cn.com.glsx.dj.supervisor.model.DataBusinessDTO>> storeDataResp = getDataStatsService.getListDataResp(storeJsonBody);
if (storeDataResp != null && storeDataResp.getContent() != null && !storeDataResp.getContent().isEmpty()) {
for (cn.com.glsx.dj.supervisor.model.DataBusinessDTO storeData : storeDataResp.getContent()) {
......@@ -1211,7 +1217,7 @@ public class SupervisorDashboardService {
}
// 处理门店数据
EmployeePerformanceDTO.StorePerformanceData storePerformanceData = new EmployeePerformanceDTO.StorePerformanceData();
EmployeePerformanceDTO.StorePerformanceData storePerformanceData = new EmployeePerformanceDTO.StorePerformanceData();
// 总产值(指标A036)
storePerformanceData.setTotalValue(storeMetrics.get("A036") != null ? storeMetrics.get("A036").intValue() : 0);
storePerformanceData.setTotalValueRate(storeRates.get("A036")); // 总产值环比
......@@ -1229,11 +1235,11 @@ public class SupervisorDashboardService {
// 2. 获取人员数据
// 一次请求所有指标,用逗号隔开
java.util.Map<String, java.math.BigDecimal> employeeMetrics = new java.util.HashMap<>();
java.util.Map<String, String> employeeRates = new java.util.HashMap<>(); // 环比数据
Map<String, java.math.BigDecimal> employeeMetrics = new HashMap<>();
Map<String, String> employeeRates = new HashMap<>(); // 环比数据
String employeeItemCodes = "A036,A076,A064,A085,A077,A095,A0100,A099,A0103,A091,A0101,A089,A0102,A090,A0104,A0105,A084,A075,A066,A070,A086,A087,A063,A096,A097,A098"; // 指标编码:总产值、客单价、触客率、转化率、渗透率、平均客单价、整车延保-渗透率(员工)、整车延保-转化率、电池-渗透率(员工)、电池-转化率、安心包-渗透率(员工)、安心包-转化率、轮胎渗透率(员工)、轮胎转化率、售前转化率、售后转化率、触客数、成交数、整车延保-成交数、电池-成交数、安心包-成交数、轮胎成交数、售前触客数、售后触客数、售前成交数、售后成交数
cn.com.glsx.dj.supervisor.service.DataBizQueryParamsDTO employeeQueryParams = new cn.com.glsx.dj.supervisor.service.DataBizQueryParamsDTO();
DataBizQueryParamsDTO employeeQueryParams = new DataBizQueryParamsDTO();
employeeQueryParams.setBizs(req.getBizs()); // 业务类型:1.延保
employeeQueryParams.setMerchantIds(req.getMerchantId() != null ? req.getMerchantId().toString() : null); // 门店ID
employeeQueryParams.setStaffIds(req.getEmployeeId()); // 员工ID
......@@ -1312,7 +1318,7 @@ public class SupervisorDashboardService {
behaviorReq.setBizs(req.getBizs());
behaviorReq.setStartDate(req.getStartDate());
behaviorReq.setEndDate(req.getEndDate());
EmployeeBehaviorDTO behaviorData = getEmployeeBehaviorData(behaviorReq);
EmployeeBehaviorDTO behaviorData = getEmployeeBehaviorData(behaviorReq);
String dailyPerformanceRate = "0%";
if (behaviorData != null && behaviorData.getDailyReport() != null) {
dailyPerformanceRate = behaviorData.getDailyReport().getCompletionRate();
......@@ -1321,7 +1327,7 @@ public class SupervisorDashboardService {
performanceData.setEmployeeData(employeePerformanceData);
// 3. 获取产值趋势数据(返回聚合的时间数据)
cn.com.glsx.dj.supervisor.service.DataBizQueryParamsDTO trendQueryParams = new cn.com.glsx.dj.supervisor.service.DataBizQueryParamsDTO();
DataBizQueryParamsDTO trendQueryParams = new DataBizQueryParamsDTO();
trendQueryParams.setBizs(req.getBizs());
trendQueryParams.setMerchantIds(req.getMerchantId() != null ? req.getMerchantId().toString() : null); // 门店ID
trendQueryParams.setStaffIds(req.getEmployeeId()); // 员工ID
......@@ -1330,11 +1336,11 @@ public class SupervisorDashboardService {
trendQueryParams.setItemCodes("A036"); // 指标编码:总产值
trendQueryParams.setDateType(req.getDateType() != null ? req.getDateType() : 0); // 日期类型:0,按指定时段
String trendJsonBody = cn.hutool.json.JSONUtil.toJsonStr(trendQueryParams);
cn.com.glsx.dj.supervisor.model.DataResp<List<cn.com.glsx.dj.supervisor.model.DataBusinessDTO>> trendDataResp = getDataStatsService.getListDataResp(trendJsonBody);
String trendJsonBody = JSONUtil.toJsonStr(trendQueryParams);
DataResp<List<DataBusinessDTO>> trendDataResp = getDataStatsService.getListDataResp(trendJsonBody);
// 处理产值趋势数据
List<cn.com.glsx.dj.supervisor.dto.EmployeePerformanceDTO.TrendData> trendData = new ArrayList<>();
List<EmployeePerformanceDTO.TrendData> trendData = new ArrayList<>();
if (trendDataResp != null && trendDataResp.getContent() != null && !trendDataResp.getContent().isEmpty()) {
for (cn.com.glsx.dj.supervisor.model.DataBusinessDTO trendItem : trendDataResp.getContent()) {
EmployeePerformanceDTO.TrendData trend = new EmployeePerformanceDTO.TrendData();
......@@ -1358,10 +1364,11 @@ public class SupervisorDashboardService {
* @param req 查询参数
* @return 员工调店记录列表
*/
public List<cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferDTO> getEmployeeStoreTransferRecords(cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferReq req) {
public List<EmployeeStoreTransferDTO> getEmployeeStoreTransferRecords(
EmployeeStoreTransferReq req) {
log.info("开始获取员工调店记录,请求参数:{}", req);
List<cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferDTO> transferRecords = businessSceneMapper.getEmployeeStoreTransferRecords(
List<EmployeeStoreTransferDTO> transferRecords = businessSceneMapper.getEmployeeStoreTransferRecords(
req.getPhoneNumber(),
req.getMerchantIds(),
req.getBizs()
......@@ -1381,11 +1388,11 @@ public class SupervisorDashboardService {
* @param req 查询参数
* @return 录音列表数据
*/
public RecordingListDTO getRecordingList(cn.com.glsx.dj.supervisor.dto.RecordingQueryReq req) {
public RecordingListDTO getRecordingList(RecordingQueryReq req) {
log.info("开始获取录音列表,请求参数:{}", req);
// 从数据库查询录音列表
List<cn.com.glsx.dj.supervisor.dto.RecordingItemDTO> recordingList = businessSceneMapper.getRecordingList(
List<RecordingItemDTO> recordingList = businessSceneMapper.getRecordingList(
req.getMerchantId(),
req.getEmployeeId(), // 员工UUID
req.getBiz(), // 业务类型
......@@ -1401,7 +1408,7 @@ public class SupervisorDashboardService {
// 按日期分组统计
Map<String,RecordingSummaryDTO> dateSummaryMap = new HashMap<>();
for (cn.com.glsx.dj.supervisor.dto.RecordingItemDTO item : recordingList) {
for (RecordingItemDTO item : recordingList) {
// 设置接待结果
if (item.getOrderFinishFlag() != null && item.getOrderFinishFlag()) {
item.setReceptionResult("成交");
......@@ -1411,20 +1418,15 @@ public class SupervisorDashboardService {
defeatCount++;
}
// 设置案例提交状态(默认未提交)
item.setCaseSubmitStatus(0);
item.setCaseSubmitStatusText("提交优秀案例");
item.setCaseSubmitButtonEnabled(true);
// 设置前端需要的字段
item.setStoreStaff(item.getSalesName()); // 驻店人员使用销售姓名
item.setStoreName(item.getMerchantName()); // 归属门店使用商户名称
item.setCustomerPhone(item.getPhoneNumber()); // 客户手机号
item.setReceptionTime(cn.com.glsx.framework.core.util.DateUtils.formatDate(item.getReceptionStartTime())); // 接待时间使用开始时间
item.setReceptionTime(DateUtils.formatDate(item.getReceptionStartTime())); // 接待时间使用开始时间
// 按日期分组统计
if (item.getReceptionStartTime() != null) {
String dateStr = cn.com.glsx.framework.core.util.DateUtils.formatDate(item.getReceptionStartTime(), "yyyy-MM-dd");
String dateStr = DateUtils.formatDate(item.getReceptionStartTime(), "yyyy-MM-dd");
RecordingSummaryDTO dateSummary = dateSummaryMap.get(dateStr);
if (dateSummary == null) {
dateSummary = new RecordingSummaryDTO();
......
......@@ -60,10 +60,10 @@
<!-- 查询录音列表 -->
<select id="getRecordingList" parameterType="map" resultType="cn.com.glsx.dj.supervisor.dto.RecordingItemDTO">
SELECT
t1.merchant_id,
t6.merchant_name,
t1.customer_name,
t1.phone_number,
t1.merchant_id as merchantId,
t6.merchant_name as merchantName,
t1.customer_name as customerName,
t1.phone_number as phoneNumber,
t1.sales_uuid,
t1.sales_name,
t1.car_brand,
......@@ -76,7 +76,8 @@
t1.car_purchase_method,
t2.check_History_Flag as checkHistoryFlag,
t3.id as batchId,
t3.score as score,
t3.score as score,
t2.id as recordingId,
t2.model_type as modelType,
t2.check_type as checkType,
CASE
......@@ -90,12 +91,14 @@
END as orderFinishFlag,
t1.one_car_brand as oneCarBrand,
t5.avg_defence as gfScroe,
t5.customer_type as customerType
t5.customer_type as customerType,
t7.review_status as reviewStatus
FROM reception_customer_info t1
LEFT JOIN inspection_badge_recordings t2 ON t1.id = t2.reception_id
LEFT JOIN inspection_conversation_batch t3 ON t3.record_id=t2.id
LEFT JOIN inspection_defence t5 ON t3.id =t5.batch_id
LEFT JOIN dj_car_life_service_merchant t6 ON t1.merchant_id=t6.merchant_id
LEFT JOIN dj_car_life_service_merchant t6 ON t1.merchant_id=t6.merchant_id
left join excellent_case_review t7 on t2.id = t7.recording_id
WHERE t1.merchant_id = #{merchantId}
AND t1.staff_uuid = #{uuid}
AND t1.bussiness_type = #{biz}
......
......@@ -99,8 +99,8 @@ public class SupervisorDashboardRemoteImplTest extends BaseServiceTest {
req.setMerchantId(44211227);
req.setEmployeeId("584fdb460afa4dad835cbe8d73cfa923");
req.setBiz(1);
req.setStartDate("2026-03-01");
req.setEndDate("2026-03-15");
req.setStartDate("2025-06-01");
req.setEndDate("2026-06-30");
req.setPageNum(1);
req.setPageSize(10);
RpcResponse<RecordingListDTO> response = supervisorDashboardRemote.getRecordingList(req);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!