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 f39f92de
authored
May 20, 2026
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
飞行督导:带教列表接口
1 parent
8ebcb69d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
117 additions
and
0 deletions
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/SupervisorTeachingListDTO.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorTaskInfoRemote.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/SupervisorTaskInfoMapper.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/service/SupervisorTaskInfoService.java
rpc-dj-supervisor/src/main/resources/META-INF/orm/SupervisorTaskInfoMapper.xml
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/SupervisorTeachingListDTO.java
0 → 100644
View file @
f39f92d
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
public
class
SupervisorTeachingListDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
notes
=
"任务ID"
)
private
Long
id
;
@ApiModelProperty
(
notes
=
"带教场景名称"
)
private
String
teachingSceneName
;
@ApiModelProperty
(
notes
=
"带教时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm"
,
timezone
=
"GMT+8"
)
private
Date
teachingTime
;
@ApiModelProperty
(
notes
=
"带教方式名称"
)
private
String
teachingMethodName
;
@ApiModelProperty
(
notes
=
"带教主题名称"
)
private
String
teachingTopicName
;
@ApiModelProperty
(
notes
=
"带教门店(多个以逗号分隔)"
)
private
String
merchantNames
;
@ApiModelProperty
(
notes
=
"参与人员(多个以逗号分隔)"
)
private
String
participantNames
;
}
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorTaskInfoRemote.java
View file @
f39f92d
...
...
@@ -174,4 +174,12 @@ public interface SupervisorTaskInfoRemote {
@ApiParams
({
@ApiParam
(
name
=
"request"
,
notes
=
"查询参数(督导手机号、起止日期)"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)})
@ApiResponse
(
"各类型未完成任务数量"
)
RpcResponse
<
UnfinishedTaskCountDTO
>
getUnfinishedTaskCount
(
UnfinishedTaskCountReqDTO
request
);
/**
* 分页查询带教列表
*/
@ApiMethod
(
"分页查询带教列表"
)
@ApiParams
({
@ApiParam
(
name
=
"request"
,
notes
=
"查询参数"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)})
@ApiResponse
(
"带教列表分页结果"
)
RpcResponse
<
RpcPagination
<
SupervisorTeachingListDTO
>>
pageTeachingRecords
(
RpcPagination
<
SupervisorTaskQueryDTO
>
request
);
}
\ No newline at end of file
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/SupervisorTaskInfoMapper.java
View file @
f39f92d
...
...
@@ -94,4 +94,12 @@ public interface SupervisorTaskInfoMapper extends OreMapper<SupervisorTaskInfo>
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
/**
* 查询带教记录列表
*
* @param request 查询条件
* @return 带教记录列表
*/
List
<
SupervisorTeachingListDTO
>
listTeachingRecords
(
SupervisorTaskQueryDTO
request
);
}
\ No newline at end of file
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorTaskInfoRemoteImpl.java
View file @
f39f92d
...
...
@@ -315,4 +315,20 @@ public class SupervisorTaskInfoRemoteImpl implements SupervisorTaskInfoRemote {
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
}
}
@Override
public
RpcResponse
<
RpcPagination
<
SupervisorTeachingListDTO
>>
pageTeachingRecords
(
RpcPagination
<
SupervisorTaskQueryDTO
>
request
)
{
try
{
log
.
info
(
"分页查询带教列表 - 开始,request={}"
,
request
);
Page
<
SupervisorTeachingListDTO
>
result
=
supervisorTaskInfoService
.
pageTeachingRecords
(
request
);
log
.
info
(
"分页查询带教列表 - 完成,total={}"
,
result
.
getTotal
());
return
RpcResponse
.
success
(
RpcPagination
.
copyPage
(
result
));
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemoteImpl.pageTeachingRecords error {}"
,
e
);
return
RpcResponse
.
error
(
e
.
getError
(),
e
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemoteImpl.pageTeachingRecords system error {}"
,
e
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVER_ERROR
,
e
.
getMessage
());
}
}
}
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorTaskInfoService.java
View file @
f39f92d
...
...
@@ -1240,4 +1240,10 @@ public class SupervisorTaskInfoService {
return
sum
;
}
public
Page
<
SupervisorTeachingListDTO
>
pageTeachingRecords
(
RpcPagination
<
SupervisorTaskQueryDTO
>
request
)
{
Page
<
SupervisorTeachingListDTO
>
page
=
PageHelper
.
startPage
(
request
.
getPageNum
(),
request
.
getPageSize
());
List
<
SupervisorTeachingListDTO
>
list
=
supervisorTaskInfoMapper
.
listTeachingRecords
(
request
.
getCondition
());
return
page
;
}
}
rpc-dj-supervisor/src/main/resources/META-INF/orm/SupervisorTaskInfoMapper.xml
View file @
f39f92d
...
...
@@ -298,4 +298,44 @@
GROUP BY task_type
</select>
<resultMap
id=
"teachingListMap"
type=
"cn.com.glsx.dj.supervisor.dto.SupervisorTeachingListDTO"
>
<result
column=
"id"
property=
"id"
/>
<result
column=
"teaching_scene_name"
property=
"teachingSceneName"
/>
<result
column=
"teaching_time"
property=
"teachingTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"teaching_method_name"
property=
"teachingMethodName"
/>
<result
column=
"teaching_topic_name"
property=
"teachingTopicName"
/>
<result
column=
"merchant_names"
property=
"merchantNames"
/>
<result
column=
"participant_names"
property=
"participantNames"
/>
</resultMap>
<select
id=
"listTeachingRecords"
parameterType=
"cn.com.glsx.dj.supervisor.dto.SupervisorTaskQueryDTO"
resultMap=
"teachingListMap"
>
SELECT
sti.id,
std.teaching_scene_name,
std.teaching_time,
std.teaching_method_name,
std.teaching_topic_name,
GROUP_CONCAT(DISTINCT stm.merchant_name ORDER BY stm.id SEPARATOR '、') AS merchant_names,
GROUP_CONCAT(DISTINCT stp.participant_name ORDER BY stp.id SEPARATOR '、') AS participant_names
FROM supervisor_task_info sti
INNER JOIN supervisor_teaching_detail std ON std.task_id = sti.id
LEFT JOIN supervisor_task_merchant stm ON stm.relation_id = sti.id AND stm.deleted_flag = 'N'
LEFT JOIN supervisor_task_participant stp ON stp.task_id = sti.id AND stp.deleted_flag = 'N'
<where>
sti.deleted_flag = 'N'
AND sti.task_type = 5
<if
test=
"supervisorPhone != null and supervisorPhone != ''"
>
AND sti.supervisor_phone = #{supervisorPhone}
</if>
<if
test=
"startDate != null and startDate != ''"
>
AND CAST(sti.create_time AS DATE)
>
= #{startDate, jdbcType=DATE}
</if>
<if
test=
"endDate != null and endDate != ''"
>
AND CAST(sti.create_time AS DATE)
<
= #{endDate, jdbcType=DATE}
</if>
</where>
GROUP BY sti.id, std.teaching_scene_name, std.teaching_time, std.teaching_method_name, std.teaching_topic_name
ORDER BY sti.create_time DESC
</select>
</mapper>
\ No newline at end of file
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