Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rop-dj-supervisor-mini
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 04b9439a
authored
Mar 13, 2026
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v5.7.0版本 飞行督导:团队-培训-员工排行、发起带教
1 parent
82155243
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
226 additions
and
14 deletions
src/main/java/cn/com/glsx/dj/supervisor/config/DubboConfig.java
src/main/java/cn/com/glsx/dj/supervisor/controller/SupervisorTeamController.java
src/main/java/cn/com/glsx/dj/supervisor/request/SupervisorCoachingSubmitRequest.java
src/main/java/cn/com/glsx/dj/supervisor/request/SupervisorEmployeeTrainingInfoRequest.java
src/main/java/cn/com/glsx/dj/supervisor/response/SupervisorEmployeeTrainingInfoResponse.java
src/main/java/cn/com/glsx/dj/supervisor/config/DubboConfig.java
View file @
04b9439
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
config
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorAiAnalysisRecordRemote
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorEmployeeTrainingInfoRemote
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorLearningCenterRemote
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemote
;
import
org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory
;
...
...
@@ -65,4 +66,10 @@ public class DubboConfig {
public
SupervisorAiAnalysisRecordRemote
supervisorAiAnalysisRecordRemote
()
{
return
factory
.
builder
(
SupervisorAiAnalysisRecordRemote
.
class
).
version
(
"1.0.0"
).
check
(
false
).
timeout
(
30000
).
build
();
}
@Bean
public
SupervisorEmployeeTrainingInfoRemote
supervisorEmployeeTrainingInfoRemote
()
{
return
factory
.
builder
(
SupervisorEmployeeTrainingInfoRemote
.
class
).
version
(
"1.0.0"
).
check
(
false
).
timeout
(
30000
).
build
();
}
}
src/main/java/cn/com/glsx/dj/supervisor/controller/SupervisorTeamController.java
View file @
04b9439
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
controller
;
import
cn.com.glsx.dj.carboutique.response.LoginUserInfoResponse
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeTrainingInfoRequestDTO
;
import
cn.com.glsx.dj.supervisor.dto.SupervisorTaskDTO
;
import
cn.com.glsx.dj.supervisor.model.SupervisorAiAnalysisRecord
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorAiAnalysisRecordRemote
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorEmployeeTrainingInfoRemote
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemote
;
import
cn.com.glsx.dj.supervisor.request.SupervisorAiAnalysisRecordRequest
;
import
cn.com.glsx.dj.supervisor.request.SupervisorCoachingSubmitRequest
;
import
cn.com.glsx.dj.supervisor.request.SupervisorEmployeeTrainingInfoRequest
;
import
cn.com.glsx.dj.supervisor.response.SupervisorAiAnalysisRecordResponse
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeTrainingInfoDTO
;
import
cn.com.glsx.dj.supervisor.util.CommonUtil
;
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
cn.com.glsx.framework.rop.response.RopResponse
;
import
com.rop.annotation.IgnoreSignType
;
import
com.rop.annotation.NeedInSessionType
;
...
...
@@ -14,44 +23,44 @@ import com.rop.annotation.ServiceMethod;
import
com.rop.annotation.ServiceMethodBean
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
/**
* @Title: SupervisorTeamController.java
* @Description: 督导 - 团队接口
* @author
Alvin
* @author
xiehx
* @date 2026 年 3 月 11 日
* @version V2.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@Slf4j
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
NO
)
@Api
(
"督导 - 团队"
)
public
class
SupervisorTeamController
{
/**
* logger
*/
protected
final
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
@Autowired
private
SupervisorAiAnalysisRecordRemote
supervisorAiAnalysisRecordRemote
;
@Autowired
private
SupervisorEmployeeTrainingInfoRemote
supervisorEmployeeTrainingInfoRemote
;
@Autowired
private
SupervisorTaskInfoRemote
supervisorTaskInfoRemote
;
/**
* 根据条件查询 AI 分析记录
* @param request
* @return
* @author Alvin
*/
@ServiceMethod
(
method
=
"dj.api.supervisor.mini.team.aiAnalysisRecord.get"
,
needInSession
=
NeedInSessionType
.
YES
,
ignoreSign
=
IgnoreSignType
.
YES
)
@ApiOperation
(
"根据条件查询 AI 分析记录"
)
public
RopResponse
<
SupervisorAiAnalysisRecordResponse
>
getAiAnalysisRecord
(
SupervisorAiAnalysisRecordRequest
request
){
try
{
logger
.
info
(
"查询 AI 分析记录,请求参数:{}"
,
request
);
// 构建查询条件
SupervisorAiAnalysisRecord
queryParam
=
new
SupervisorAiAnalysisRecord
();
BeanUtils
.
copyProperties
(
request
,
queryParam
);
...
...
@@ -64,7 +73,7 @@ public class SupervisorTeamController {
RpcResponse
<
SupervisorAiAnalysisRecord
>
rpcResponse
=
supervisorAiAnalysisRecordRemote
.
getAiAnalysisRecord
(
queryParam
);
if
(!
rpcResponse
.
hasResult
())
{
log
ger
.
error
(
"查询 AI 分析记录失败:{}"
,
rpcResponse
.
getMessage
());
log
.
error
(
"查询 AI 分析记录失败:{}"
,
rpcResponse
.
getMessage
());
return
RopResponse
.
error
(
rpcResponse
.
getMessage
());
}
...
...
@@ -77,12 +86,97 @@ public class SupervisorTeamController {
SupervisorAiAnalysisRecordResponse
response
=
new
SupervisorAiAnalysisRecordResponse
();
BeanUtils
.
copyProperties
(
record
,
response
);
log
ger
.
info
(
"查询 AI 分析记录成功,记录 ID: {}"
,
record
.
getId
());
log
.
info
(
"查询 AI 分析记录成功,记录 ID: {}"
,
record
.
getId
());
return
RopResponse
.
success
(
response
);
}
catch
(
Exception
e
)
{
log
ger
.
error
(
"查询 AI 分析记录异常"
,
e
);
log
.
error
(
"查询 AI 分析记录异常"
,
e
);
return
RopResponse
.
error
(
"查询失败:"
+
e
.
getMessage
());
}
}
/**
* 根据条件查询全部员工培训信息
* @param request
* @return
*/
@ServiceMethod
(
method
=
"dj.api.supervisor.mini.team.all.employee.training.info"
,
needInSession
=
NeedInSessionType
.
YES
,
ignoreSign
=
IgnoreSignType
.
YES
)
@ApiOperation
(
"根据条件查询全部员工培训信息"
)
public
RopResponse
<
List
<
EmployeeTrainingInfoDTO
>>
getAllEmployeeTrainingInfo
(
SupervisorEmployeeTrainingInfoRequest
request
){
try
{
log
.
info
(
"查询全部员工培训信息,请求参数:{}"
,
request
);
// 构建查询条件
EmployeeTrainingInfoRequestDTO
dto
=
new
EmployeeTrainingInfoRequestDTO
();
BeanUtils
.
copyProperties
(
request
,
dto
);
// 获取当前登录用户信息
LoginUserInfoResponse
userInfo
=
CommonUtil
.
getLoginUserInfo
();
dto
.
setSupervisorPhone
(
userInfo
.
getPhone
());
// 调用 RPC 层查询
RpcResponse
<
List
<
EmployeeTrainingInfoDTO
>>
rpcResponse
=
supervisorEmployeeTrainingInfoRemote
.
getAllEmployeeTrainingInfo
(
dto
);
if
(!
rpcResponse
.
isSuccess
())
{
log
.
error
(
"查询全部员工培训信息失败:{}"
,
rpcResponse
.
getMessage
());
return
RopResponse
.
error
(
rpcResponse
.
getError
(),
rpcResponse
.
getMessage
());
}
List
<
EmployeeTrainingInfoDTO
>
resultList
=
rpcResponse
.
getResult
();
log
.
info
(
"查询全部员工培训信息成功,总记录数:{}"
,
resultList
!=
null
?
resultList
.
size
()
:
0
);
return
RopResponse
.
success
(
resultList
);
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"查询全部员工培训信息异常"
,
e
);
return
RopResponse
.
error
(
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"查询全部员工培训信息系统异常"
,
e
);
return
RopResponse
.
result
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
}
}
/**
* 发起带教 - 提交
* @param request
* @return
*/
@ServiceMethod
(
method
=
"dj.api.supervisor.mini.team.coaching.submit"
,
needInSession
=
NeedInSessionType
.
YES
,
ignoreSign
=
IgnoreSignType
.
YES
)
@ApiOperation
(
"发起带教 - 提交"
)
public
RopResponse
<
Long
>
submitCoaching
(
SupervisorCoachingSubmitRequest
request
){
try
{
log
.
info
(
"发起带教 - 提交,请求参数:{}"
,
request
);
// 构建带教任务 DTO
SupervisorTaskDTO
dto
=
new
SupervisorTaskDTO
();
BeanUtils
.
copyProperties
(
request
,
dto
);
dto
.
setTaskImageList
(
request
.
getImageList
());
dto
.
setTaskCourseList
(
request
.
getCourseList
());
// 获取当前登录用户信息
LoginUserInfoResponse
userInfo
=
CommonUtil
.
getLoginUserInfo
();
dto
.
setSupervisorPhone
(
userInfo
.
getPhone
());
dto
.
setSupervisorName
(
userInfo
.
getName
());
// 调用 RPC 层提交
RpcResponse
<
Long
>
response
=
supervisorTaskInfoRemote
.
submitCoaching
(
dto
);
if
(!
response
.
isSuccess
())
{
log
.
error
(
"发起带教失败:{}"
,
response
.
getMessage
());
return
RopResponse
.
error
(
response
.
getError
(),
response
.
getMessage
());
}
Long
taskId
=
response
.
getResult
();
log
.
info
(
"发起带教成功,taskId={}"
,
taskId
);
return
RopResponse
.
success
(
taskId
);
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"发起带教异常"
,
e
);
return
RopResponse
.
error
(
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"发起带教系统异常"
,
e
);
return
RopResponse
.
result
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/dj/supervisor/request/SupervisorCoachingSubmitRequest.java
0 → 100644
View file @
04b9439
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
request
;
import
cn.com.glsx.dj.supervisor.model.SupervisorTaskCourse
;
import
cn.com.glsx.dj.supervisor.model.SupervisorTaskImage
;
import
com.rop.AbstractRopRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
/**
* 发起带教 - 提交请求
*
* @author xiehx
* @date 2026 年 3 月 12 日
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
SupervisorCoachingSubmitRequest
extends
AbstractRopRequest
{
@NotNull
(
message
=
"门店 ID 不能为空"
)
@ApiModelProperty
(
notes
=
"门店 ID"
,
required
=
true
)
private
Integer
merchantId
;
@NotEmpty
(
message
=
"门店名称不能为空"
)
@ApiModelProperty
(
notes
=
"门店名称"
,
required
=
true
)
private
String
merchantName
;
@NotEmpty
(
message
=
"驻店手机号不能为空"
)
@ApiModelProperty
(
notes
=
"驻店手机号"
,
required
=
true
)
private
String
storeManagerPhone
;
@ApiModelProperty
(
notes
=
"驻店姓名"
)
private
String
storeManagerName
;
@NotEmpty
(
message
=
"督导记录不能为空"
)
@ApiModelProperty
(
notes
=
"督导记录(富文本内容)"
,
required
=
true
)
private
String
taskContext
;
@ApiModelProperty
(
notes
=
"推送课程列表"
)
private
List
<
SupervisorTaskCourse
>
courseList
;
@ApiModelProperty
(
notes
=
"门店拍照列表"
)
private
List
<
SupervisorTaskImage
>
imageList
;
}
src/main/java/cn/com/glsx/dj/supervisor/request/SupervisorEmployeeTrainingInfoRequest.java
0 → 100644
View file @
04b9439
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
request
;
import
com.rop.AbstractRopRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 根据条件查询全部员工培训信息请求
*
* @author xiehx
* @date 2026 年 3 月 12 日
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
SupervisorEmployeeTrainingInfoRequest
extends
AbstractRopRequest
{
@ApiModelProperty
(
notes
=
"业务类型(1-延保、2-权益、3-轻改),不传就是全业务"
)
private
Integer
businessType
;
@ApiModelProperty
(
notes
=
"开始日期 yyyy-MM-dd"
,
required
=
true
)
private
String
startDate
;
@ApiModelProperty
(
notes
=
"结束日期 yyyy-MM-dd"
,
required
=
true
)
private
String
endDate
;
@ApiModelProperty
(
notes
=
"排序字段(1-学习时长、2-完成课程数、3-带教次数),不传默认按学习时长排序"
)
private
Integer
sortField
;
@ApiModelProperty
(
notes
=
"排序方式(0-升序、1-降序),不传默认按降序排序"
)
private
Integer
sortOrder
;
}
src/main/java/cn/com/glsx/dj/supervisor/response/SupervisorEmployeeTrainingInfoResponse.java
0 → 100644
View file @
04b9439
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
response
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* 员工培训信息响应
*
* @author xiehx
* @date 2026 年 3 月 12 日
*/
@Data
public
class
SupervisorEmployeeTrainingInfoResponse
implements
Serializable
{
@ApiModelProperty
(
notes
=
"员工姓名"
)
private
String
employeeName
;
@ApiModelProperty
(
notes
=
"手机号"
)
private
String
phone
;
@ApiModelProperty
(
notes
=
"学习时长(小时)"
)
private
Double
studyHours
;
@ApiModelProperty
(
notes
=
"完成课程数"
)
private
Integer
completedCourses
;
@ApiModelProperty
(
notes
=
"带教次数"
)
private
Integer
coachingTimes
;
}
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