Commit a3ec481e by zhouhaibao

[+]督导新增团队以及个人业绩模块查询、优秀案例管理

1 parent 5b11ae02
Showing 41 changed files with 2750 additions and 0 deletions
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 优秀案例提交请求DTO
* <p>
* 包含优秀案例提交的请求参数,如录音ID、员工ID、督导ID等
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "优秀案例提交请求DTO")
@Data
public class CaseSubmitReq implements Serializable {
/**
* 录音ID
*/
@ApiModelProperty(value = "录音ID", example = "123", required = true)
private Long recordingId;
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
private Long supervisorId;
/**
* 案例描述
*/
@ApiModelProperty(value = "案例描述", example = "该录音展示了优秀的销售技巧")
private String caseDescription;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
@Data
public class DashboardMetrics implements Serializable {
public static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "门店数量")
private Integer storeCount; // 门店数量 (不受维度限制)
@ApiModelProperty(notes = "驻店人员总数")
private Integer staffCount; // 驻店人员总数 (受维度限制)
@ApiModelProperty(notes = "总产值")
private BigDecimal totalOutput; // 总产值 (受维度限制)
@ApiModelProperty(notes = "核心指标")
private BigDecimal avgUnitPrice; // 平均客单价 (A076 聚合)
@ApiModelProperty(notes = "核心指标")
private BigDecimal avgConversion; // 平均转化率 (A085 聚合)
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* 督导看板查询请求参数
* <p>
* 包含督导看板查询的请求参数,如督导ID、日期范围、日期类型、业务类型等
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "督导看板查询请求参数")
@Data
public class DashboardQueryReq implements Serializable {
public static final long serialVersionUID = 1L;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true, notes = "督导ID")
@NotNull
private String supervisorId;
/**
* 当前选中的开始日期
*/
@ApiModelProperty(value = "当前选中的开始日期", example = "2026-02-01", required = true, notes = "当前选中的开始日期")
@NotNull
private String startDate; // 当前选中的基准日期
/**
* 当前选中的结束日期
*/
@ApiModelProperty(value = "当前选中的结束日期", example = "2026-02-29", required = true, notes = "当前选中的结束日期")
@NotNull
private String endDate;
/**
* 日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部
*/
@ApiModelProperty(value = "日期类型", 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.二手车 必传")
private Integer bizs;
/**
* 门店ID列表
*/
@ApiModelProperty(value = "门店ID列表", notes = "门店ID列表")
private List<Integer> merchantIds;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 员工基础信息DTO
* <p>
* 包含员工基础信息,如姓名、手机号、归业业务、入职时间、年龄、出生日期、民族、籍贯、入职部门、职务、直线经理等
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "员工基础信息DTO")
@Data
public class EmployeeBasicInfoDTO implements Serializable {
/**
* 姓名
*/
@ApiModelProperty(value = "姓名", example = "周芳")
private String name;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号", example = "13812345678")
private String phone;
/**
* 归属业务
*/
@ApiModelProperty(value = "归属业务", example = "延保")
private String business;
/**
* 入职时间
*/
@ApiModelProperty(value = "入职时间", example = "2025-12-12")
private String entryDate;
/**
* 年龄
*/
@ApiModelProperty(value = "年龄", example = "33")
private Integer age;
/**
* 出生日期
*/
@ApiModelProperty(value = "出生日期", example = "1993-03-26")
private String birthday;
/**
* 民族
*/
@ApiModelProperty(value = "民族", example = "汉")
private String ethnicity;
/**
* 籍贯
*/
@ApiModelProperty(value = "籍贯", example = "陕西省/延安市")
private String origin;
/**
* 入职部门
*/
@ApiModelProperty(value = "入职部门", example = "运营零售部门")
private String department;
/**
* 职务
*/
@ApiModelProperty(value = "职务", example = "延保门店销售")
private String position;
/**
* 直线经理
*/
@ApiModelProperty(value = "直线经理", example = "XXX")
private String manager;
/**
* 性别
*/
@ApiModelProperty(value = "性别", example = "女")
private String gender;
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 人员基础信息请求DTO
* <p>
* 包含人员基础信息查询的请求参数
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "人员基础信息请求DTO")
@Data
public class EmployeeBasicInfoReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
private Long supervisorId;
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Map;
/**
* 个人行为分析数据DTO
* <p>
* 包含员工行为分析数据,如考勤统计、日报统计、客户接待、录音分析、着装预警等
* 支持场景、时间维度的查询
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "个人行为分析数据DTO")
@Data
public class EmployeeBehaviorDTO implements Serializable {
/**
* AI建议
*/
@ApiModelProperty(value = "AI建议", example = "该员工学习时长领先但线索转化率低于平均水平,建议加强成交环节的实操带教")
private String aiSuggestion;
/**
* 考勤统计
*/
@ApiModelProperty(value = "考勤统计")
private AttendanceData attendance;
/**
* 日报统计
*/
@ApiModelProperty(value = "日报统计")
private DailyReportData dailyReport;
/**
* 客户接待
*/
@ApiModelProperty(value = "客户接待")
private CustomerReceptionData customerReception;
/**
* 录音分析
*/
@ApiModelProperty(value = "录音分析")
private RecordingAnalysisData recordingAnalysis;
/**
* 着装预警
*/
@ApiModelProperty(value = "着装预警")
private DressCodeWarningData dressCodeWarning;
/**
* 考勤统计数据
*/
@ApiModel(description = "考勤统计数据")
@Data
public static class AttendanceData implements Serializable {
/**
* 打卡天数
*/
@ApiModelProperty(value = "打卡天数", example = "1")
private Integer checkInDays;
/**
* 迟到次数
*/
@ApiModelProperty(value = "迟到次数", example = "1")
private Integer late;
/**
* 早退次数
*/
@ApiModelProperty(value = "早退次数", example = "1")
private Integer earlyLeave;
/**
* 旷工次数
*/
@ApiModelProperty(value = "旷工次数", example = "1")
private Integer absenteeism;
}
/**
* 日报统计数据
*/
@ApiModel(description = "日报统计数据")
@Data
public static class DailyReportData implements Serializable {
/**
* 已提交
*/
@ApiModelProperty(value = "已提交", example = "0")
private Integer submitted;
/**
* 未提交
*/
@ApiModelProperty(value = "未提交", example = "1")
private Integer notSubmitted;
/**
* 在岗
*/
@ApiModelProperty(value = "在岗", example = "0")
private Integer onDuty;
/**
* 调休
*/
@ApiModelProperty(value = "调休", example = "0")
private Integer rest;
/**
* 日报完成率
*/
@ApiModelProperty(value = "日报完成率", example = "85%")
private String completionRate;
}
/**
* 客户接待数据
*/
@ApiModel(description = "客户接待数据")
@Data
public static class CustomerReceptionData implements Serializable {
/**
* 实际交车数(指标A062)
*/
@ApiModelProperty(value = "实际交车数(指标A062)", example = "4")
private Integer actualDelivery;
/**
* 接待数量(指标A084)
*/
@ApiModelProperty(value = "接待数量(指标A084)", example = "2")
private Integer receptionCount;
/**
* 未触客数
*/
@ApiModelProperty(value = "未触客数", example = "2")
private Integer notTouched;
}
/**
* 录音分析数据
*/
@ApiModel(description = "录音分析数据")
@Data
public static class RecordingAnalysisData implements Serializable {
/**
* 行为标签
*/
@ApiModelProperty(value = "行为标签")
private Map<String, String> behaviorTags;
/**
* 量化指标
*/
@ApiModelProperty(value = "量化指标")
private QuantitativeIndicators quantitativeIndicators;
}
/**
* 量化指标数据
*/
@ApiModel(description = "量化指标数据")
@Data
public static class QuantitativeIndicators implements Serializable {
/**
* 录音数
*/
@ApiModelProperty(value = "录音数", example = "2")
private Integer recordingCount;
/**
* 成交数
*/
@ApiModelProperty(value = "成交数", example = "1")
private Integer dealCount;
/**
* 战败数
*/
@ApiModelProperty(value = "战败数", example = "1")
private Integer defeatCount;
/**
* 成交率
*/
@ApiModelProperty(value = "成交率", example = "50%")
private String dealRate;
/**
* 质检平均分
*/
@ApiModelProperty(value = "质检平均分", example = "2")
private Integer qualityScore;
/**
* 攻防平均分
*/
@ApiModelProperty(value = "攻防平均分", example = "1")
private Integer attackDefenseScore;
/**
* 录音缺失率
*/
@ApiModelProperty(value = "录音缺失率", example = "1")
private Integer recordingMissingRate;
}
/**
* 着装预警数据
*/
@ApiModel(description = "着装预警数据")
@Data
public static class DressCodeWarningData implements Serializable {
/**
* 预警次数
*/
@ApiModelProperty(value = "预警次数", example = "1")
private Integer warningCount;
}
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 个人行为分析数据请求DTO
* <p>
* 包含个人行为分析数据查询的请求参数
* 支持场景、时间维度的查询
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "个人行为分析数据请求DTO")
@Data
public class EmployeeBehaviorReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
private Long supervisorId;
/**
* 场景
*/
@ApiModelProperty(value = "场景", example = "sales")
private String scene;
/**
* 开始日期
*/
@ApiModelProperty(value = "开始日期", example = "2026-02-01")
private String startDate;
/**
* 结束日期
*/
@ApiModelProperty(value = "结束日期", example = "2026-02-29")
private String endDate;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "1001")
private Integer merchantId;
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
* 个人业绩数据DTO
* <p>
* 包含员工个人业绩数据,如总产值、客单价、总触客数、总成交数等
* 支持场景、时间、门店维度的查询
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "个人业绩数据DTO")
@Data
public class EmployeePerformanceDTO implements Serializable {
/**
* AI建议
*/
@ApiModelProperty(value = "AI建议", example = "该员工学习时长领先但线索转化率低于平均水平,建议加强成交环节的实操带教")
private String aiSuggestion;
/**
* 门店数据
*/
@ApiModelProperty(value = "门店数据")
private StorePerformanceData storeData;
/**
* 人员数据
*/
@ApiModelProperty(value = "人员数据")
private EmployeeData employeeData;
/**
* 个人产值趋势
*/
@ApiModelProperty(value = "个人产值趋势")
private List<TrendData> trendData;
/**
* 门店业绩数据
*/
@ApiModel(description = "门店业绩数据")
@Data
public static class StorePerformanceData implements Serializable {
/**
* 总产值(指标A036)
*/
@ApiModelProperty(value = "总产值(指标A036)", example = "15000")
private Integer totalValue;
/**
* 客单价(指标A076)
*/
@ApiModelProperty(value = "客单价(指标A076)", example = "12000")
private Integer averagePrice;
/**
* 总触客数(指标A084)
*/
@ApiModelProperty(value = "总触客数(指标A084)", example = "129")
private Integer totalCustomers;
/**
* 总成交数(指标A075)
*/
@ApiModelProperty(value = "总成交数(指标A075)", example = "101")
private Integer totalDeals;
}
/**
* 人员数据
*/
@ApiModel(description = "人员数据")
@Data
public static class EmployeeData implements Serializable {
/**
* 总产值
*/
@ApiModelProperty(value = "总产值", example = "93196")
private Integer totalValue;
/**
* 客单价
*/
@ApiModelProperty(value = "客单价", example = "11649.5")
private Double averagePrice;
/**
* 日报完成率
*/
@ApiModelProperty(value = "日报完成率", example = "100%")
private String dailyPerformanceRate;
}
/**
* 趋势数据
*/
@ApiModel(description = "趋势数据")
@Data
public static class TrendData implements Serializable {
/**
* 日期
*/
@ApiModelProperty(value = "日期", example = "2026-02-24")
private String date;
/**
* 产值
*/
@ApiModelProperty(value = "产值", example = "10000")
private Integer value;
}
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 个人业绩数据请求DTO
* <p>
* 包含个人业绩数据查询的请求参数
* 支持场景、时间、门店维度的查询
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "个人业绩数据请求DTO")
@Data
public class EmployeePerformanceReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
private Long supervisorId;
/**
* 场景
*/
@ApiModelProperty(value = "场景", example = "sales")
private String scene;
/**
* 开始日期
*/
@ApiModelProperty(value = "开始日期", example = "2026-02-01")
private String startDate;
/**
* 结束日期
*/
@ApiModelProperty(value = "结束日期", example = "2026-02-29")
private String endDate;
/**
* 门店ID
*/
@ApiModelProperty(value = "门店ID", example = "1001")
private Integer merchantId;
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
@Data
public class EmployeeRanking implements Serializable {
public static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "员工ID")
private String employeeId;
@ApiModelProperty(notes = "员工名称")
private String employeeName;
@ApiModelProperty(notes = "员工手机号")
private String employeePhone;
@ApiModelProperty(notes = "个人产值")
private BigDecimal personalOutput; // A036
@ApiModelProperty(notes = "个人客单价")
private BigDecimal personalUnitPrice; // A076
@ApiModelProperty(notes = "个人转化率")
private BigDecimal personalConversion; // A085
// --- 行为指标 (新增) ---
@ApiModelProperty(notes = "成交数")
private Integer dealCount;// 成交数 (A075)
@ApiModelProperty(notes = "战败数")
private Integer defeatCount; // 战败数 (A0123)
@ApiModelProperty(notes = "录音数")
private Integer recordingCount; // 录音数 (质检)
@ApiModelProperty(notes = "录音缺失率")
private BigDecimal missingRate; // 录音缺失率 (%)
// --- 衍生行为指标 (用于 AI 分析或前端展示) ---
private BigDecimal dealRate; // 成交率 = 成交/(成交 + 战败)
private BigDecimal avgRecordPerDeal; // 平均单产录音数 = 录音/成交
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 员工调店记录DTO
* <p>
* 包含员工在不同门店之间的流动履历
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "员工调店记录DTO")
@Data
public class EmployeeStoreTransferDTO implements Serializable {
/**
* 记录ID
*/
@ApiModelProperty(value = "记录ID", example = "1")
private Integer id;
/**
* 门店名称
*/
@ApiModelProperty(value = "门店名称", example = "深圳市南山界4S店")
private String storeName;
/**
* 开始日期
*/
@ApiModelProperty(value = "开始日期", example = "2025-12-12")
private String startDate;
/**
* 结束日期
*/
@ApiModelProperty(value = "结束日期", example = "2026-03-12")
private String endDate;
/**
* 状态(current: 当前, history: 历史)
*/
@ApiModelProperty(value = "状态(current: 当前, history: 历史)", example = "current")
private String status;
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 员工调店记录请求DTO
* <p>
* 包含员工调店记录查询的请求参数
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "员工调店记录请求DTO")
@Data
public class EmployeeStoreTransferReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
private Long supervisorId;
}
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
@Data
@ToString
public class ExcellentCaseDetailDTO implements Serializable {
@ApiModelProperty(notes = "主键ID")
private Long id;
@ApiModelProperty(notes = "案例标题")
private String caseTitle;
@ApiModelProperty(notes = "驻店人员姓名")
private String staffName;
@ApiModelProperty(notes = "驻店人员手机号")
private String staffPhone;
@ApiModelProperty(notes = "门店ID")
private Integer merchantId;
@ApiModelProperty(notes = "门店名称")
private String merchantName;
@ApiModelProperty(notes = "客户类别")
private String customerCategory;
@ApiModelProperty(notes = "案例描述")
private String caseDescription;
@ApiModelProperty(notes = "录音URL")
private String recordingUrl;
@ApiModelProperty(notes = "录音时长(秒)")
private Integer recordingDuration;
@ApiModelProperty(notes = "提交人ID")
private Long submitterId;
@ApiModelProperty(notes = "提交人姓名")
private String submitterName;
@ApiModelProperty(notes = "提交人手机号")
private String submitterPhone;
@ApiModelProperty(notes = "审核状态:0-待审核,1-通过,2-驳回")
private Integer reviewStatus;
@ApiModelProperty(notes = "审核人ID")
private Long reviewerId;
@ApiModelProperty(notes = "审核人姓名")
private String reviewerName;
@ApiModelProperty(notes = "审核时间")
private Date reviewTime;
@ApiModelProperty(notes = "审核意见")
private String reviewComment;
@ApiModelProperty(notes = "创建时间")
private Date createTime;
@ApiModelProperty(notes = "更新时间")
private Date updatedDate;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
@Data
@ToString
public class ExcellentCaseReviewDTO implements Serializable {
@ApiModelProperty(notes = "主键ID")
private Long id;
@ApiModelProperty(notes = "案例标题")
private String caseTitle;
@ApiModelProperty(notes = "驻店人员姓名")
private String staffName;
@ApiModelProperty(notes = "驻店人员手机号")
private String staffPhone;
@ApiModelProperty(notes = "门店ID")
private Integer merchantId;
@ApiModelProperty(notes = "门店名称")
private String merchantName;
@ApiModelProperty(notes = "客户类别")
private String customerCategory;
@ApiModelProperty(notes = "案例描述")
private String caseDescription;
@ApiModelProperty(notes = "录音URL")
private String recordingUrl;
@ApiModelProperty(notes = "录音时长(秒)")
private Integer recordingDuration;
@ApiModelProperty(notes = "提交人ID")
private Long submitterId;
@ApiModelProperty(notes = "提交人姓名")
private String submitterName;
@ApiModelProperty(notes = "提交人手机号")
private String submitterPhone;
@ApiModelProperty(notes = "审核状态:0-待审核,1-通过,2-驳回")
private Integer reviewStatus;
@ApiModelProperty(notes = "审核人ID")
private Long reviewerId;
@ApiModelProperty(notes = "审核人姓名")
private String reviewerName;
@ApiModelProperty(notes = "审核时间")
private Date reviewTime;
@ApiModelProperty(notes = "审核意见")
private String reviewComment;
@ApiModelProperty(notes = "创建时间")
private Date createTime;
@ApiModelProperty(notes = "更新时间")
private Date updatedDate;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
@Data
@ToString
public class ExcellentCaseReviewQueryDTO implements Serializable {
@ApiModelProperty(notes = "驻店人员姓名,模糊匹配")
private String staffName;
@ApiModelProperty(notes = "接待门店名称,模糊匹配")
private String merchantName;
@ApiModelProperty(notes = "客户类别")
private String customerCategory;
@ApiModelProperty(notes = "提交人姓名,模糊匹配")
private String submitterName;
@ApiModelProperty(notes = "审核状态:0-待审核,1-通过,2-驳回")
private Integer reviewStatus;
@ApiModelProperty(notes = "页码")
private Integer pageNum;
@ApiModelProperty(notes = "每页大小")
private Integer pageSize;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
@ToString
public class ExcellentCaseReviewReqDTO implements Serializable {
@NotNull(message = "案例ID不能为空")
@ApiModelProperty(notes = "案例ID", required = true)
private Long id;
@ApiModelProperty(notes = "审核意见")
private String reviewComment;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
@ToString
public class ExcellentCaseSubmitDTO implements Serializable {
@NotBlank(message = "案例标题不能为空")
@ApiModelProperty(notes = "案例标题", required = true)
private String caseTitle;
@NotBlank(message = "驻店人员姓名不能为空")
@ApiModelProperty(notes = "驻店人员姓名", required = true)
private String staffName;
@NotBlank(message = "驻店人员手机号不能为空")
@ApiModelProperty(notes = "驻店人员手机号", required = true)
private String staffPhone;
@NotNull(message = "门店ID不能为空")
@ApiModelProperty(notes = "门店ID", required = true)
private Integer merchantId;
@NotBlank(message = "门店名称不能为空")
@ApiModelProperty(notes = "门店名称", required = true)
private String merchantName;
@NotBlank(message = "客户类别不能为空")
@ApiModelProperty(notes = "客户类别", required = true)
private String customerCategory;
@NotBlank(message = "案例描述不能为空")
@ApiModelProperty(notes = "案例描述", required = true)
private String caseDescription;
@NotBlank(message = "录音URL不能为空")
@ApiModelProperty(notes = "录音URL", required = true)
private String recordingUrl;
@ApiModelProperty(notes = "录音时长(秒)")
private Integer recordingDuration;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 录音列表项DTO
* <p>
* 包含录音列表中的单个录音信息,如客户姓名、手机号、驻店人员、门店、客户类型、车型等
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "录音列表项DTO")
@Data
public class RecordingItemDTO implements Serializable {
/**
* 录音ID
*/
@ApiModelProperty(value = "录音ID", example = "123")
private Long recordingId;
/**
* 客户姓名
*/
@ApiModelProperty(value = "客户姓名", example = "李四")
private String customerName;
/**
* 客户手机号
*/
@ApiModelProperty(value = "客户手机号", example = "13812345678")
private String customerPhone;
/**
* 驻店人员
*/
@ApiModelProperty(value = "驻店人员", example = "张三")
private String storeStaff;
/**
* 归属门店
*/
@ApiModelProperty(value = "归属门店", example = "深圳市南山界4S店")
private String storeName;
/**
* 客户类型识别
*/
@ApiModelProperty(value = "客户类型识别", example = "潜在客户")
private String customerType;
/**
* 车型
*/
@ApiModelProperty(value = "车型", example = "GL8")
private String carModel;
/**
* 接待时间
*/
@ApiModelProperty(value = "接待时间", example = "2026-02-01 10:00:00")
private String receptionTime;
/**
* 接待结果(成交/战败)
*/
@ApiModelProperty(value = "接待结果(成交/战败)", example = "成交")
private String receptionResult;
/**
* 优秀案例提交状态
* 0: 未提交
* 1: 待审核
* 2: 通过
* 3: 驳回
*/
@ApiModelProperty(value = "优秀案例提交状态", example = "0")
private Integer caseSubmitStatus;
/**
* 优秀案例提交状态文案
*/
@ApiModelProperty(value = "优秀案例提交状态文案", example = "提交优秀案例")
private String caseSubmitStatusText;
/**
* 优秀案例提交按钮是否可点击
*/
@ApiModelProperty(value = "优秀案例提交按钮是否可点击", example = "true")
private Boolean caseSubmitButtonEnabled;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 录音列表DTO
* <p>
* 包含录音复盘页面的完整数据,如摘要信息和录音列表
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "录音列表DTO")
@Data
public class RecordingListDTO implements Serializable {
/**
* 录音摘要信息
*/
@ApiModelProperty(value = "录音摘要信息")
private RecordingSummaryDTO summary;
/**
* 录音列表
*/
@ApiModelProperty(value = "录音列表")
private List<RecordingItemDTO> recordingList;
/**
* 总记录数
*/
@ApiModelProperty(value = "总记录数", example = "10")
private Integer totalCount;
/**
* 当前页码
*/
@ApiModelProperty(value = "当前页码", example = "1")
private Integer pageNum;
/**
* 每页大小
*/
@ApiModelProperty(value = "每页大小", example = "10")
private Integer pageSize;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 录音查询请求DTO
* <p>
* 包含录音查询的请求参数,如员工ID、督导ID、日期、页码、每页大小等
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "录音查询请求DTO")
@Data
public class RecordingQueryReq implements Serializable {
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID", example = "123_456", required = true)
private String employeeId;
/**
* 督导ID
*/
@ApiModelProperty(value = "督导ID", example = "123", required = true)
private Long supervisorId;
/**
* 日期
*/
@ApiModelProperty(value = "日期", example = "2026-02-01")
private String date;
/**
* 开始日期
*/
@ApiModelProperty(value = "开始日期", example = "2026-02-01")
private String startDate;
/**
* 结束日期
*/
@ApiModelProperty(value = "结束日期", example = "2026-02-29")
private String endDate;
/**
* 页码
*/
@ApiModelProperty(value = "页码", example = "1")
private Integer pageNum;
/**
* 每页大小
*/
@ApiModelProperty(value = "每页大小", example = "10")
private Integer pageSize;
/**
* 接待结果(成交/战败)
*/
@ApiModelProperty(value = "接待结果(成交/战败)", example = "成交")
private String receptionResult;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 录音摘要DTO
* <p>
* 包含录音复盘页面的摘要信息,如日期、录音数、成交数、战败数等
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "录音摘要DTO")
@Data
public class RecordingSummaryDTO implements Serializable {
/**
* 日期
*/
@ApiModelProperty(value = "日期", example = "2月1日")
private String date;
/**
* 总录音数
*/
@ApiModelProperty(value = "总录音数", example = "10")
private Integer totalRecordings;
/**
* 成交数
*/
@ApiModelProperty(value = "成交数", example = "3")
private Integer dealCount;
/**
* 战败数
*/
@ApiModelProperty(value = "战败数", example = "2")
private Integer defeatCount;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
/**
* 督导首页数据响应对象
* <p>
* 包含督导首页数据,如日期类型、核心指标、员工列表、AI分析建议等
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiModel(description = "督导首页数据响应对象")
@Data
public class SupervisorDashboardVO implements Serializable {
public static final long serialVersionUID = 1L;
/**
* 日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部
*/
@ApiModelProperty(value = "日期类型", example = "0", notes = "日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部")
private Integer dateType;
/**
* 核心指标 (来自 BI)
*/
@ApiModelProperty(value = "核心指标 (来自 BI)")
private DashboardMetrics metrics;
/**
* 员工列表 (用于排行)
*/
@ApiModelProperty(value = "员工列表 (用于排行)")
private List<EmployeeRanking> employeeList;
/**
* AI 分析建议
*/
@ApiModelProperty(value = "AI 分析建议", example = "根据数据分析,建议关注低绩效员工的培训和辅导,提升整体业绩水平")
private String aiAnalysisSuggestion;
}
package cn.com.glsx.dj.supervisor.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum ExcellentCaseReviewStatusEnum {
PENDING(0, "待审核"),
APPROVED(1, "通过"),
REJECTED(2, "驳回");
private Integer code;
private String name;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.model;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 行为数据 DTO
* 数据来源:D+ 后台 - 人员管理 - 质检管理 / 线索系统
* 用途:提供录音数、线索数,用于计算录音缺失率、平均单产录音数等。
* 注意:成交数(A075)和战败数(A0123) 已从 BI 获取,本 DTO 不再包含这两个字段。
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BehaviorDataDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 员工手机号 (聚合主键)
* 必须与 BI 数据中的 staffPhone 保持一致,以便内存合并
*/
private String staffPhone;
/**
* 员工姓名
*/
private String staffName;
// ================= 核心行为指标 =================
/**
* 录音数
* 来源:质检系统统计的有效录音数量
* 用途:
* 1. 直接展示
* 2. 计算 [平均单产录音数] = 录音数 / 成交数(A075)
*/
private Integer recordingCount;
/**
* 线索总数 (或应录音总数)
* 来源:线索系统 或 销售过程管理系统
* 定义:该员工在统计周期内分配到的、需要跟进并录音的线索总量
* 用途:
* 计算 [录音缺失率] = (线索总数 - 录音数) / 线索总数 * 100%
*
* 注意:如果业务定义“应录音数”不等于“线索数”(例如只有通话超过1分钟才算),
* 请确保此字段返回的是符合“应录音”定义的基数。
*/
private Integer leadCount;
// ================= 辅助扩展字段 (可选) =================
/**
* 质检得分/平均分
* 如果后续需要展示质检分数,可在此扩展
*/
private Double qualityScore;
/**
* 违规次数
* 如果后续需要展示合规性警告,可在此扩展
*/
private Integer violationCount;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.model;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 统计业务
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
public class DataBusinessDTO implements Serializable {
// 主要使用字段
/**
* 指标编码
* <a href="https://doc.weixin.qq.com/sheet/e3_ADoAiwalAOstQVLBOVoS1i0Wusban?scode=APkAlwewABABoyeIaIAXIAHAZ3AKw&tab=BB08J2">指标编码</a>
*/
private String itemCode;
/**
* 业务类型:1.延保 2.轻改 3.权益 都为 -
*/
private String biz;
/**
* 商户ID
*/
private Integer merchantId;
/**
* 商户名称
*/
private String merchantName;
/**
* 指标值
*/
private BigDecimal itemValue;
/**
* 上个周期值
*/
private BigDecimal preValue;
/**
* 开始时间
*/
private String startDate;
/**
* 结束时间
*/
private String endDate;
/**
* 环比
*/
private String rate;
// 未返回字段
private Integer id;
private String brandId;
private String brandName;
private String createTime;
private String date;
private BigDecimal nextValue;
private String productId;
private String productName;
private String remark;
private String rowkey;
private String staffId;
private String staffName;
private String staffPhone;
private String msg;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class DataResp<T> {
private Integer code;
private String msg;
private T content;
}
package cn.com.glsx.dj.supervisor.model;
import java.math.BigDecimal;
import lombok.Data;
/**
* 内部临时类,用于内存聚合中间状态
*/
@Data
public class EmployeeMetricTemp {
private String staffName;
private Integer merchantId;
private BigDecimal outputValue = BigDecimal.ZERO; // A036 累加
private BigDecimal numeratorValue = BigDecimal.ZERO; // A075 累加
private BigDecimal denominatorValue = BigDecimal.ZERO; // A084 累加
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.model;
import cn.com.glsx.dj.supervisor.enums.ExcellentCaseReviewStatusEnum;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
/**
* 优秀案例审核实体类
* <p>
* 用于存储督导提交的优秀案例信息,包括案例详情、驻店人员信息、门店信息、录音资料等
* 支持审核流程:待审核 -> 通过/驳回
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@Data
@ToString
@Table(name = "excellent_case_review")
public class ExcellentCaseReview implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID(自增)
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/**
* 案例标题
*/
@Column(name = "case_title")
private String caseTitle;
/**
* 驻店人员姓名
*/
@Column(name = "staff_name")
private String staffName;
/**
* 驻店人员手机号
*/
@Column(name = "staff_phone")
private String staffPhone;
/**
* 门店ID
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 门店名称
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 客户类别
*/
@Column(name = "customer_category")
private String customerCategory;
/**
* 案例描述
*/
@Column(name = "case_description")
private String caseDescription;
/**
* 录音URL
*/
@Column(name = "recording_url")
private String recordingUrl;
/**
* 录音时长(秒)
*/
@Column(name = "recording_duration")
private Integer recordingDuration;
/**
* 提交人ID
*/
@Column(name = "submitter_id")
private String submitterId;
/**
* 提交人姓名
*/
@Column(name = "submitter_name")
private String submitterName;
/**
* 提交人手机号
*/
@Column(name = "submitter_phone")
private String submitterPhone;
/**
* 审核状态
* <p>
* 0 - 待审核(默认)
* 1 - 通过
* 2 - 驳回
* </p>
*
* @see ExcellentCaseReviewStatusEnum
*/
@Column(name = "review_status")
private Integer reviewStatus;
/**
* 审核人ID
*/
@Column(name = "reviewer_id")
private String reviewerId;
/**
* 审核人姓名
*/
@Column(name = "reviewer_name")
private String reviewerName;
/**
* 审核时间
*/
@Column(name = "review_time")
private Date reviewTime;
/**
* 审核意见
*/
@Column(name = "review_comment")
private String reviewComment;
/**
* 创建人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "create_time")
private Date createTime;
/**
* 更新人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 更新时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 删除标识
* <p>
* D - 已删除
* N - 未删除(默认)
* </p>
*/
@Column(name = "deleted_flag")
private String deletedFlag;
}
package cn.com.glsx.dj.supervisor.remote;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseDetailDTO;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseReviewQueryDTO;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseReviewReqDTO;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseSubmitDTO;
import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.github.pagehelper.Page;
import java.util.List;
/**
* 优秀案例审核远程服务接口
* <p>
* 提供优秀案例的提交、查询、审核等功能的Dubbo远程调用接口
* 支持案例的生命周期管理:提交 -> 待审核 -> 通过/驳回
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@ApiService(value = "优秀案例审核", owner = "fanfr")
public interface ExcellentCaseReviewRemote {
/**
* 提交优秀案例
* <p>
* 督导提交优秀案例信息,案例初始状态为"待审核"
* </p>
*/
@interface SubmitExcellentCase {}
@ApiMethod("提交优秀案例")
@ApiParams({
@ApiParam(name = "request", notes = "优秀案例信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true),
@ApiParam(name = "currentUser", notes = "当前用户", dataType = ApiParam.DataTypeEnum.STRING, required = true),
@ApiParam(name = "currentUserId", notes = "当前用户ID", dataType = ApiParam.DataTypeEnum.LONG, required = true)
})
@ApiResponse("提交结果")
RpcResponse<Boolean> submitExcellentCase(ExcellentCaseSubmitDTO request, String currentUser, String currentUserId);
/**
* 查询优秀案例列表(分页)
* <p>
* 支持多条件筛选:驻店人员姓名、门店名称、客户类别、提交人姓名、审核状态
* </p>
*/
@interface QueryExcellentCaseList {}
@ApiMethod("查询优秀案例列表")
@ApiParams({@ApiParam(name = "request", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("优秀案例列表")
RpcResponse<Page<ExcellentCaseDetailDTO>> queryExcellentCaseList(RpcPagination<ExcellentCaseReviewQueryDTO> request);
/**
* 查询优秀案例详情
* <p>
* 根据案例ID查询完整的案例信息
* </p>
*/
@interface GetExcellentCaseDetail {}
@ApiMethod("查询优秀案例详情")
@ApiParams({@ApiParam(name = "id", notes = "案例ID", dataType = ApiParam.DataTypeEnum.LONG, required = true)})
@ApiResponse("优秀案例详情")
RpcResponse<ExcellentCaseDetailDTO> getExcellentCaseDetail(Long id);
/**
* 审核通过优秀案例
* <p>
* 将案例状态从"待审核"更新为"通过"
* </p>
*/
@interface ApproveExcellentCase {}
@ApiMethod("审核通过优秀案例")
@ApiParams({
@ApiParam(name = "request", notes = "审核信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true),
@ApiParam(name = "currentUser", notes = "当前用户", dataType = ApiParam.DataTypeEnum.STRING, required = true),
@ApiParam(name = "currentUserId", notes = "当前用户ID", dataType = ApiParam.DataTypeEnum.LONG, required = true)
})
@ApiResponse("审核结果")
RpcResponse<Boolean> approveExcellentCase(ExcellentCaseReviewReqDTO request, String currentUser, String currentUserId);
/**
* 审核驳回优秀案例
* <p>
* 将案例状态从"待审核"更新为"驳回"
* </p>
*/
@interface RejectExcellentCase {}
@ApiMethod("审核驳回优秀案例")
@ApiParams({
@ApiParam(name = "request", notes = "审核信息", dataType = ApiParam.DataTypeEnum.OBJECT, required = true),
@ApiParam(name = "currentUser", notes = "当前用户", dataType = ApiParam.DataTypeEnum.STRING, required = true),
@ApiParam(name = "currentUserId", notes = "当前用户ID", dataType = ApiParam.DataTypeEnum.LONG, required = true)
})
@ApiResponse("审核结果")
RpcResponse<Boolean> rejectExcellentCase(ExcellentCaseReviewReqDTO request, String currentUser, String currentUserId);
/**
* 下载优秀案例录音
* <p>
* 根据案例ID获取录音文件的URL
* </p>
*/
@interface DownloadRecording {}
@ApiMethod("下载优秀案例录音")
@ApiParams({@ApiParam(name = "id", notes = "案例ID", dataType = ApiParam.DataTypeEnum.LONG, required = true)})
@ApiResponse("录音URL")
RpcResponse<String> downloadRecording(Long id);
/**
* 查询客户类别列表
* <p>
* 获取系统中已有的所有客户类别,用于下拉选择
* </p>
*/
@interface QueryCustomerCategories {}
@ApiMethod("查询客户类别列表")
@ApiResponse("客户类别列表")
RpcResponse<List<String>> queryCustomerCategories();
}
package cn.com.glsx.dj.supervisor.remote;
import cn.com.glsx.dj.supervisor.dto.*;
import cn.com.glsx.framework.core.annotation.*;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
/**
* 督导看板远程服务接口
* <p>
* 提供督导看板相关的远程调用接口
* 包括首页数据、行为数据、人员基础信息、个人业绩、行为分析等功能
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@Api(value = "督导看板远程服务", tags = "督导看板")
@ApiService(value = "督导看板", owner = "fanfr")
public interface SupervisorDashboardRemote {
/**
* 获取督导首页数据
* <p>
* 包含基础指标、员工数据、AI分析建议等
* </p>
*/
@interface GetDashboardData {}
@ApiOperation("获取督导首页数据")
@ApiMethod("获取督导首页数据")
@ApiParams({
@ApiParam(name = "req", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
})
@ApiResponse("首页数据")
RpcResponse<SupervisorDashboardVO> getDashboardData(DashboardQueryReq req);
/**
* 获取督导行为数据
* <p>
* 包含行为分析、员工行为数据、AI分析建议等
* </p>
*/
@interface GetDashboardBehaviorData {}
@ApiOperation("获取督导行为数据")
@ApiMethod("获取督导行为数据")
@ApiParams({
@ApiParam(name = "req", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
})
@ApiResponse("行为数据")
RpcResponse<SupervisorDashboardVO> getDashboardBehaviorData(DashboardQueryReq req);
/**
* 获取人员基础信息
* <p>
* 包含员工基础信息,如姓名、手机号、归业业务、入职时间、年龄、出生日期、民族、籍贯、入职部门、职务、直线经理等
* </p>
*/
@interface GetEmployeeDashboardData {}
@ApiOperation("获取人员基础信息")
@ApiMethod("获取人员基础信息")
@ApiParams({
@ApiParam(name = "req", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
})
@ApiResponse("人员基础信息")
RpcResponse<EmployeeBasicInfoDTO> getEmployeeDashboardData(EmployeeBasicInfoReq req);
/**
* 获取个人业绩数据
* <p>
* 包含员工个人业绩数据,如总产值、客单价、总触客数、总成交数等
* 支持场景、时间、门店维度的查询
* </p>
*/
@interface GetEmployeePerformanceData {}
@ApiOperation("获取个人业绩数据")
@ApiMethod("获取个人业绩数据")
@ApiParams({
@ApiParam(name = "req", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
})
@ApiResponse("个人业绩数据")
RpcResponse<EmployeePerformanceDTO> getEmployeePerformanceData(EmployeePerformanceReq req);
/**
* 获取个人行为分析数据
* <p>
* 包含员工行为分析数据,如考勤统计、日报统计、客户接待、录音分析、着装预警等
* 支持场景、时间维度的查询
* </p>
*/
@interface GetEmployeeBehaviorData {}
@ApiOperation("获取个人行为分析数据")
@ApiMethod("获取个人行为分析数据")
@ApiParams({
@ApiParam(name = "req", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
})
@ApiResponse("个人行为分析数据")
RpcResponse<EmployeeBehaviorDTO> getEmployeeBehaviorData(EmployeeBehaviorReq req);
/**
* 获取员工调店记录
* <p>
* 获取员工在不同门店之间的流动履历
* </p>
*/
@interface GetEmployeeStoreTransferRecords {}
@ApiOperation("获取员工调店记录")
@ApiMethod("获取员工调店记录")
@ApiParams({
@ApiParam(name = "req", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
})
@ApiResponse("员工调店记录")
RpcResponse<List<EmployeeStoreTransferDTO>> getEmployeeStoreTransferRecords(EmployeeStoreTransferReq req);
/**
* 获取录音列表
* <p>
* 获取员工的录音列表,包含客户姓名、手机号、驻店人员、门店、客户类型、车型等信息
* 支持按日期、接待结果等条件查询
* </p>
*/
@interface GetRecordingList {}
@ApiOperation("获取录音列表")
@ApiMethod("获取录音列表")
@ApiParams({
@ApiParam(name = "req", notes = "查询参数", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)
})
@ApiResponse("录音列表")
RpcResponse<RecordingListDTO> getRecordingList(RecordingQueryReq req);
}
...@@ -48,6 +48,11 @@ ...@@ -48,6 +48,11 @@
<artifactId>platform-merchants-api</artifactId> <artifactId>platform-merchants-api</artifactId>
<version>5.6.1-SNAPSHOT</version> <version>5.6.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.38</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.mapper;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseDetailDTO;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseReviewQueryDTO;
import cn.com.glsx.dj.supervisor.model.ExcellentCaseReview;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import java.util.List;
/**
* 优秀案例审核数据访问层
* <p>
* 提供优秀案例的增删改查操作,包括:
* - 案例列表分页查询(支持多条件筛选)
* - 案例详情查询
* - 客户类别列表查询
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@Mapper
public interface ExcellentCaseReviewMapper extends OreMapper<ExcellentCaseReview> {
/**
* 查询优秀案例列表
* <p>
* 支持多条件筛选查询,包括:
* - 驻店人员姓名(模糊匹配)
* - 门店名称(模糊匹配)
* - 客户类别(精确匹配)
* - 提交人姓名(模糊匹配)
* - 审核状态(精确匹配)
* </p>
*
* @param query 查询条件
* @return 案例详情列表
*/
List<ExcellentCaseDetailDTO> queryExcellentCaseList(@Param("query") ExcellentCaseReviewQueryDTO query);
/**
* 查询优秀案例详情
* <p>
* 根据案例ID查询完整的案例信息,包括案例详情、审核信息等
* </p>
*
* @param id 案例ID
* @return 案例详情DTO
*/
ExcellentCaseDetailDTO getExcellentCaseDetail(@Param("id") Long id);
/**
* 查询客户类别列表
* <p>
* 获取系统中已有的所有客户类别(去重)
* 只查询未删除的案例中的客户类别
* </p>
*
* @return 客户类别列表
*/
List<String> queryCustomerCategories();
}
package cn.com.glsx.dj.supervisor.remote;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseDetailDTO;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseReviewQueryDTO;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseReviewReqDTO;
import cn.com.glsx.dj.supervisor.dto.ExcellentCaseSubmitDTO;
import cn.com.glsx.dj.supervisor.service.ExcellentCaseReviewService;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import com.github.pagehelper.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* 优秀案例审核远程服务实现类
* <p>
* 实现优秀案例审核的Dubbo远程调用接口
* 负责处理来自前端或其他服务的远程调用请求,调用本地Service层完成业务逻辑
* 统一处理异常并返回标准的RPC响应
* </p>
*
* @author fanfr
* @since 2026-03-12
*/
@Slf4j
@DubboService(retries = 0, timeout = 30000, validation = "true")
public class ExcellentCaseReviewRemoteImpl implements ExcellentCaseReviewRemote {
@Autowired
private ExcellentCaseReviewService excellentCaseReviewService;
/**
* 提交优秀案例
* <p>
* 接收远程调用请求,调用Service层提交优秀案例
* </p>
*
* @param request 案例提交信息
* @param currentUser 当前操作用户姓名
* @param currentUserId 当前操作用户ID
* @return RPC响应,包含提交结果
*/
@Override
public RpcResponse<Boolean> submitExcellentCase(ExcellentCaseSubmitDTO request, String currentUser, String currentUserId) {
try {
Boolean result = excellentCaseReviewService.submitExcellentCase(request, currentUser, currentUserId);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.submitExcellentCase error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.submitExcellentCase system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
/**
* 查询优秀案例列表(分页)
* <p>
* 接收远程调用请求,调用Service层查询案例列表
* </p>
*
* @param request 分页查询参数
* @return RPC响应,包含分页的案例列表
*/
@Override
public RpcResponse<Page<ExcellentCaseDetailDTO>> queryExcellentCaseList(RpcPagination<ExcellentCaseReviewQueryDTO> request) {
try {
Page result = excellentCaseReviewService.queryExcellentCaseList(request);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.queryExcellentCaseList error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.queryExcellentCaseList system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
/**
* 查询优秀案例详情
* <p>
* 接收远程调用请求,调用Service层查询案例详情
* </p>
*
* @param id 案例ID
* @return RPC响应,包含案例详情
*/
@Override
public RpcResponse<ExcellentCaseDetailDTO> getExcellentCaseDetail(Long id) {
try {
ExcellentCaseDetailDTO result = excellentCaseReviewService.getExcellentCaseDetail(id);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.getExcellentCaseDetail error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.getExcellentCaseDetail system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
/**
* 审核通过优秀案例
* <p>
* 接收远程调用请求,调用Service层审核通过案例
* </p>
*
* @param request 审核请求
* @param currentUser 当前审核人姓名
* @param currentUserId 当前审核人ID
* @return RPC响应,包含审核结果
*/
@Override
public RpcResponse<Boolean> approveExcellentCase(ExcellentCaseReviewReqDTO request, String currentUser, String currentUserId) {
try {
Boolean result = excellentCaseReviewService.approveExcellentCase(request, currentUser, currentUserId);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.approveExcellentCase error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.approveExcellentCase system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
/**
* 审核驳回优秀案例
* <p>
* 接收远程调用请求,调用Service层审核驳回案例
* </p>
*
* @param request 审核请求
* @param currentUser 当前审核人姓名
* @param currentUserId 当前审核人ID
* @return RPC响应,包含审核结果
*/
@Override
public RpcResponse<Boolean> rejectExcellentCase(ExcellentCaseReviewReqDTO request, String currentUser, String currentUserId) {
try {
Boolean result = excellentCaseReviewService.rejectExcellentCase(request, currentUser, currentUserId);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.rejectExcellentCase error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.rejectExcellentCase system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
/**
* 下载优秀案例录音
* <p>
* 接收远程调用请求,调用Service层获取录音URL
* </p>
*
* @param id 案例ID
* @return RPC响应,包含录音URL
*/
@Override
public RpcResponse<String> downloadRecording(Long id) {
try {
String result = excellentCaseReviewService.downloadRecording(id);
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.downloadRecording error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.downloadRecording system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
/**
* 查询客户类别列表
* <p>
* 接收远程调用请求,调用Service层查询客户类别
* </p>
*
* @return RPC响应,包含客户类别列表
*/
@Override
public RpcResponse<List<String>> queryCustomerCategories() {
try {
List<String> result = excellentCaseReviewService.queryCustomerCategories();
return RpcResponse.success(result);
} catch (RpcServiceException e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.queryCustomerCategories error {}", e);
return RpcResponse.error(e.getError(), e.getMessage());
} catch (Exception e) {
log.error("cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.queryCustomerCategories system error {}", e);
return RpcResponse.error(DefaultErrorEnum.SERVER_ERROR, e.getMessage());
}
}
}
package cn.com.glsx.dj.supervisor.service;
import cn.com.glsx.dj.supervisor.dto.EmployeeRanking;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
@Service
public class AiAnalysisService {
private static final String SYSTEM_PROMPT = "";
/**
* 生成 AI 分析建议
*/
public String generateSuggestion(List<EmployeeRanking> employeeList) {
if (employeeList == null || employeeList.isEmpty()) {
return "当前周期暂无足够数据进行 AI 分析。";
}
// 构造输入数据上下文 (简化为文本描述,实际可转为 JSON 字符串)
StringBuilder dataContext = new StringBuilder("以下是团队当前周期的详细数据:\n");
// 计算简单的统计信息辅助 AI
double avgOutput = employeeList.stream().mapToDouble(e -> e.getPersonalOutput().doubleValue()).average().orElse(0);
double avgConversion = employeeList.stream().mapToDouble(e -> e.getPersonalConversion().doubleValue()).average().orElse(0);
dataContext.append(String.format("团队人数:%d, 平均产值:%.2f, 平均转化率:%.2f%%\n",
employeeList.size(), avgOutput, avgConversion * 100));
dataContext.append("详细员工数据 (姓名, 产值, 客单价, 转化率):\n");
for (EmployeeRanking emp : employeeList) {
dataContext.append(String.format("- %s: 产值=%.2f, 客单价=%.2f, 转化率=%.2f%%\n",
emp.getEmployeeName(),
emp.getPersonalOutput(),
emp.getPersonalUnitPrice(),
emp.getPersonalConversion()));
}
// TODO 调用大模型
return null;
}
public String generateBehaviorSuggestion(List<EmployeeRanking> employeeList) {
if (employeeList == null || employeeList.isEmpty()) {
return "当前周期暂无行为数据进行 AI 分析。";
}
StringBuilder dataContext = new StringBuilder("团队行为数据详情 (姓名,成交数,战败数,录音数,缺失率%):\n");
// 统计总量供 AI 参考
int totalDeal = 0, totalDefeat = 0, totalRec = 0;
double avgMissingRate = 0;
for (EmployeeRanking emp : employeeList) {
int deal = emp.getDealCount() != null ? emp.getDealCount() : 0;
int defeat = emp.getDefeatCount() != null ? emp.getDefeatCount() : 0;
int rec = emp.getRecordingCount() != null ? emp.getRecordingCount() : 0;
double missRate = emp.getMissingRate() != null ? emp.getMissingRate().doubleValue() : 0;
totalDeal += deal;
totalDefeat += defeat;
totalRec += rec;
avgMissingRate += missRate;
dataContext.append(String.format("- %s: 成交=%d, 战败=%d, 录音=%d, 缺失率=%.2f%%\n",
emp.getEmployeeName(), deal, defeat, rec, missRate));
}
avgMissingRate /= employeeList.size();
double teamDealRate = (totalDeal + totalDefeat) > 0 ? (double)totalDeal / (totalDeal + totalDefeat) : 0;
dataContext.insert(0, String.format("团队汇总:总成交=%d, 总战败=%d, 总录音=%d, 平均缺失率=%.2f%%, 团队成交率=%.2f%%\n\n",
totalDeal, totalDefeat, totalRec, avgMissingRate, teamDealRate * 100));
// TODO 调用大模型
return null;
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.service;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 查询参数实体类
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class DataBizQueryParamsDTO implements Serializable {
/**
* 业务类型:1.延保 2.轻改 3.权益 4.二手车 必传
*/
private Integer bizs;
/**
* 品牌ID列表,多个用逗号分隔,为空表示不分 固定值:"-1,-3"
*/
private String brandIds;
/**
* 日期类型:0,按指定时段;1,按周;2,按月;3,按年;4,全部
*/
private Integer dateType;
/**
* 开始日期
*/
private String startDate;
/**
* 结束日期
*/
private String endDate;
/**
* 聚合维度,多个用逗号分隔,为空表示不按维度聚合
* 格式示例:merchantId,staffId,productId,date
*/
private String exts;
/**
* 项目编码列表,多个用逗号分隔
* 产值-A036
* 客单价-A076 = [(产值 A036)/(订单数 A075)]
* 引流率-A064 = [(触客数售前 A063)/(新车交付数 A062)]
* 转化率-A085 = [(订单数 A075)/(总触客数 A084)]
* 渗透率-A077 = [(订单数 A075)/(新车交付数 A062)]
* <p>
* (订单数-A075)
* (触客数售前-A063)
* (总触客数-A084)
* (新车交付数-A062)
*/
private String itemCodes;
/**
* 最大日期
*/
private String maxDate;
/**
* 门店ID列表,多个用逗号分隔,为空表示不分
*/
private String merchantIds;
/**
* 最小日期
*/
private String minDate;
/**
* 产品ID列表,多个用逗号分隔,为空表示不分
*/
private String productIds;
/**
* 驻店ID列表,多个用逗号分隔,为空表示不分
*/
private String staffIds;
/**
* 驻点手机号列表,多个用逗号分隔,为空表示不分
*/
private String staffPhones;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.supervisor.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.Map;
public class HttpRequestUtils {
private static final String DEFAULT_USER_AGENT = "Java-HttpRequestUtils/1.0";
private static final int DEFAULT_CONNECT_TIMEOUT = 30000; // 30秒
private static final int DEFAULT_READ_TIMEOUT = 60000; // 60秒
/**
* 发送 POST 请求(JSON 数据)
*
* @param urlStr 目标 URL
* @param jsonBody JSON 格式的请求体
* @return 响应内容字符串
* @throws IOException 网络异常
*/
public static String postJson(String urlStr, String jsonBody) throws IOException {
return post(urlStr, jsonBody, "application/json; charset=utf-8");
}
/**
* 发送 POST 请求(表单数据)
*
* @param urlStr 目标 URL
* @param formData 表单参数(如:key1=value1&key2=value2)
* @return 响应内容字符串
* @throws IOException 网络异常
*/
public static String postForm(String urlStr, String formData) throws IOException {
return post(urlStr, formData, "application/x-www-form-urlencoded; charset=utf-8");
}
/**
* 通用 POST 方法(支持自定义请求头和超时)
*
* @param urlStr 目标 URL
* @param body 请求体内容
* @param contentType 内容类型
* @param headers 自定义请求头(可选)
* @param connectTimeout 连接超时(毫秒)
* @param readTimeout 读取超时(毫秒)
* @return 响应内容字符串
* @throws IOException 网络异常
*/
public static String post(String urlStr, String body, String contentType,
Map<String, String> headers, int connectTimeout, int readTimeout) throws IOException {
URL url = new URL(urlStr);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
// 配置请求
connection.setRequestMethod("POST");
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type", contentType);
connection.setRequestProperty("User-Agent", DEFAULT_USER_AGENT);
// 添加自定义请求头
if (headers != null) {
for (Map.Entry<String, String> entry : headers.entrySet()) {
connection.setRequestProperty(entry.getKey(), entry.getValue());
}
}
// 设置超时
connection.setConnectTimeout(connectTimeout);
connection.setReadTimeout(readTimeout);
// 写入请求体
try (OutputStream os = connection.getOutputStream()) {
byte[] input = body.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
// 处理响应
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
try (BufferedReader br = new BufferedReader(
new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
StringBuilder response = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
response.append(line);
}
return response.toString();
}
} else {
throw new IOException("HTTP error code: " + responseCode +
" - " + getErrorResponse(connection));
}
}
// 重载方法(默认值)
public static String post(String urlStr, String body, String contentType) throws IOException {
return post(urlStr, body, contentType, null, DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT);
}
// 重载:JSON POST
public static String postJson(String urlStr, String jsonBody, Map<String, String> headers) throws IOException {
return post(urlStr, jsonBody, "application/json; charset=utf-8", headers,
DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT);
}
// 重载:表单 POST
public static String postForm(String urlStr, String formData, Map<String, String> headers) throws IOException {
return post(urlStr, formData, "application/x-www-form-urlencoded; charset=utf-8", headers,
DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT);
}
// 获取错误响应体
private static String getErrorResponse(HttpURLConnection connection) throws IOException {
try (BufferedReader br = new BufferedReader(
new InputStreamReader(connection.getErrorStream(), StandardCharsets.UTF_8))) {
StringBuilder errorResponse = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
errorResponse.append(line);
}
return errorResponse.toString();
} catch (IOException e) {
return "Error reading error stream";
}
}
}
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.com.glsx.dj.supervisor.mapper.ExcellentCaseReviewMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.supervisor.model.ExcellentCaseReview" >
<id column="id" property="id" jdbcType="BIGINT" />
<result column="case_title" property="caseTitle" jdbcType="VARCHAR" />
<result column="staff_name" property="staffName" jdbcType="VARCHAR" />
<result column="staff_phone" property="staffPhone" jdbcType="VARCHAR" />
<result column="merchant_id" property="merchantId" jdbcType="INTEGER" />
<result column="merchant_name" property="merchantName" jdbcType="VARCHAR" />
<result column="customer_category" property="customerCategory" jdbcType="VARCHAR" />
<result column="case_description" property="caseDescription" jdbcType="VARCHAR" />
<result column="recording_url" property="recordingUrl" jdbcType="VARCHAR" />
<result column="recording_duration" property="recordingDuration" jdbcType="INTEGER" />
<result column="submitter_id" property="submitterId" jdbcType="BIGINT" />
<result column="submitter_name" property="submitterName" jdbcType="VARCHAR" />
<result column="submitter_phone" property="submitterPhone" jdbcType="VARCHAR" />
<result column="review_status" property="reviewStatus" jdbcType="INTEGER" />
<result column="reviewer_id" property="reviewerId" jdbcType="BIGINT" />
<result column="reviewer_name" property="reviewerName" jdbcType="VARCHAR" />
<result column="review_time" property="reviewTime" jdbcType="TIMESTAMP" />
<result column="review_comment" property="reviewComment" jdbcType="VARCHAR" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="ExcellentCaseDetailMap" type="cn.com.glsx.dj.supervisor.dto.ExcellentCaseDetailDTO">
<id column="id" property="id"/>
<result column="case_title" property="caseTitle"/>
<result column="staff_name" property="staffName"/>
<result column="staff_phone" property="staffPhone"/>
<result column="merchant_id" property="merchantId"/>
<result column="merchant_name" property="merchantName"/>
<result column="customer_category" property="customerCategory"/>
<result column="case_description" property="caseDescription"/>
<result column="recording_url" property="recordingUrl"/>
<result column="recording_duration" property="recordingDuration"/>
<result column="submitter_id" property="submitterId"/>
<result column="submitter_name" property="submitterName"/>
<result column="submitter_phone" property="submitterPhone"/>
<result column="review_status" property="reviewStatus"/>
<result column="reviewer_id" property="reviewerId"/>
<result column="reviewer_name" property="reviewerName"/>
<result column="review_time" property="reviewTime"/>
<result column="review_comment" property="reviewComment"/>
<result column="create_time" property="createTime"/>
<result column="updated_date" property="updatedDate"/>
</resultMap>
<sql id="Base_Column_List" >
id, case_title, staff_name, staff_phone, merchant_id, merchant_name, customer_category,
case_description, recording_url, recording_duration, submitter_id, submitter_name, submitter_phone,
review_status, reviewer_id, reviewer_name, review_time, review_comment,
created_by, create_time, updated_by, updated_date, deleted_flag
</sql>
<select id="queryExcellentCaseList" parameterType="cn.com.glsx.dj.supervisor.dto.ExcellentCaseReviewQueryDTO" resultMap="ExcellentCaseDetailMap">
select
<include refid="Base_Column_List" />
from excellent_case_review
<where>
deleted_flag = 'N'
<if test="query.staffName != null and query.staffName != ''">
and staff_name like CONCAT('%', #{query.staffName}, '%')
</if>
<if test="query.merchantName != null and query.merchantName != ''">
and merchant_name like CONCAT('%', #{query.merchantName}, '%')
</if>
<if test="query.customerCategory != null and query.customerCategory != ''">
and customer_category = #{query.customerCategory}
</if>
<if test="query.submitterName != null and query.submitterName != ''">
and submitter_name like CONCAT('%', #{query.submitterName}, '%')
</if>
<if test="query.reviewStatus != null">
and review_status = #{query.reviewStatus}
</if>
</where>
order by create_time desc
</select>
<select id="getExcellentCaseDetail" resultMap="ExcellentCaseDetailMap">
select
<include refid="Base_Column_List" />
from excellent_case_review
<where>
deleted_flag = 'N' and id = #{id}
</where>
</select>
<select id="queryCustomerCategories" resultType="java.lang.String">
select distinct customer_category
from excellent_case_review
where deleted_flag = 'N'
and customer_category is not null
and customer_category != ''
order by customer_category
</select>
</mapper>
\ 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!