Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-supervisor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3975f1b7
authored
Mar 19, 2026
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]优秀案例审核
1 parent
92524519
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
254 additions
and
118 deletions
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/EmployeePerformanceDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/ExcellentCaseDetailDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/ExcellentCaseReviewQueryDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/ExcellentCaseSubmitDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/model/ExcellentCaseReview.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemote.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/ExcellentCaseReviewMapper.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemoteImpl.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/ExcellentCaseReviewService.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardService.java
rpc-dj-supervisor/src/main/resources/META-INF/orm/ExcellentCaseReviewMapper.xml
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemoteImplTest.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/EmployeePerformanceDTO.java
View file @
3975f1b
...
@@ -324,6 +324,68 @@ public class EmployeePerformanceDTO implements Serializable {
...
@@ -324,6 +324,68 @@ public class EmployeePerformanceDTO implements Serializable {
*/
*/
@ApiModelProperty
(
value
=
"售后转化率(指标A0105)"
,
example
=
"65%"
)
@ApiModelProperty
(
value
=
"售后转化率(指标A0105)"
,
example
=
"65%"
)
private
String
postSaleConversionRate
;
private
String
postSaleConversionRate
;
// 新增字段
/**
* 触客数(指标A084)
*/
@ApiModelProperty
(
value
=
"触客数(指标A084)"
,
example
=
"100"
)
private
Integer
customerCount
;
/**
* 成交数(指标A075)
*/
@ApiModelProperty
(
value
=
"成交数(指标A075)"
,
example
=
"80"
)
private
Integer
dealCount
;
/**
* 整车延保-成交数(指标A066)
*/
@ApiModelProperty
(
value
=
"整车延保-成交数(指标A066)"
,
example
=
"20"
)
private
Integer
vehicleWarrantyDealCount
;
/**
* 电池-成交数(指标A070)
*/
@ApiModelProperty
(
value
=
"电池-成交数(指标A070)"
,
example
=
"15"
)
private
Integer
batteryDealCount
;
/**
* 安心包-成交数(指标A086)
*/
@ApiModelProperty
(
value
=
"安心包-成交数(指标A086)"
,
example
=
"10"
)
private
Integer
safetyPackDealCount
;
/**
* 轮胎成交数(指标A087)
*/
@ApiModelProperty
(
value
=
"轮胎成交数(指标A087)"
,
example
=
"8"
)
private
Integer
tireDealCount
;
// 新增字段
/**
* 售前触客数(指标A063)
*/
@ApiModelProperty
(
value
=
"售前触客数(指标A063)"
,
example
=
"50"
)
private
Integer
preSaleCustomerCount
;
/**
* 售后触客数(指标A096)
*/
@ApiModelProperty
(
value
=
"售后触客数(指标A096)"
,
example
=
"50"
)
private
Integer
postSaleCustomerCount
;
/**
* 售前成交数(指标A097)
*/
@ApiModelProperty
(
value
=
"售前成交数(指标A097)"
,
example
=
"40"
)
private
Integer
preSaleDealCount
;
/**
* 售后成交数(指标A098)
*/
@ApiModelProperty
(
value
=
"售后成交数(指标A098)"
,
example
=
"40"
)
private
Integer
postSaleDealCount
;
}
}
/**
/**
...
...
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/ExcellentCaseDetailDTO.java
View file @
3975f1b
...
@@ -14,14 +14,8 @@ public class ExcellentCaseDetailDTO implements Serializable {
...
@@ -14,14 +14,8 @@ public class ExcellentCaseDetailDTO implements Serializable {
@ApiModelProperty
(
notes
=
"主键ID"
)
@ApiModelProperty
(
notes
=
"主键ID"
)
private
Long
id
;
private
Long
id
;
@ApiModelProperty
(
notes
=
"案例标题"
)
@ApiModelProperty
(
notes
=
"录音ID"
)
private
String
caseTitle
;
private
Long
recordingId
;
@ApiModelProperty
(
notes
=
"驻店人员姓名"
)
private
String
staffName
;
@ApiModelProperty
(
notes
=
"驻店人员手机号"
)
private
String
staffPhone
;
@ApiModelProperty
(
notes
=
"门店ID"
)
@ApiModelProperty
(
notes
=
"门店ID"
)
private
Integer
merchantId
;
private
Integer
merchantId
;
...
@@ -29,20 +23,71 @@ public class ExcellentCaseDetailDTO implements Serializable {
...
@@ -29,20 +23,71 @@ public class ExcellentCaseDetailDTO implements Serializable {
@ApiModelProperty
(
notes
=
"门店名称"
)
@ApiModelProperty
(
notes
=
"门店名称"
)
private
String
merchantName
;
private
String
merchantName
;
@ApiModelProperty
(
notes
=
"客户类别"
)
@ApiModelProperty
(
notes
=
"客户姓名"
)
private
String
customerCategory
;
private
String
customerName
;
@ApiModelProperty
(
notes
=
"客户手机号"
)
private
String
phoneNumber
;
@ApiModelProperty
(
notes
=
"销售UUID"
)
private
String
salesUuid
;
@ApiModelProperty
(
notes
=
"销售姓名"
)
private
String
salesName
;
@ApiModelProperty
(
notes
=
"车辆品牌"
)
private
String
carBrand
;
@ApiModelProperty
(
notes
=
"车辆型号"
)
private
String
carModel
;
@ApiModelProperty
(
notes
=
"接待开始时间"
)
private
Date
receptionStartTime
;
@ApiModelProperty
(
notes
=
"接待结束时间"
)
private
Date
receptionEndTime
;
@ApiModelProperty
(
notes
=
"接待状态"
)
private
Integer
receptionStatus
;
@ApiModelProperty
(
notes
=
"
案例描述
"
)
@ApiModelProperty
(
notes
=
"
员工UUID
"
)
private
String
caseDescription
;
private
String
staffUuid
;
@ApiModelProperty
(
notes
=
"录音URL"
)
@ApiModelProperty
(
notes
=
"录音URL"
)
private
String
recordingUrl
;
private
String
recordingUrl
;
@ApiModelProperty
(
notes
=
"录音时长(秒)"
)
@ApiModelProperty
(
notes
=
"购车方式"
)
private
Integer
recordingDuration
;
private
Integer
carPurchaseMethod
;
@ApiModelProperty
(
notes
=
"检查历史标志"
)
private
Integer
checkHistoryFlag
;
@ApiModelProperty
(
notes
=
"批次ID"
)
private
Long
batchId
;
@ApiModelProperty
(
notes
=
"评分"
)
private
Integer
score
;
@ApiModelProperty
(
notes
=
"模型类型"
)
private
String
modelType
;
@ApiModelProperty
(
notes
=
"检查类型"
)
private
String
checkType
;
@ApiModelProperty
(
notes
=
"订单完成标志"
)
private
Boolean
orderFinishFlag
;
@ApiModelProperty
(
notes
=
"一车品牌"
)
private
String
oneCarBrand
;
@ApiModelProperty
(
notes
=
"攻防评分"
)
private
Integer
gfScroe
;
@ApiModelProperty
(
notes
=
"客户类型"
)
private
String
customerType
;
@ApiModelProperty
(
notes
=
"提交人ID"
)
@ApiModelProperty
(
notes
=
"提交人ID"
)
private
Lo
ng
submitterId
;
private
Stri
ng
submitterId
;
@ApiModelProperty
(
notes
=
"提交人姓名"
)
@ApiModelProperty
(
notes
=
"提交人姓名"
)
private
String
submitterName
;
private
String
submitterName
;
...
@@ -54,7 +99,7 @@ public class ExcellentCaseDetailDTO implements Serializable {
...
@@ -54,7 +99,7 @@ public class ExcellentCaseDetailDTO implements Serializable {
private
Integer
reviewStatus
;
private
Integer
reviewStatus
;
@ApiModelProperty
(
notes
=
"审核人ID"
)
@ApiModelProperty
(
notes
=
"审核人ID"
)
private
Lo
ng
reviewerId
;
private
Stri
ng
reviewerId
;
@ApiModelProperty
(
notes
=
"审核人姓名"
)
@ApiModelProperty
(
notes
=
"审核人姓名"
)
private
String
reviewerName
;
private
String
reviewerName
;
...
...
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/ExcellentCaseReviewQueryDTO.java
View file @
3975f1b
...
@@ -13,11 +13,11 @@ public class ExcellentCaseReviewQueryDTO implements Serializable {
...
@@ -13,11 +13,11 @@ public class ExcellentCaseReviewQueryDTO implements Serializable {
@ApiModelProperty
(
notes
=
"驻店人员姓名,模糊匹配"
)
@ApiModelProperty
(
notes
=
"驻店人员姓名,模糊匹配"
)
private
String
staffName
;
private
String
staffName
;
@ApiModelProperty
(
notes
=
"
接待门店名称,模糊匹配
"
)
@ApiModelProperty
(
notes
=
"
商户号
"
)
private
String
merchantName
;
private
Integer
merchantId
;
@ApiModelProperty
(
notes
=
"客户类
别
"
)
@ApiModelProperty
(
notes
=
"客户类
型
"
)
private
String
customer
Category
;
private
String
customer
Type
;
@ApiModelProperty
(
notes
=
"提交人姓名,模糊匹配"
)
@ApiModelProperty
(
notes
=
"提交人姓名,模糊匹配"
)
private
String
submitterName
;
private
String
submitterName
;
...
...
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/ExcellentCaseSubmitDTO.java
View file @
3975f1b
...
@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.ToString
;
import
lombok.ToString
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -12,38 +11,7 @@ import java.io.Serializable;
...
@@ -12,38 +11,7 @@ import java.io.Serializable;
@ToString
@ToString
public
class
ExcellentCaseSubmitDTO
implements
Serializable
{
public
class
ExcellentCaseSubmitDTO
implements
Serializable
{
@NotBlank
(
message
=
"案例标题不能为空"
)
@NotNull
(
message
=
"录音ID不能为空"
)
@ApiModelProperty
(
notes
=
"案例标题"
,
required
=
true
)
@ApiModelProperty
(
notes
=
"录音ID"
,
required
=
true
)
private
String
caseTitle
;
private
Long
recordingId
;
@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
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/model/ExcellentCaseReview.java
View file @
3975f1b
...
@@ -11,7 +11,7 @@ import javax.persistence.*;
...
@@ -11,7 +11,7 @@ import javax.persistence.*;
/**
/**
* 优秀案例审核实体类
* 优秀案例审核实体类
* <p>
* <p>
* 用于存储督导提交的优秀案例信息,
包括案例详情、驻店人员信息、门店信息、录音资料等
* 用于存储督导提交的优秀案例信息,
只保存录音ID和操作人信息
* 支持审核流程:待审核 -> 通过/驳回
* 支持审核流程:待审核 -> 通过/驳回
* </p>
* </p>
*
*
...
@@ -33,58 +33,10 @@ public class ExcellentCaseReview implements Serializable {
...
@@ -33,58 +33,10 @@ public class ExcellentCaseReview implements Serializable {
private
Long
id
;
private
Long
id
;
/**
/**
*
案例标题
*
录音ID
*/
*/
@Column
(
name
=
"case_title"
)
@Column
(
name
=
"recording_id"
)
private
String
caseTitle
;
private
Long
recordingId
;
/**
* 驻店人员姓名
*/
@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
* 提交人ID
...
...
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemote.java
View file @
3975f1b
...
@@ -118,4 +118,15 @@ public interface ExcellentCaseReviewRemote {
...
@@ -118,4 +118,15 @@ public interface ExcellentCaseReviewRemote {
@ApiMethod
(
"查询客户类别列表"
)
@ApiMethod
(
"查询客户类别列表"
)
@ApiResponse
(
"客户类别列表"
)
@ApiResponse
(
"客户类别列表"
)
RpcResponse
<
List
<
String
>>
queryCustomerCategories
();
RpcResponse
<
List
<
String
>>
queryCustomerCategories
();
/**
* 查询所有客户类型
* <p>
* 从 inspection_defence 表中获取所有去重的客户类型
* </p>
*/
@interface
QueryAllCustomerTypes
{}
@ApiMethod
(
"查询所有客户类型"
)
@ApiResponse
(
"客户类型列表"
)
RpcResponse
<
List
<
String
>>
queryAllCustomerTypes
();
}
}
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/ExcellentCaseReviewMapper.java
View file @
3975f1b
...
@@ -16,6 +16,7 @@ import java.util.List;
...
@@ -16,6 +16,7 @@ import java.util.List;
* - 案例列表分页查询(支持多条件筛选)
* - 案例列表分页查询(支持多条件筛选)
* - 案例详情查询
* - 案例详情查询
* - 客户类别列表查询
* - 客户类别列表查询
* - 录音ID重复检查
* </p>
* </p>
*
*
* @author zhouhb
* @author zhouhb
...
@@ -28,9 +29,7 @@ public interface ExcellentCaseReviewMapper extends OreMapper<ExcellentCaseReview
...
@@ -28,9 +29,7 @@ public interface ExcellentCaseReviewMapper extends OreMapper<ExcellentCaseReview
* 查询优秀案例列表
* 查询优秀案例列表
* <p>
* <p>
* 支持多条件筛选查询,包括:
* 支持多条件筛选查询,包括:
* - 驻店人员姓名(模糊匹配)
* - 门店名称(模糊匹配)
* - 门店名称(模糊匹配)
* - 客户类别(精确匹配)
* - 提交人姓名(模糊匹配)
* - 提交人姓名(模糊匹配)
* - 审核状态(精确匹配)
* - 审核状态(精确匹配)
* </p>
* </p>
...
@@ -61,4 +60,25 @@ public interface ExcellentCaseReviewMapper extends OreMapper<ExcellentCaseReview
...
@@ -61,4 +60,25 @@ public interface ExcellentCaseReviewMapper extends OreMapper<ExcellentCaseReview
* @return 客户类别列表
* @return 客户类别列表
*/
*/
List
<
String
>
queryCustomerCategories
();
List
<
String
>
queryCustomerCategories
();
/**
* 根据录音ID检查是否已提交
* <p>
* 检查指定录音ID是否已经被提交为优秀案例
* </p>
*
* @param recordingId 录音ID
* @return 存在数量(0表示未提交,大于0表示已提交)
*/
Integer
countByRecordingId
(
@Param
(
"recordingId"
)
Long
recordingId
);
/**
* 查询所有客户类型
* <p>
* 从 inspection_defence 表中获取所有去重的客户类型
* </p>
*
* @return 客户类型列表
*/
List
<
String
>
queryAllCustomerTypes
();
}
}
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemoteImpl.java
View file @
3975f1b
...
@@ -199,4 +199,26 @@ public class ExcellentCaseReviewRemoteImpl implements ExcellentCaseReviewRemote
...
@@ -199,4 +199,26 @@ public class ExcellentCaseReviewRemoteImpl implements ExcellentCaseReviewRemote
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
}
}
}
}
/**
* 查询所有客户类型
* <p>
* 接收远程调用请求,调用Service层查询所有客户类型
* </p>
*
* @return RPC响应,包含客户类型列表
*/
@Override
public
RpcResponse
<
List
<
String
>>
queryAllCustomerTypes
()
{
try
{
List
<
String
>
result
=
excellentCaseReviewService
.
queryAllCustomerTypes
();
return
RpcResponse
.
success
(
result
);
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.queryAllCustomerTypes error {}"
,
e
);
return
RpcResponse
.
error
(
e
.
getError
(),
e
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.ExcellentCaseReviewRemoteImpl.queryAllCustomerTypes system error {}"
,
e
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
}
}
}
}
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/ExcellentCaseReviewService.java
View file @
3975f1b
...
@@ -45,7 +45,7 @@ public class ExcellentCaseReviewService {
...
@@ -45,7 +45,7 @@ public class ExcellentCaseReviewService {
* 提交优秀案例
* 提交优秀案例
* <p>
* <p>
* 督导提交优秀案例信息,案例初始状态为"待审核"
* 督导提交优秀案例信息,案例初始状态为"待审核"
*
包含案例标题、驻店人员信息、门店信息、客户类别、案例描述、录音资料等
*
只保存录音ID和操作人信息,其他信息通过关联查询获取
* </p>
* </p>
*
*
* @param request 案例提交信息
* @param request 案例提交信息
...
@@ -58,6 +58,13 @@ public class ExcellentCaseReviewService {
...
@@ -58,6 +58,13 @@ public class ExcellentCaseReviewService {
public
Boolean
submitExcellentCase
(
ExcellentCaseSubmitDTO
request
,
String
currentUser
,
String
currentUserId
)
{
public
Boolean
submitExcellentCase
(
ExcellentCaseSubmitDTO
request
,
String
currentUser
,
String
currentUserId
)
{
log
.
info
(
"开始提交优秀案例,请求参数:{}"
,
request
);
log
.
info
(
"开始提交优秀案例,请求参数:{}"
,
request
);
// 检查录音ID是否已经提交过
Integer
existingCount
=
excellentCaseReviewMapper
.
countByRecordingId
(
request
.
getRecordingId
());
if
(
existingCount
!=
null
&&
existingCount
>
0
)
{
log
.
error
(
"录音ID已提交过,录音ID:{}"
,
request
.
getRecordingId
());
throw
new
RpcServiceException
(
"录音ID已提交过"
);
}
ExcellentCaseReview
excellentCase
=
new
ExcellentCaseReview
();
ExcellentCaseReview
excellentCase
=
new
ExcellentCaseReview
();
BeanUtils
.
copyProperties
(
request
,
excellentCase
);
BeanUtils
.
copyProperties
(
request
,
excellentCase
);
...
@@ -248,19 +255,19 @@ public class ExcellentCaseReviewService {
...
@@ -248,19 +255,19 @@ public class ExcellentCaseReviewService {
log
.
info
(
"开始下载优秀案例录音,案例ID:{}"
,
id
);
log
.
info
(
"开始下载优秀案例录音,案例ID:{}"
,
id
);
RpcAssert
.
assertNotNull
(
id
,
DefaultErrorEnum
.
PARAMETER_NULL
,
"案例ID不能为空"
);
RpcAssert
.
assertNotNull
(
id
,
DefaultErrorEnum
.
PARAMETER_NULL
,
"案例ID不能为空"
);
ExcellentCase
Review
excellentCase
=
excellentCaseReviewMapper
.
selectByPrimaryKey
(
id
);
ExcellentCase
DetailDTO
detail
=
getExcellentCaseDetail
(
id
);
if
(
excellentCase
==
null
)
{
if
(
detail
==
null
)
{
log
.
error
(
"根据ID查询优秀案例不存在,案例ID:{}"
,
id
);
log
.
error
(
"根据ID查询优秀案例不存在,案例ID:{}"
,
id
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
DATA_NOT_EXIST
,
"根据ID查询优秀案例不存在"
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
DATA_NOT_EXIST
,
"根据ID查询优秀案例不存在"
);
}
}
if
(
excellentCase
.
getRecordingUrl
()
==
null
||
excellentCase
.
getRecordingUrl
().
isEmpty
())
{
if
(
detail
.
getRecordingUrl
()
==
null
||
detail
.
getRecordingUrl
().
isEmpty
())
{
log
.
error
(
"优秀案例录音URL为空,案例ID:{}"
,
id
);
log
.
error
(
"优秀案例录音URL为空,案例ID:{}"
,
id
);
throw
new
RpcServiceException
(
"优秀案例录音URL为空"
);
throw
new
RpcServiceException
(
"优秀案例录音URL为空"
);
}
}
log
.
info
(
"下载优秀案例录音成功,案例ID:{},录音URL:{}"
,
id
,
excellentCase
.
getRecordingUrl
());
log
.
info
(
"下载优秀案例录音成功,案例ID:{},录音URL:{}"
,
id
,
detail
.
getRecordingUrl
());
return
excellentCase
.
getRecordingUrl
();
return
detail
.
getRecordingUrl
();
}
}
/**
/**
...
@@ -280,4 +287,21 @@ public class ExcellentCaseReviewService {
...
@@ -280,4 +287,21 @@ public class ExcellentCaseReviewService {
log
.
info
(
"查询客户类别列表成功,数据条数:{}"
,
categories
!=
null
?
categories
.
size
()
:
0
);
log
.
info
(
"查询客户类别列表成功,数据条数:{}"
,
categories
!=
null
?
categories
.
size
()
:
0
);
return
categories
;
return
categories
;
}
}
/**
* 查询所有客户类型
* <p>
* 从 inspection_defence 表中获取所有去重的客户类型
* </p>
*
* @return 客户类型列表
*/
public
List
<
String
>
queryAllCustomerTypes
()
{
log
.
info
(
"开始查询所有客户类型"
);
List
<
String
>
types
=
excellentCaseReviewMapper
.
queryAllCustomerTypes
();
log
.
info
(
"查询所有客户类型成功,数据条数:{}"
,
types
!=
null
?
types
.
size
()
:
0
);
return
types
;
}
}
}
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardService.java
View file @
3975f1b
...
@@ -1134,7 +1134,7 @@ public class SupervisorDashboardService {
...
@@ -1134,7 +1134,7 @@ public class SupervisorDashboardService {
// 一次请求所有指标,用逗号隔开
// 一次请求所有指标,用逗号隔开
java
.
util
.
Map
<
String
,
java
.
math
.
BigDecimal
>
employeeMetrics
=
new
java
.
util
.
HashMap
<>();
java
.
util
.
Map
<
String
,
java
.
math
.
BigDecimal
>
employeeMetrics
=
new
java
.
util
.
HashMap
<>();
java
.
util
.
Map
<
String
,
String
>
employeeRates
=
new
java
.
util
.
HashMap
<>();
// 环比数据
java
.
util
.
Map
<
String
,
String
>
employeeRates
=
new
java
.
util
.
HashMap
<>();
// 环比数据
String
employeeItemCodes
=
"A036,A076,A064,A085,A077,A095,A0100,A099,A0103,A091,A0101,A089,A0102,A090,A0104,A0105
"
;
// 指标编码:总产值、客单价、触客率、转化率、渗透率、平均客单价、整车延保-渗透率(员工)、整车延保-转化率、电池-渗透率(员工)、电池-转化率、安心包-渗透率(员工)、安心包-转化率、轮胎渗透率(员工)、轮胎转化率、售前转化率、售后转化率
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
();
cn
.
com
.
glsx
.
dj
.
supervisor
.
service
.
DataBizQueryParamsDTO
employeeQueryParams
=
new
cn
.
com
.
glsx
.
dj
.
supervisor
.
service
.
DataBizQueryParamsDTO
();
employeeQueryParams
.
setBizs
(
req
.
getBizs
());
// 业务类型:1.延保
employeeQueryParams
.
setBizs
(
req
.
getBizs
());
// 业务类型:1.延保
...
@@ -1188,7 +1188,39 @@ public class SupervisorDashboardService {
...
@@ -1188,7 +1188,39 @@ public class SupervisorDashboardService {
employeePerformanceData
.
setPreSaleConversionRate
(
employeeRates
.
get
(
"A0104"
));
employeePerformanceData
.
setPreSaleConversionRate
(
employeeRates
.
get
(
"A0104"
));
// 售后转化率(指标A0105)
// 售后转化率(指标A0105)
employeePerformanceData
.
setPostSaleConversionRate
(
employeeRates
.
get
(
"A0105"
));
employeePerformanceData
.
setPostSaleConversionRate
(
employeeRates
.
get
(
"A0105"
));
employeePerformanceData
.
setDailyPerformanceRate
(
"100%"
);
// 暂时硬编码,后续从其他系统获取
// 触客数(指标A084)
employeePerformanceData
.
setCustomerCount
(
employeeMetrics
.
get
(
"A084"
)
!=
null
?
employeeMetrics
.
get
(
"A084"
).
intValue
()
:
0
);
// 成交数(指标A075)
employeePerformanceData
.
setDealCount
(
employeeMetrics
.
get
(
"A075"
)
!=
null
?
employeeMetrics
.
get
(
"A075"
).
intValue
()
:
0
);
// 整车延保-成交数(指标A066)
employeePerformanceData
.
setVehicleWarrantyDealCount
(
employeeMetrics
.
get
(
"A066"
)
!=
null
?
employeeMetrics
.
get
(
"A066"
).
intValue
()
:
0
);
// 电池-成交数(指标A070)
employeePerformanceData
.
setBatteryDealCount
(
employeeMetrics
.
get
(
"A070"
)
!=
null
?
employeeMetrics
.
get
(
"A070"
).
intValue
()
:
0
);
// 安心包-成交数(指标A086)
employeePerformanceData
.
setSafetyPackDealCount
(
employeeMetrics
.
get
(
"A086"
)
!=
null
?
employeeMetrics
.
get
(
"A086"
).
intValue
()
:
0
);
// 轮胎成交数(指标A087)
employeePerformanceData
.
setTireDealCount
(
employeeMetrics
.
get
(
"A087"
)
!=
null
?
employeeMetrics
.
get
(
"A087"
).
intValue
()
:
0
);
// 售前触客数(指标A063)
employeePerformanceData
.
setPreSaleCustomerCount
(
employeeMetrics
.
get
(
"A063"
)
!=
null
?
employeeMetrics
.
get
(
"A063"
).
intValue
()
:
0
);
// 售后触客数(指标A096)
employeePerformanceData
.
setPostSaleCustomerCount
(
employeeMetrics
.
get
(
"A096"
)
!=
null
?
employeeMetrics
.
get
(
"A096"
).
intValue
()
:
0
);
// 售前成交数(指标A097)
employeePerformanceData
.
setPreSaleDealCount
(
employeeMetrics
.
get
(
"A097"
)
!=
null
?
employeeMetrics
.
get
(
"A097"
).
intValue
()
:
0
);
// 售后成交数(指标A098)
employeePerformanceData
.
setPostSaleDealCount
(
employeeMetrics
.
get
(
"A098"
)
!=
null
?
employeeMetrics
.
get
(
"A098"
).
intValue
()
:
0
);
// 日报填写率:从 getEmployeeBehaviorData 获取日报完成率
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeeBehaviorReq
behaviorReq
=
new
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeeBehaviorReq
();
behaviorReq
.
setEmployeeId
(
req
.
getEmployeeId
());
behaviorReq
.
setMerchantId
(
req
.
getMerchantId
());
behaviorReq
.
setBizs
(
req
.
getBizs
());
behaviorReq
.
setStartDate
(
req
.
getStartDate
());
behaviorReq
.
setEndDate
(
req
.
getEndDate
());
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeeBehaviorDTO
behaviorData
=
getEmployeeBehaviorData
(
behaviorReq
);
String
dailyPerformanceRate
=
"0%"
;
if
(
behaviorData
!=
null
&&
behaviorData
.
getDailyReport
()
!=
null
)
{
dailyPerformanceRate
=
behaviorData
.
getDailyReport
().
getCompletionRate
();
}
employeePerformanceData
.
setDailyPerformanceRate
(
dailyPerformanceRate
);
performanceData
.
setEmployeeData
(
employeePerformanceData
);
performanceData
.
setEmployeeData
(
employeePerformanceData
);
// 3. 获取产值趋势数据(返回聚合的时间数据)
// 3. 获取产值趋势数据(返回聚合的时间数据)
...
@@ -1209,7 +1241,7 @@ public class SupervisorDashboardService {
...
@@ -1209,7 +1241,7 @@ public class SupervisorDashboardService {
if
(
trendDataResp
!=
null
&&
trendDataResp
.
getContent
()
!=
null
&&
!
trendDataResp
.
getContent
().
isEmpty
())
{
if
(
trendDataResp
!=
null
&&
trendDataResp
.
getContent
()
!=
null
&&
!
trendDataResp
.
getContent
().
isEmpty
())
{
for
(
cn
.
com
.
glsx
.
dj
.
supervisor
.
model
.
DataBusinessDTO
trendItem
:
trendDataResp
.
getContent
())
{
for
(
cn
.
com
.
glsx
.
dj
.
supervisor
.
model
.
DataBusinessDTO
trendItem
:
trendDataResp
.
getContent
())
{
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeePerformanceDTO
.
TrendData
trend
=
new
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeePerformanceDTO
.
TrendData
();
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeePerformanceDTO
.
TrendData
trend
=
new
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeePerformanceDTO
.
TrendData
();
trend
.
setDate
(
trendItem
.
getDate
());
// 日期
trend
.
setDate
(
trendItem
.
get
Start
Date
());
// 日期
trend
.
setValue
(
trendItem
.
getItemValue
()
!=
null
?
trendItem
.
getItemValue
().
intValue
()
:
0
);
// 产值
trend
.
setValue
(
trendItem
.
getItemValue
()
!=
null
?
trendItem
.
getItemValue
().
intValue
()
:
0
);
// 产值
trendData
.
add
(
trend
);
trendData
.
add
(
trend
);
}
}
...
...
rpc-dj-supervisor/src/main/resources/META-INF/orm/ExcellentCaseReviewMapper.xml
View file @
3975f1b
This diff is collapsed.
Click to expand it.
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemoteImplTest.java
View file @
3975f1b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment