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 c2bd4f0a
authored
Mar 17, 2026
by
范富荣
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加删除预警基线配置接口,添加查询录音详情接口,优化日报模块查询接口
1 parent
8bfd42d3
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
335 additions
and
23 deletions
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/AudioReceptionDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/AudioSummaryDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/SupervisorTaskDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/WarningBaselineConfigDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorTaskInfoRemote.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorWarningBaselineConfigRemote.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/job/SupervisorAudioReviewTaskJob.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/SupervisorAudioReviewInfoMapper.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorTaskInfoRemoteImpl.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorWarningBaselineConfigRemoteImpl.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorAudioReviewInfoService.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorTaskInfoService.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorWarningBaselineConfigService.java
rpc-dj-supervisor/src/main/resources/META-INF/orm/SupervisorAudioReviewInfoMapper.xml
rpc-dj-supervisor/src/main/resources/META-INF/orm/SupervisorTaskInfoMapper.xml
rpc-dj-supervisor/src/main/resources/META-INF/orm/SupervisorWarningBaselineConfigMapper.xml
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorAudioReviewInfoServiceTest.java
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorTaskInfoServiceTest.java
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorWarningBaselineConfigServiceTest.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/AudioReceptionDTO.java
View file @
c2bd4f0
...
@@ -73,7 +73,7 @@ public class AudioReceptionDTO implements Serializable {
...
@@ -73,7 +73,7 @@ public class AudioReceptionDTO implements Serializable {
* 录音复盘内容
* 录音复盘内容
*/
*/
@ApiModelProperty
(
notes
=
"录音复盘内容"
)
@ApiModelProperty
(
notes
=
"录音复盘内容"
)
private
String
reviewConte
n
t
;
private
String
reviewConte
x
t
;
@ApiModelProperty
(
notes
=
"录音批次id"
)
@ApiModelProperty
(
notes
=
"录音批次id"
)
private
Integer
batchId
;
private
Integer
batchId
;
...
...
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/AudioSummaryDTO.java
View file @
c2bd4f0
...
@@ -28,4 +28,13 @@ public class AudioSummaryDTO implements Serializable {
...
@@ -28,4 +28,13 @@ public class AudioSummaryDTO implements Serializable {
*/
*/
@ApiModelProperty
(
notes
=
"总数"
)
@ApiModelProperty
(
notes
=
"总数"
)
private
Integer
totalCount
;
private
Integer
totalCount
;
@ApiModelProperty
(
notes
=
"任务状态 0-待完成 1-进行中,2-已完成"
)
private
Integer
taskStatus
;
/**
* 创建时间
*/
@ApiModelProperty
(
notes
=
"创建时间"
)
private
Date
createTime
;
}
}
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/SupervisorTaskDTO.java
View file @
c2bd4f0
...
@@ -102,6 +102,22 @@ public class SupervisorTaskDTO implements Serializable {
...
@@ -102,6 +102,22 @@ public class SupervisorTaskDTO implements Serializable {
@ApiModelProperty
(
notes
=
"更新人手机号"
)
@ApiModelProperty
(
notes
=
"更新人手机号"
)
private
String
updatedPhone
;
private
String
updatedPhone
;
@ApiModelProperty
(
value
=
"入职时间"
,
example
=
"2025-12-12"
)
private
String
entryDate
;
/**
* 性别
*/
@ApiModelProperty
(
value
=
"性别"
,
example
=
"女"
)
private
String
gender
;
/**
* 归属业务
*/
@ApiModelProperty
(
value
=
"归属业务"
,
example
=
"延保"
)
private
String
business
;
/**
/**
* 周任务人员列表
* 周任务人员列表
*/
*/
...
...
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/WarningBaselineConfigDTO.java
View file @
c2bd4f0
...
@@ -29,7 +29,8 @@ public class WarningBaselineConfigDTO implements Serializable {
...
@@ -29,7 +29,8 @@ public class WarningBaselineConfigDTO implements Serializable {
@NotEmpty
(
message
=
"预警基线配置列表不能为空"
)
@NotEmpty
(
message
=
"预警基线配置列表不能为空"
)
@ApiModelProperty
(
notes
=
"预警基线配置列表"
,
required
=
true
)
@ApiModelProperty
(
notes
=
"预警基线配置列表"
,
required
=
true
)
private
List
<
SupervisorWarningBaselineConfig
>
configList
;
private
List
<
SupervisorWarningBaselineConfig
>
configList
;
@ApiModelProperty
(
notes
=
"更新标识:(0.新增,1.更新)"
,
required
=
true
)
private
int
updateFlag
;
private
String
updatedBy
;
private
String
updatedBy
;
...
...
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorTaskInfoRemote.java
View file @
c2bd4f0
...
@@ -85,6 +85,17 @@ public interface SupervisorTaskInfoRemote {
...
@@ -85,6 +85,17 @@ public interface SupervisorTaskInfoRemote {
RpcResponse
<
Boolean
>
submitAudioReview
(
SupervisorAudioReviewInfo
request
);
RpcResponse
<
Boolean
>
submitAudioReview
(
SupervisorAudioReviewInfo
request
);
/**
/**
* 查询录音详情信息
*/
@ApiMethod
(
"查询录音详情信息"
)
@ApiParams
({
@ApiParam
(
name
=
"request"
,
notes
=
"查询参数"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)})
@ApiResponse
(
"录音详情信息"
)
RpcResponse
<
AudioReceptionDTO
>
getAudioReviewDetail
(
SupervisorTaskQueryDTO
request
);
/**
* 发起带教 - 提交
* 发起带教 - 提交
*/
*/
@interface
SubmitCoaching
{}
@interface
SubmitCoaching
{}
...
...
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorWarningBaselineConfigRemote.java
View file @
c2bd4f0
...
@@ -23,5 +23,13 @@ public interface SupervisorWarningBaselineConfigRemote {
...
@@ -23,5 +23,13 @@ public interface SupervisorWarningBaselineConfigRemote {
@ApiResponse
(
"预警基线配置列表"
)
@ApiResponse
(
"预警基线配置列表"
)
RpcResponse
<
List
<
WarningBaselineConfigDTO
>>
listAllWarningBaselineConfigs
();
RpcResponse
<
List
<
WarningBaselineConfigDTO
>>
listAllWarningBaselineConfigs
();
/**
* 删除预警基线配置
*/
@ApiMethod
(
"删除预警基线配置"
)
@ApiParams
({
@ApiParam
(
name
=
"request"
,
notes
=
"预警基线配置信息"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)})
@ApiResponse
(
"删除结果"
)
RpcResponse
<
Boolean
>
deleteWarningBaselineConfig
(
WarningBaselineConfigDTO
request
);
}
}
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/job/SupervisorAudioReviewTaskJob.java
View file @
c2bd4f0
...
@@ -70,12 +70,13 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
...
@@ -70,12 +70,13 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
log
.
info
(
"督导录音复盘任务生成开始执行"
);
log
.
info
(
"督导录音复盘任务生成开始执行"
);
// 1. 查询系统中所有督导员工列表
// 1. 查询系统中所有督导员工列表
List
<
MerchantStaffResponse
>
supervisorList
=
supervisorTaskInfoService
.
listAllSupervisors
();
List
<
MerchantStaffResponse
>
supervisorList
=
supervisorTaskInfoService
.
listAll
Effective
Supervisors
();
if
(
supervisorList
==
null
||
supervisorList
.
isEmpty
())
{
if
(
supervisorList
==
null
||
supervisorList
.
isEmpty
())
{
log
.
error
(
"查询督导员工列表为空"
);
log
.
error
(
"查询督导员工列表为空"
);
return
;
return
;
}
}
String
yesterday
=
DateUtils
.
getYesterdayDate
();
String
yesterday
=
DateUtils
.
getYesterdayDate
();
//String yesterday = "2024-05-10";
//计算员工排名阈值
//计算员工排名阈值
double
rankThreshold
=
environment
.
getProperty
(
"dj.supervisor.audio.review.task.rank.threshold"
,
Double
.
class
,
0.3
);
double
rankThreshold
=
environment
.
getProperty
(
"dj.supervisor.audio.review.task.rank.threshold"
,
Double
.
class
,
0.3
);
// 2. 遍历督导员工列表
// 2. 遍历督导员工列表
...
@@ -110,9 +111,12 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
...
@@ -110,9 +111,12 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
List
<
StaffBaseInfoDTO
>
staffList
=
staffResponse
.
getResult
();
List
<
StaffBaseInfoDTO
>
staffList
=
staffResponse
.
getResult
();
// 2.3 查询督导员工产值列表,根据手机号匹配员工产值
// 2.3 查询督导员工产值列表,根据手机号匹配员工产值
Map
<
String
,
BigDecimal
>
staffValueMap
=
getStaffValueMap
(
staffList
,
merchantIdList
,
yesterday
);
Map
<
String
,
BigDecimal
>
staffValueMap
=
getStaffValueMap
(
staffList
,
merchantIdList
,
yesterday
);
//将staffList 用手机号分组, 并转为list
Map
<
String
,
StaffBaseInfoDTO
>
staffMap
=
staffList
.
stream
().
collect
(
Collectors
.
toMap
(
StaffBaseInfoDTO:
:
getStaffPhone
,
v
->
v
,
(
v1
,
v2
)
->
v1
));
//将staffMap 转为list
List
<
StaffBaseInfoDTO
>
staffPhoneList
=
staffMap
.
values
().
stream
().
collect
(
Collectors
.
toList
());
// 3. 根据员工的产值,对员工进行排序(按产值降序排序,如果为空,排最后)
// 3. 根据员工的产值,对员工进行排序(按产值降序排序,如果为空,排最后)
List
<
StaffBaseInfoDTO
>
sortedStaffList
=
staffList
.
stream
()
List
<
StaffBaseInfoDTO
>
sortedStaffList
=
staff
Phone
List
.
stream
()
.
sorted
((
s1
,
s2
)
->
{
.
sorted
((
s1
,
s2
)
->
{
BigDecimal
v1
=
staffValueMap
.
getOrDefault
(
s1
.
getStaffPhone
(),
BigDecimal
.
ZERO
);
BigDecimal
v1
=
staffValueMap
.
getOrDefault
(
s1
.
getStaffPhone
(),
BigDecimal
.
ZERO
);
BigDecimal
v2
=
staffValueMap
.
getOrDefault
(
s2
.
getStaffPhone
(),
BigDecimal
.
ZERO
);
BigDecimal
v2
=
staffValueMap
.
getOrDefault
(
s2
.
getStaffPhone
(),
BigDecimal
.
ZERO
);
...
@@ -129,7 +133,6 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
...
@@ -129,7 +133,6 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
// 3.2 获取绩差员工列表
// 3.2 获取绩差员工列表
List
<
StaffBaseInfoDTO
>
poorPerfStaffList
=
sortedStaffList
.
subList
(
List
<
StaffBaseInfoDTO
>
poorPerfStaffList
=
sortedStaffList
.
subList
(
Math
.
max
(
0
,
totalStaff
-
poorPerfCount
),
totalStaff
);
Math
.
max
(
0
,
totalStaff
-
poorPerfCount
),
totalStaff
);
poorPerfStaffList
.
stream
().
map
(
StaffBaseInfoDTO:
:
getStaffPhone
).
collect
(
Collectors
.
toList
());
// 4. 根据绩差员工列表,查询员工昨日接待录音列表(接待状态为战败)
// 4. 根据绩差员工列表,查询员工昨日接待录音列表(接待状态为战败)
List
<
AudioReceptionDTO
>
audioList
=
getStaffAudioList
(
merchantIdList
,
poorPerfStaffList
.
stream
().
map
(
StaffBaseInfoDTO:
:
getStaffPhone
).
collect
(
Collectors
.
toList
()),
yesterday
);
List
<
AudioReceptionDTO
>
audioList
=
getStaffAudioList
(
merchantIdList
,
poorPerfStaffList
.
stream
().
map
(
StaffBaseInfoDTO:
:
getStaffPhone
).
collect
(
Collectors
.
toList
()),
yesterday
);
if
(
CollectionUtils
.
isEmpty
(
audioList
))
{
if
(
CollectionUtils
.
isEmpty
(
audioList
))
{
...
@@ -168,6 +171,7 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
...
@@ -168,6 +171,7 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
req
.
setCycleType
(
1
);
// 3.按日
req
.
setCycleType
(
1
);
// 3.按日
// 设置时间范围,查询昨日数据
// 设置时间范围,查询昨日数据
req
.
setStartTime
(
date
);
req
.
setStartTime
(
date
);
req
.
setEndTime
(
date
);
// 设置门店列表
// 设置门店列表
req
.
setMerchantIds
(
merchantIdList
);
req
.
setMerchantIds
(
merchantIdList
);
//设置员工信息
//设置员工信息
...
@@ -213,7 +217,7 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
...
@@ -213,7 +217,7 @@ public class SupervisorAudioReviewTaskJob implements SimpleJob {
/**
/**
* 生成录音复盘任务记录
* 生成录音复盘任务记录
*/
*/
private
void
generateAudioReviewTask
(
cn
.
com
.
glsx
.
merchants
.
model
.
response
.
MerchantStaffResponse
supervisor
,
private
void
generateAudioReviewTask
(
MerchantStaffResponse
supervisor
,
List
<
AudioReceptionDTO
>
audioList
)
{
List
<
AudioReceptionDTO
>
audioList
)
{
Date
date
=
new
Date
();
Date
date
=
new
Date
();
// 1. 生成supervisor_task_info记录
// 1. 生成supervisor_task_info记录
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/SupervisorAudioReviewInfoMapper.java
View file @
c2bd4f0
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
@Mapper
@Mapper
public
interface
SupervisorAudioReviewInfoMapper
extends
OreMapper
<
SupervisorAudioReviewInfo
>
{
public
interface
SupervisorAudioReviewInfoMapper
extends
OreMapper
<
SupervisorAudioReviewInfo
>
{
List
<
AudioReceptionDTO
>
listAudionByReceptionId
(
@Param
(
"relationId"
)
Long
receptionId
);
List
<
AudioReceptionDTO
>
listAudionByReceptionId
(
SupervisorTaskQueryDTO
query
);
List
<
AudioReceptionDTO
>
listAudionByEmployeeInfo
(
SupervisorTaskQueryDTO
query
);
List
<
AudioReceptionDTO
>
listAudionByEmployeeInfo
(
SupervisorTaskQueryDTO
query
);
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorTaskInfoRemoteImpl.java
View file @
c2bd4f0
...
@@ -154,6 +154,22 @@ public class SupervisorTaskInfoRemoteImpl implements SupervisorTaskInfoRemote {
...
@@ -154,6 +154,22 @@ public class SupervisorTaskInfoRemoteImpl implements SupervisorTaskInfoRemote {
}
}
@Override
@Override
public
RpcResponse
<
AudioReceptionDTO
>
getAudioReviewDetail
(
SupervisorTaskQueryDTO
request
)
{
try
{
AudioReceptionDTO
result
=
supervisorAudioReviewInfoService
.
getAudioReviewDetail
(
request
);
return
RpcResponse
.
success
(
result
);
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemoteImpl.getAudioReviewDetail error {}"
,
e
);
return
RpcResponse
.
error
(
e
.
getError
(),
e
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemoteImpl.getAudioReviewDetail system error {}"
,
e
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
}
}
@Override
public
RpcResponse
<
Long
>
submitCoaching
(
SupervisorTaskDTO
request
)
{
public
RpcResponse
<
Long
>
submitCoaching
(
SupervisorTaskDTO
request
)
{
try
{
try
{
log
.
info
(
"发起带教 - 提交,请求参数:{}"
,
request
);
log
.
info
(
"发起带教 - 提交,请求参数:{}"
,
request
);
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorWarningBaselineConfigRemoteImpl.java
View file @
c2bd4f0
...
@@ -45,4 +45,18 @@ public class SupervisorWarningBaselineConfigRemoteImpl implements SupervisorWarn
...
@@ -45,4 +45,18 @@ public class SupervisorWarningBaselineConfigRemoteImpl implements SupervisorWarn
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
}
}
}
}
@Override
public
RpcResponse
<
Boolean
>
deleteWarningBaselineConfig
(
WarningBaselineConfigDTO
request
)
{
try
{
Boolean
result
=
supervisorWarningBaselineConfigService
.
deleteWarningBaselineConfig
(
request
);
return
RpcResponse
.
success
(
result
);
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.SupervisorWarningBaselineConfigRemoteImpl.deleteWarningBaselineConfig error {}"
,
e
);
return
RpcResponse
.
error
(
e
.
getError
(),
e
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.SupervisorWarningBaselineConfigRemoteImpl.deleteWarningBaselineConfig system error {}"
,
e
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
}
}
}
}
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorAudioReviewInfoService.java
View file @
c2bd4f0
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.supervisor.service;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.supervisor.service;
import
cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO
;
import
cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO
;
import
cn.com.glsx.dj.supervisor.dto.AudioSummaryDTO
;
import
cn.com.glsx.dj.supervisor.dto.AudioSummaryDTO
;
import
cn.com.glsx.dj.supervisor.dto.SupervisorTaskDTO
;
import
cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO
;
import
cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO
;
import
cn.com.glsx.dj.supervisor.enums.ReviewStatusEnum
;
import
cn.com.glsx.dj.supervisor.enums.ReviewStatusEnum
;
import
cn.com.glsx.dj.supervisor.enums.TaskStatusEnum
;
import
cn.com.glsx.dj.supervisor.enums.TaskStatusEnum
;
...
@@ -15,6 +16,7 @@ import com.github.pagehelper.Page;
...
@@ -15,6 +16,7 @@ import com.github.pagehelper.Page;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -57,7 +59,7 @@ public class SupervisorAudioReviewInfoService {
...
@@ -57,7 +59,7 @@ public class SupervisorAudioReviewInfoService {
public
Page
<
AudioReceptionDTO
>
pageAudioReception
(
RpcPagination
<
SupervisorTaskQueryDTO
>
request
)
{
public
Page
<
AudioReceptionDTO
>
pageAudioReception
(
RpcPagination
<
SupervisorTaskQueryDTO
>
request
)
{
//分页查询
//分页查询
Page
<
AudioReceptionDTO
>
page
=
PageHelper
.
startPage
(
request
.
getPageNum
(),
request
.
getPageSize
());
Page
<
AudioReceptionDTO
>
page
=
PageHelper
.
startPage
(
request
.
getPageNum
(),
request
.
getPageSize
());
List
<
AudioReceptionDTO
>
list
=
supervisorAudioReviewInfoMapper
.
listAudionByReceptionId
(
request
.
getCondition
()
.
getId
()
);
List
<
AudioReceptionDTO
>
list
=
supervisorAudioReviewInfoMapper
.
listAudionByReceptionId
(
request
.
getCondition
());
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
list
.
forEach
(
item
->
{
list
.
forEach
(
item
->
{
//处理录音时长
//处理录音时长
...
@@ -69,6 +71,20 @@ public class SupervisorAudioReviewInfoService {
...
@@ -69,6 +71,20 @@ public class SupervisorAudioReviewInfoService {
return
page
;
return
page
;
}
}
/**
* 查询录音复盘记录详情
* @param query
* @return
*/
public
AudioReceptionDTO
getAudioReviewDetail
(
SupervisorTaskQueryDTO
query
)
{
List
<
AudioReceptionDTO
>
audioReceptionDTOS
=
supervisorAudioReviewInfoMapper
.
listAudionByReceptionId
(
query
);
if
(
CollectionUtils
.
isNotEmpty
(
audioReceptionDTOS
))
{
return
audioReceptionDTOS
.
get
(
0
);
}
return
null
;
}
public
List
<
AudioReceptionDTO
>
listAudionByEmployeeInfo
(
SupervisorTaskQueryDTO
query
)
{
public
List
<
AudioReceptionDTO
>
listAudionByEmployeeInfo
(
SupervisorTaskQueryDTO
query
)
{
return
supervisorAudioReviewInfoMapper
.
listAudionByEmployeeInfo
(
query
);
return
supervisorAudioReviewInfoMapper
.
listAudionByEmployeeInfo
(
query
);
}
}
...
@@ -89,6 +105,12 @@ public class SupervisorAudioReviewInfoService {
...
@@ -89,6 +105,12 @@ public class SupervisorAudioReviewInfoService {
dto
.
setUnreviewedCount
((
int
)
unreviewedCount
);
dto
.
setUnreviewedCount
((
int
)
unreviewedCount
);
dto
.
setTotalCount
(
list
.
size
());
dto
.
setTotalCount
(
list
.
size
());
}
}
//查询 录音任务详情
SupervisorTaskDTO
task
=
supervisorTaskInfoService
.
getTaskDetailById
(
request
.
getId
());
if
(
task
!=
null
)
{
dto
.
setTaskStatus
(
task
.
getTaskStatus
());
dto
.
setCreateTime
(
task
.
getCreateTime
());
}
return
dto
;
return
dto
;
}
}
...
@@ -107,7 +129,7 @@ public class SupervisorAudioReviewInfoService {
...
@@ -107,7 +129,7 @@ public class SupervisorAudioReviewInfoService {
throw
new
RpcServiceException
(
DefaultErrorEnum
.
DATA_NOT_EXIST
,
"录音复盘记录不存在"
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
DATA_NOT_EXIST
,
"录音复盘记录不存在"
);
}
}
//判断是否已复盘
//判断是否已复盘
if
(
ReviewStatusEnum
.
COMPLETED
.
getCode
().
equals
(
info
.
getReviewStatus
()))
{
if
(
ReviewStatusEnum
.
COMPLETED
.
getCode
().
equals
(
info
.
getReviewStatus
())
&&
StringUtils
.
isBlank
(
request
.
getReviewTarget
())
)
{
log
.
error
(
"提交录音复盘记录,录音复盘记录已复盘,id={}"
,
request
.
getId
());
log
.
error
(
"提交录音复盘记录,录音复盘记录已复盘,id={}"
,
request
.
getId
());
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
,
"录音复盘记录已复盘,不能重复提交"
);
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
,
"录音复盘记录已复盘,不能重复提交"
);
}
}
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorTaskInfoService.java
View file @
c2bd4f0
...
@@ -9,6 +9,7 @@ import cn.com.glsx.dj.supervisor.dto.*;
...
@@ -9,6 +9,7 @@ import cn.com.glsx.dj.supervisor.dto.*;
import
cn.com.glsx.dj.supervisor.enums.ReviewStatusEnum
;
import
cn.com.glsx.dj.supervisor.enums.ReviewStatusEnum
;
import
cn.com.glsx.dj.supervisor.enums.TaskStatusEnum
;
import
cn.com.glsx.dj.supervisor.enums.TaskStatusEnum
;
import
cn.com.glsx.dj.supervisor.enums.TaskTypeEnum
;
import
cn.com.glsx.dj.supervisor.enums.TaskTypeEnum
;
import
cn.com.glsx.dj.supervisor.mapper.BusinessSceneMapper
;
import
cn.com.glsx.dj.supervisor.mapper.SupervisorTaskCourseMapper
;
import
cn.com.glsx.dj.supervisor.mapper.SupervisorTaskCourseMapper
;
import
cn.com.glsx.dj.supervisor.mapper.SupervisorTaskImageMapper
;
import
cn.com.glsx.dj.supervisor.mapper.SupervisorTaskImageMapper
;
import
cn.com.glsx.dj.supervisor.mapper.SupervisorTaskInfoMapper
;
import
cn.com.glsx.dj.supervisor.mapper.SupervisorTaskInfoMapper
;
...
@@ -18,16 +19,20 @@ import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
...
@@ -18,16 +19,20 @@ import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.util.DateUtils
;
import
cn.com.glsx.framework.core.util.RpcAssert
;
import
cn.com.glsx.framework.core.util.RpcAssert
;
import
cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO
;
import
cn.com.glsx.merchants.dto.beisen.BeiSenEmployeeListResonseDTO
;
import
cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO
;
import
cn.com.glsx.merchants.model.request.MerchantStaffRequest
;
import
cn.com.glsx.merchants.model.request.MerchantStaffRequest
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantUserRemote
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -79,6 +84,12 @@ public class SupervisorTaskInfoService {
...
@@ -79,6 +84,12 @@ public class SupervisorTaskInfoService {
@Autowired
@Autowired
private
SupervisorLearningCenterService
supervisorLearningCenterService
;
private
SupervisorLearningCenterService
supervisorLearningCenterService
;
@DubboReference
(
version
=
"2.0.0"
,
check
=
false
,
timeout
=
5000
)
private
MerchantUserRemote
merchantUserRemote
;
@Autowired
private
BusinessSceneMapper
businessSceneMapper
;
/**
/**
* 生成日报信息
* 生成日报信息
* @param startTimeStr 日报的开始时间,yyyy-MM-dd
* @param startTimeStr 日报的开始时间,yyyy-MM-dd
...
@@ -190,6 +201,33 @@ public class SupervisorTaskInfoService {
...
@@ -190,6 +201,33 @@ public class SupervisorTaskInfoService {
return
onlineCount
;
return
onlineCount
;
}
}
public
List
<
MerchantStaffResponse
>
listAllEffectiveSupervisors
()
{
//查询督导人员列表
List
<
MerchantStaffResponse
>
merchantStaffResponses
=
listAllSupervisors
();
if
(
CollectionUtils
.
isNotEmpty
(
merchantStaffResponses
))
{
// 2. 批量查询北森信息,统计在职人数
List
<
String
>
phoneList
=
merchantStaffResponses
.
stream
()
.
map
(
MerchantStaffResponse:
:
getStaffPhone
)
.
filter
(
phone
->
phone
!=
null
&&
!
phone
.
isEmpty
())
.
distinct
()
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
phoneList
))
{
return
Collections
.
emptyList
();
}
List
<
BeiSenEmployeeListResonseDTO
>
beisenList
=
supervisorLearningCenterService
.
listEmployeeInfoByStaffPhone
(
phoneList
);
if
(
CollectionUtils
.
isEmpty
(
beisenList
))
{
return
Collections
.
emptyList
();
}
// 3. 过滤出在职督导
List
<
String
>
beisenPhoneList
=
beisenList
.
stream
()
.
filter
(
emp
->
Integer
.
valueOf
(
1
).
equals
(
emp
.
getZzStatus
()))
.
map
(
BeiSenEmployeeListResonseDTO:
:
getMobilePhone
).
collect
(
Collectors
.
toList
());
merchantStaffResponses
=
merchantStaffResponses
.
stream
().
filter
(
staff
->
beisenPhoneList
.
contains
(
staff
.
getStaffPhone
()))
.
collect
(
Collectors
.
toList
());
}
return
merchantStaffResponses
;
}
/**
/**
* 查询所有飞行督导人员
* 查询所有飞行督导人员
* @return
* @return
...
@@ -298,6 +336,25 @@ public class SupervisorTaskInfoService {
...
@@ -298,6 +336,25 @@ public class SupervisorTaskInfoService {
if
(
TaskTypeEnum
.
TRAINING
.
getCode
().
equals
(
taskInfo
.
getTaskType
()))
{
if
(
TaskTypeEnum
.
TRAINING
.
getCode
().
equals
(
taskInfo
.
getTaskType
()))
{
List
<
SupervisorTaskCourse
>
taskCourseList
=
supervisorTaskCourseService
.
selectByTaskId
(
id
);
List
<
SupervisorTaskCourse
>
taskCourseList
=
supervisorTaskCourseService
.
selectByTaskId
(
id
);
taskInfo
.
setTaskCourseList
(
taskCourseList
);
taskInfo
.
setTaskCourseList
(
taskCourseList
);
//根据员工手机号,查询北森员工信息
String
phoneNumber
=
taskInfo
.
getStoreManagerPhone
();
log
.
info
(
"调用北森接口获取人员基本信息,手机号:{}"
,
phoneNumber
);
List
<
String
>
phoneNumbers
=
new
ArrayList
<>();
phoneNumbers
.
add
(
phoneNumber
);
RpcResponse
<
List
<
BeisenEmployeeInfoDTO
>>
beisenResponse
=
merchantUserRemote
.
selectByPhones
(
phoneNumbers
);
if
(
beisenResponse
.
isSuccess
()
&&
beisenResponse
.
getResult
()
!=
null
&&
!
beisenResponse
.
getResult
().
isEmpty
())
{
BeisenEmployeeInfoDTO
beisenInfo
=
beisenResponse
.
getResult
().
get
(
0
);
if
(
beisenInfo
.
getEntryDate
()
!=
null
)
{
taskInfo
.
setEntryDate
(
DateUtils
.
formatDate
(
beisenInfo
.
getEntryDate
()));
// 北森-人员-入职日期
}
// 性别:0男、1女
if
(
beisenInfo
.
getGender
()
!=
null
)
{
taskInfo
.
setGender
(
beisenInfo
.
getGender
()
==
0
?
"男"
:
"女"
);
}
}
String
businessScene
=
businessSceneMapper
.
getBusinessSceneByPhoneNumber
(
phoneNumber
);
taskInfo
.
setBusiness
(
businessScene
);
// 业务场景标签
}
}
return
taskInfo
;
return
taskInfo
;
}
}
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorWarningBaselineConfigService.java
View file @
c2bd4f0
...
@@ -4,6 +4,8 @@ import cn.com.glsx.dj.supervisor.dto.WarningBaselineConfigDTO;
...
@@ -4,6 +4,8 @@ import cn.com.glsx.dj.supervisor.dto.WarningBaselineConfigDTO;
import
cn.com.glsx.dj.supervisor.mapper.SupervisorWarningBaselineConfigMapper
;
import
cn.com.glsx.dj.supervisor.mapper.SupervisorWarningBaselineConfigMapper
;
import
cn.com.glsx.dj.supervisor.model.SupervisorWarningBaselineConfig
;
import
cn.com.glsx.dj.supervisor.model.SupervisorWarningBaselineConfig
;
import
cn.com.glsx.framework.core.beans.BaseModel
;
import
cn.com.glsx.framework.core.beans.BaseModel
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -36,7 +38,11 @@ public class SupervisorWarningBaselineConfigService {
...
@@ -36,7 +38,11 @@ public class SupervisorWarningBaselineConfigService {
//根据 指标+ 时间维度查询数据库是否已经配置过相同记录
//根据 指标+ 时间维度查询数据库是否已经配置过相同记录
List
<
SupervisorWarningBaselineConfig
>
configList
=
queryWarningBaselineConfig
(
config
.
getIndicatorCode
(),
config
.
getTimeDimension
());
List
<
SupervisorWarningBaselineConfig
>
configList
=
queryWarningBaselineConfig
(
config
.
getIndicatorCode
(),
config
.
getTimeDimension
());
Date
now
=
new
Date
();
Date
now
=
new
Date
();
if
(
CollectionUtils
.
isEmpty
(
configList
))
{
//判断是否为新增操作
if
(
config
.
getUpdateFlag
()
==
0
)
{
if
(
CollectionUtils
.
isNotEmpty
(
configList
))
{
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
,
"已存在相同预警基线设置!"
);
}
// 新增
// 新增
config
.
getConfigList
().
stream
().
forEach
(
item
->
{
config
.
getConfigList
().
stream
().
forEach
(
item
->
{
item
.
setIndicatorCode
(
config
.
getIndicatorCode
());
item
.
setIndicatorCode
(
config
.
getIndicatorCode
());
...
@@ -50,8 +56,28 @@ public class SupervisorWarningBaselineConfigService {
...
@@ -50,8 +56,28 @@ public class SupervisorWarningBaselineConfigService {
});
});
supervisorWarningBaselineConfigMapper
.
insertList
(
config
.
getConfigList
());
supervisorWarningBaselineConfigMapper
.
insertList
(
config
.
getConfigList
());
}
else
{
}
else
{
// 过滤出需要更新的记录
List
<
Long
>
updateList
=
config
.
getConfigList
().
stream
()
.
filter
(
item
->
item
.
getId
()
!=
null
).
map
(
SupervisorWarningBaselineConfig:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
updateList
))
{
//没传id, 抛异常
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
,
"更新预警基线配置时,必须传递id!"
);
}
if
(
CollectionUtils
.
isNotEmpty
(
configList
))
{
//检查 更新的id是否存在,如果不存在,说明已经存在其他指标配置,不能更新
List
<
Long
>
existList
=
configList
.
stream
()
.
filter
(
item
->
updateList
.
contains
(
item
.
getId
()))
.
map
(
SupervisorWarningBaselineConfig:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
existList
))
{
throw
new
RpcServiceException
(
DefaultErrorEnum
.
SERVER_ERROR
,
"已存在相同预警基线设置!"
);
}
}
// 更新
// 更新
config
.
getConfigList
().
stream
().
forEach
(
item
->
{
config
.
getConfigList
().
stream
().
forEach
(
item
->
{
item
.
setIndicatorCode
(
config
.
getIndicatorCode
());
item
.
setIndicatorName
(
config
.
getIndicatorName
());
item
.
setTimeDimension
(
config
.
getTimeDimension
());
item
.
setUpdatedBy
(
config
.
getUpdatedBy
());
item
.
setUpdatedBy
(
config
.
getUpdatedBy
());
item
.
setUpdatedDate
(
now
);
item
.
setUpdatedDate
(
now
);
});
});
...
@@ -111,6 +137,34 @@ public class SupervisorWarningBaselineConfigService {
...
@@ -111,6 +137,34 @@ public class SupervisorWarningBaselineConfigService {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
/**
* 删除预警基线配置
* @param config 预警基线配置DTO
* @return 是否成功
*/
@GlsxDistributeLockable
(
name
=
"warningBaselineConfig_deleteWarningBaselineConfig"
,
timeoutException
=
Exception
.
class
)
public
Boolean
deleteWarningBaselineConfig
(
WarningBaselineConfigDTO
config
)
{
//根据 指标+ 时间维度查询数据库是否已经配置过相同记录
List
<
SupervisorWarningBaselineConfig
>
configList
=
queryWarningBaselineConfig
(
config
.
getIndicatorCode
(),
config
.
getTimeDimension
());
if
(
CollectionUtils
.
isEmpty
(
configList
))
{
return
false
;
}
// 逻辑删除
SupervisorWarningBaselineConfig
update
=
new
SupervisorWarningBaselineConfig
();
update
.
setDeletedFlag
(
BaseModel
.
DeletedFlagEnum
.
D
.
name
());
update
.
setUpdatedBy
(
config
.
getUpdatedBy
());
update
.
setUpdatedDate
(
new
Date
());
//批量更新
Example
example
=
new
Example
(
SupervisorWarningBaselineConfig
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
//根据 指标编码+时间维度更新
criteria
.
andEqualTo
(
"indicatorCode"
,
config
.
getIndicatorCode
());
criteria
.
andEqualTo
(
"timeDimension"
,
config
.
getTimeDimension
());
criteria
.
andEqualTo
(
"deletedFlag"
,
BaseModel
.
DeletedFlagEnum
.
N
.
name
());
supervisorWarningBaselineConfigMapper
.
updateByExampleSelective
(
update
,
example
);
return
true
;
}
...
...
rpc-dj-supervisor/src/main/resources/META-INF/orm/SupervisorAudioReviewInfoMapper.xml
View file @
c2bd4f0
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
create_time, updated_by, updated_date, deleted_flag
create_time, updated_by, updated_date, deleted_flag
</sql>
</sql>
<select
id=
"listAudionByReceptionId"
resultType=
"cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO"
>
<select
id=
"listAudionByReceptionId"
parameterType=
"cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO"
resultType=
"cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO"
>
select sari.id, sari.reception
Id as batchId, sari.
reviewStatus, sari.review_target reviewTarget, sari.review_context reviewContext,
select sari.id, sari.reception
_id as batchId, sari.review_status
reviewStatus, sari.review_target reviewTarget, sari.review_context reviewContext,
t2.audio_time as staticDate,t1.employee_name employeeName,re.customer_name customerName,re.phone_number as phoneNumber,
t2.audio_time as staticDate,t1.employee_name employeeName,re.customer_name customerName,re.phone_number as phoneNumber,
re.merchant_id merchantNo,re.car_model carModel, re.car_brand as carBrand,
re.merchant_id merchantNo,re.car_model carModel, re.car_brand as carBrand,
ind.customer_type as customerType,ind.avg_defence as avgDefence,
ind.customer_type as customerType,ind.avg_defence as avgDefence,
...
@@ -41,14 +41,19 @@
...
@@ -41,14 +41,19 @@
left join dj_car_life_service_merchant sm on re.merchant_id = sm.merchant_id and sm.deleted_flag= 'N'
left join dj_car_life_service_merchant sm on re.merchant_id = sm.merchant_id and sm.deleted_flag= 'N'
<where>
<where>
sari.deleted_flag = 'N' and cb.deleted_flag = 'N'
sari.deleted_flag = 'N' and cb.deleted_flag = 'N'
and sari.relation_id = #{relationId}
<if
test=
"id != null"
>
and sari.relation_id = #{id}
</if>
<if
test=
"audioId != null"
>
and sari.id = #{audioId}
</if>
</where>
</where>
order by cb.start_time desc
order by cb.start_time desc
</select>
</select>
<select
id=
"listAudionByEmployeeInfo"
parameterType=
"cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO"
resultType=
"cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO"
>
<select
id=
"listAudionByEmployeeInfo"
parameterType=
"cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO"
resultType=
"cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO"
>
select cb.id as batchId , t1.phone_number as staffPhone
select cb.id as batchId , t1.phone_number as staffPhone
from
join
inspection_conversation_batch cb
from inspection_conversation_batch cb
left join reception_customer_info re on cb.task_id = re.id
left join reception_customer_info re on cb.task_id = re.id
left join inspection_conversation_date t2 on cb.conversation_id = t2.id
left join inspection_conversation_date t2 on cb.conversation_id = t2.id
left join inspection_employee_badge t1 on t1.badge_id = t2.badge_id
left join inspection_employee_badge t1 on t1.badge_id = t2.badge_id
...
...
rpc-dj-supervisor/src/main/resources/META-INF/orm/SupervisorTaskInfoMapper.xml
View file @
c2bd4f0
...
@@ -46,6 +46,8 @@
...
@@ -46,6 +46,8 @@
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_by"
property=
"updatedBy"
/>
<result
column=
"updated_by"
property=
"updatedBy"
/>
<result
column=
"updated_phone"
property=
"updatedPhone"
/>
<result
column=
"updated_phone"
property=
"updatedPhone"
/>
<result
column=
"store_manager_phone"
property=
"storeManagerPhone"
jdbcType=
"VARCHAR"
/>
<result
column=
"store_manager_name"
property=
"storeManagerName"
jdbcType=
"VARCHAR"
/>
<collection
property=
"taskImageList"
ofType=
"cn.com.glsx.dj.supervisor.model.SupervisorTaskImage"
>
<collection
property=
"taskImageList"
ofType=
"cn.com.glsx.dj.supervisor.model.SupervisorTaskImage"
>
<result
column=
"image_url"
property=
"imageUrl"
/>
<result
column=
"image_url"
property=
"imageUrl"
/>
</collection>
</collection>
...
@@ -68,7 +70,7 @@
...
@@ -68,7 +70,7 @@
<select
id=
"getTaskDetailById"
resultMap=
"TaskDetailMap"
>
<select
id=
"getTaskDetailById"
resultMap=
"TaskDetailMap"
>
select sti.id, sti.task_type, sti.task_status, sti.on_duty_flag, sti.merchant_id, sti.merchant_name, sti.task_desc,sti.task_context,sti.create_time,sti.updated_date,
select sti.id, sti.task_type, sti.task_status, sti.on_duty_flag, sti.merchant_id, sti.merchant_name, sti.task_desc,sti.task_context,sti.create_time,sti.updated_date,
stim.image_url
stim.image_url
,sti.store_manager_name,sti.store_manager_phone
from supervisor_task_info sti
from supervisor_task_info sti
left join supervisor_task_image stim on stim.relation_id = sti.id and stim.deleted_flag = 'N'
left join supervisor_task_image stim on stim.relation_id = sti.id and stim.deleted_flag = 'N'
<where>
<where>
...
@@ -92,10 +94,10 @@
...
@@ -92,10 +94,10 @@
</foreach>
</foreach>
</if>
</if>
<if
test=
"startDate != null and startDate != ''"
>
<if
test=
"startDate != null and startDate != ''"
>
and
sti.start_date
>
= #{startDate
}
and
CAST(sti.create_time AS DATE)
>
= #{startDate, jdbcType=DATE
}
</if>
</if>
<if
test=
"endDate != null and endDate != ''"
>
<if
test=
"endDate != null and endDate != ''"
>
and
sti.end_date
<
= #{endDate
}
and
CAST(sti.create_time AS DATE)
<
= #{endDate, jdbcType=DATE
}
</if>
</if>
<if
test=
"taskStatus != null"
>
<if
test=
"taskStatus != null"
>
and sti.task_status = #{taskStatus}
and sti.task_status = #{taskStatus}
...
...
rpc-dj-supervisor/src/main/resources/META-INF/orm/SupervisorWarningBaselineConfigMapper.xml
View file @
c2bd4f0
...
@@ -29,6 +29,21 @@
...
@@ -29,6 +29,21 @@
<update
id=
"batchUpdate"
>
<update
id=
"batchUpdate"
>
UPDATE supervisor_warning_baseline_config
UPDATE supervisor_warning_baseline_config
SET
SET
indicator_code = CASE
<foreach
collection=
"list"
item=
"item"
separator=
""
>
WHEN id = #{item.id} THEN #{item.indicatorCode}
</foreach>
END,
indicator_name = CASE
<foreach
collection=
"list"
item=
"item"
separator=
""
>
WHEN id = #{item.id} THEN #{item.indicatorName}
</foreach>
END,
time_dimension = CASE
<foreach
collection=
"list"
item=
"item"
separator=
""
>
WHEN id = #{item.id} THEN #{item.timeDimension}
</foreach>
END,
min_value = CASE
min_value = CASE
<foreach
collection=
"list"
item=
"item"
separator=
""
>
<foreach
collection=
"list"
item=
"item"
separator=
""
>
WHEN id = #{item.id} THEN #{item.minValue}
WHEN id = #{item.id} THEN #{item.minValue}
...
...
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorAudioReviewInfoServiceTest.java
0 → 100644
View file @
c2bd4f0
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
service
;
import
cn.com.glsx.dj.supervisor.dto.AudioReceptionDTO
;
import
cn.com.glsx.dj.supervisor.dto.AudioSummaryDTO
;
import
cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO
;
import
cn.com.glsx.dj.supervisor.model.SupervisorAudioReviewInfo
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
com.github.pagehelper.Page
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
public
class
SupervisorAudioReviewInfoServiceTest
extends
BaseServiceTest
{
@Autowired
private
SupervisorAudioReviewInfoService
supervisorAudioReviewInfoService
;
/**
* 测试提交录音复盘记录
*/
@Test
public
void
testSubmitAudioReview
()
{
SupervisorAudioReviewInfo
request
=
new
SupervisorAudioReviewInfo
();
request
.
setId
(
1L
);
request
.
setReviewContext
(
"测试录音"
);
request
.
setReviewTarget
(
"标签仔"
);
request
.
setUpdatedBy
(
"fanfr"
);
Boolean
result
=
supervisorAudioReviewInfoService
.
submitAudioReview
(
request
);
assertTrue
(
result
);
}
/**
* 测试 分页查询录音复盘记录
*/
@Test
public
void
testQueryAudioReviewInfoPage
()
{
RpcPagination
<
SupervisorTaskQueryDTO
>
request
=
new
RpcPagination
<>();
request
.
setPageNum
(
1
);
request
.
setPageSize
(
10
);
SupervisorTaskQueryDTO
condition
=
new
SupervisorTaskQueryDTO
();
request
.
setCondition
(
condition
);
condition
.
setId
(
16L
);
Page
<
AudioReceptionDTO
>
result
=
supervisorAudioReviewInfoService
.
pageAudioReception
(
request
);
assertTrue
(
CollectionUtils
.
isNotEmpty
(
result
));
}
/**
* 测试 查询录音复盘汇总信息(getAudioSummary)
*/
@Test
public
void
testQueryAudioReviewSummary
()
{
Long
id
=
16L
;
SupervisorTaskQueryDTO
request
=
new
SupervisorTaskQueryDTO
();
request
.
setId
(
id
);
AudioSummaryDTO
result
=
supervisorAudioReviewInfoService
.
getAudioSummary
(
request
);
assertTrue
(
result
!=
null
);
}
}
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorTaskInfoServiceTest.java
View file @
c2bd4f0
...
@@ -166,6 +166,8 @@ public class SupervisorTaskInfoServiceTest extends BaseServiceTest {
...
@@ -166,6 +166,8 @@ public class SupervisorTaskInfoServiceTest extends BaseServiceTest {
request
.
setCondition
(
queryDTO
);
request
.
setCondition
(
queryDTO
);
List
<
Integer
>
typeList
=
Arrays
.
asList
(
0
,
3
,
5
);
List
<
Integer
>
typeList
=
Arrays
.
asList
(
0
,
3
,
5
);
queryDTO
.
setTaskTypeList
(
typeList
);
queryDTO
.
setTaskTypeList
(
typeList
);
queryDTO
.
setStartDate
(
"2026-01-01"
);
queryDTO
.
setEndDate
(
"2026-01-31"
);
request
.
setPageSize
(
10
);
request
.
setPageSize
(
10
);
request
.
setPageNum
(
1
);
request
.
setPageNum
(
1
);
Page
<
SupervisorTaskDTO
>
supervisorTaskDTOS
=
supervisorTaskInfoService
.
pageTask
(
request
);
Page
<
SupervisorTaskDTO
>
supervisorTaskDTOS
=
supervisorTaskInfoService
.
pageTask
(
request
);
...
...
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorWarningBaselineConfigServiceTest.java
View file @
c2bd4f0
...
@@ -22,30 +22,31 @@ public class SupervisorWarningBaselineConfigServiceTest extends BaseServiceTest
...
@@ -22,30 +22,31 @@ public class SupervisorWarningBaselineConfigServiceTest extends BaseServiceTest
@Test
@Test
public
void
testCreateOrUpdateWarningBaselineConfig
()
{
public
void
testCreateOrUpdateWarningBaselineConfig
()
{
WarningBaselineConfigDTO
config
=
new
WarningBaselineConfigDTO
();
WarningBaselineConfigDTO
config
=
new
WarningBaselineConfigDTO
();
config
.
setIndicatorCode
(
"A0
3
6"
);
config
.
setIndicatorCode
(
"A0
7
6"
);
config
.
setIndicatorName
(
"个人
产值
"
);
config
.
setIndicatorName
(
"个人
客单价
"
);
config
.
setTimeDimension
(
2
);
config
.
setTimeDimension
(
2
);
config
.
setUpdateFlag
(
1
);
List
<
SupervisorWarningBaselineConfig
>
configList
=
new
java
.
util
.
ArrayList
<>();
List
<
SupervisorWarningBaselineConfig
>
configList
=
new
java
.
util
.
ArrayList
<>();
SupervisorWarningBaselineConfig
redItem
=
new
SupervisorWarningBaselineConfig
();
SupervisorWarningBaselineConfig
redItem
=
new
SupervisorWarningBaselineConfig
();
redItem
.
setMinValue
(
new
BigDecimal
(
0
));
redItem
.
setMinValue
(
new
BigDecimal
(
0
));
redItem
.
setMaxValue
(
new
BigDecimal
(
1200
));
redItem
.
setMaxValue
(
new
BigDecimal
(
1200
));
redItem
.
setMaxValueInf
(
0
);
redItem
.
setMaxValueInf
(
0
);
redItem
.
setWarningLevel
(
0
);
redItem
.
setWarningLevel
(
0
);
redItem
.
setId
(
4
L
);
redItem
.
setId
(
10
L
);
configList
.
add
(
redItem
);
configList
.
add
(
redItem
);
SupervisorWarningBaselineConfig
yellowItem
=
new
SupervisorWarningBaselineConfig
();
SupervisorWarningBaselineConfig
yellowItem
=
new
SupervisorWarningBaselineConfig
();
yellowItem
.
setMinValue
(
new
BigDecimal
(
1200
));
yellowItem
.
setMinValue
(
new
BigDecimal
(
1200
));
yellowItem
.
setMaxValue
(
new
BigDecimal
(
4000
));
yellowItem
.
setMaxValue
(
new
BigDecimal
(
4000
));
yellowItem
.
setMaxValueInf
(
0
);
yellowItem
.
setMaxValueInf
(
0
);
yellowItem
.
setWarningLevel
(
1
);
yellowItem
.
setWarningLevel
(
1
);
yellowItem
.
setId
(
5
L
);
yellowItem
.
setId
(
11
L
);
configList
.
add
(
yellowItem
);
configList
.
add
(
yellowItem
);
SupervisorWarningBaselineConfig
greenItem
=
new
SupervisorWarningBaselineConfig
();
SupervisorWarningBaselineConfig
greenItem
=
new
SupervisorWarningBaselineConfig
();
greenItem
.
setMinValue
(
new
BigDecimal
(
4000
));
greenItem
.
setMinValue
(
new
BigDecimal
(
4000
));
greenItem
.
setMaxValue
(
new
BigDecimal
(
6000
));
greenItem
.
setMaxValue
(
new
BigDecimal
(
6000
));
greenItem
.
setMaxValueInf
(
0
);
greenItem
.
setMaxValueInf
(
0
);
greenItem
.
setWarningLevel
(
2
);
greenItem
.
setWarningLevel
(
2
);
greenItem
.
setId
(
6
L
);
greenItem
.
setId
(
12
L
);
configList
.
add
(
greenItem
);
configList
.
add
(
greenItem
);
config
.
setConfigList
(
configList
);
config
.
setConfigList
(
configList
);
config
.
setUpdatedBy
(
"system"
);
config
.
setUpdatedBy
(
"system"
);
...
@@ -61,4 +62,19 @@ public class SupervisorWarningBaselineConfigServiceTest extends BaseServiceTest
...
@@ -61,4 +62,19 @@ public class SupervisorWarningBaselineConfigServiceTest extends BaseServiceTest
List
<
WarningBaselineConfigDTO
>
configList
=
supervisorWarningBaselineConfigService
.
listAllWarningBaselineConfig
();
List
<
WarningBaselineConfigDTO
>
configList
=
supervisorWarningBaselineConfigService
.
listAllWarningBaselineConfig
();
assertTrue
(
configList
.
size
()
>
0
);
assertTrue
(
configList
.
size
()
>
0
);
}
}
/**
* 测试删除
*/
@Test
public
void
testDeleteWarningBaselineConfig
()
{
WarningBaselineConfigDTO
config
=
new
WarningBaselineConfigDTO
();
config
.
setIndicatorCode
(
"A036"
);
config
.
setTimeDimension
(
2
);
config
.
setUpdatedBy
(
"system"
);
Boolean
result
=
supervisorWarningBaselineConfigService
.
deleteWarningBaselineConfig
(
config
);
assertTrue
(
result
);
List
<
WarningBaselineConfigDTO
>
configList
=
supervisorWarningBaselineConfigService
.
listAllWarningBaselineConfig
();
assertTrue
(
configList
.
size
()
>
0
);
}
}
}
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