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 274d7f6a
authored
Jun 09, 2026
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增督导分页查询处理
1 parent
7bea1e42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
39 deletions
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/SupervisorPerformanceResponse.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorDashboardRemote.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorDashboardRemoteImpl.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardService.java
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardServiceTest.java
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/dto/SupervisorPerformanceResponse.java
0 → 100644
View file @
274d7f6
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>
*/
@ApiModel
(
description
=
"督导业绩分页响应DTO"
)
@Data
public
class
SupervisorPerformanceResponse
implements
Serializable
{
@ApiModelProperty
(
notes
=
"总条数"
)
private
Integer
totalCount
;
@ApiModelProperty
(
notes
=
"总页数"
)
private
Integer
totalPages
;
@ApiModelProperty
(
notes
=
"当前页码(从0开始)"
)
private
Integer
currentPage
;
@ApiModelProperty
(
notes
=
"每页大小(固定为3)"
)
private
Integer
pageSize
;
@ApiModelProperty
(
notes
=
"督导业绩列表"
)
private
List
<
SupervisorPerformanceDTO
>
supervisorList
;
}
\ No newline at end of file
rpc-dj-supervisor-api/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorDashboardRemote.java
View file @
274d7f6
...
...
@@ -195,10 +195,11 @@ public interface SupervisorDashboardRemote {
@ApiOperation
(
"业绩概览 -- 督导业绩接口"
)
@ApiMethod
(
"业绩概览 -- 督导业绩接口"
)
@ApiParams
({
@ApiParam
(
name
=
"req"
,
notes
=
"查询参数(总部运营视角,不需要指定督导ID)"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
)
@ApiParam
(
name
=
"req"
,
notes
=
"查询参数(总部运营视角,不需要指定督导ID)"
,
dataType
=
ApiParam
.
DataTypeEnum
.
OBJECT
,
required
=
true
),
@ApiParam
(
name
=
"page"
,
notes
=
"页码(从0开始,固定每页3条)"
,
dataType
=
ApiParam
.
DataTypeEnum
.
INTEGER
,
required
=
false
)
})
@ApiResponse
(
"督导业绩
列表
"
)
RpcResponse
<
List
<
SupervisorPerformanceDTO
>>
getSupervisorPerformance
(
SupervisorManagementQueryReq
req
);
@ApiResponse
(
"督导业绩
分页响应(包含总页数、总条数和当前页数据)
"
)
RpcResponse
<
SupervisorPerformanceResponse
>
getSupervisorPerformance
(
SupervisorManagementQueryReq
req
,
Integer
page
);
/**
* 业绩概览 -- 门店业绩接口(总部运营视角)
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorDashboardRemoteImpl.java
View file @
274d7f6
...
...
@@ -209,15 +209,18 @@ public class SupervisorDashboardRemoteImpl implements SupervisorDashboardRemote
* </p>
*
* @param req 查询参数
* @param page 页码(从0开始,固定每页3条)
* @return RPC响应,包含督导业绩列表
*/
@Override
public
RpcResponse
<
List
<
SupervisorPerformanceDTO
>>
getSupervisorPerformance
(
SupervisorManagementQueryReq
req
)
{
public
RpcResponse
<
SupervisorPerformanceResponse
>
getSupervisorPerformance
(
SupervisorManagementQueryReq
req
,
Integer
page
)
{
try
{
log
.
info
(
"开始远程调用获取督导业绩(总部运营视角),请求参数:统计维度={},时间范围={}~{}"
,
req
.
getStatDimension
(),
req
.
getStartDate
(),
req
.
getEndDate
());
List
<
SupervisorPerformanceDTO
>
result
=
supervisorDashboardService
.
getSupervisorPerformance
(
req
);
log
.
info
(
"远程调用获取督导业绩成功,共 {} 条记录"
,
result
!=
null
?
result
.
size
()
:
0
);
log
.
info
(
"开始远程调用获取督导业绩(总部运营视角),请求参数:统计维度={},时间范围={}~{},页码={}"
,
req
.
getStatDimension
(),
req
.
getStartDate
(),
req
.
getEndDate
(),
page
);
SupervisorPerformanceResponse
result
=
supervisorDashboardService
.
getSupervisorPerformance
(
req
,
page
);
log
.
info
(
"远程调用获取督导业绩成功,总条数={},总页数={}"
,
result
!=
null
&&
result
.
getTotalCount
()
!=
null
?
result
.
getTotalCount
()
:
0
,
result
!=
null
&&
result
.
getTotalPages
()
!=
null
?
result
.
getTotalPages
()
:
0
);
return
RpcResponse
.
success
(
result
);
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"cn.com.glsx.dj.supervisor.remote.SupervisorDashboardRemoteImpl.getSupervisorPerformance error {}"
,
e
);
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardService.java
View file @
274d7f6
This diff is collapsed.
Click to expand it.
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardServiceTest.java
View file @
274d7f6
...
...
@@ -8,6 +8,7 @@ import cn.com.glsx.dj.supervisor.dto.SupervisorPerformanceDTO;
import
cn.com.glsx.dj.supervisor.dto.SupervisionQueryReq
;
import
cn.com.glsx.dj.supervisor.dto.SupervisorManagementQueryReq
;
import
cn.com.glsx.dj.supervisor.dto.MerchantQueryReq
;
import
cn.com.glsx.dj.supervisor.dto.SupervisorPerformanceResponse
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.Test
;
...
...
@@ -117,25 +118,11 @@ public class SupervisorDashboardServiceTest extends BaseServiceTest {
req
.
setEndDate
(
"2026-05-31"
);
req
.
setDateType
(
2
);
// 月
req
.
setStatDimension
(
2
);
// 通用品牌
List
<
SupervisorPerformanceDTO
>
result
=
supervisorDashboardService
.
getSupervisorPerformance
(
req
);
log
.
info
(
"通用品牌督导业绩查询成功,{}"
,
JSONObject
.
toJSONString
(
result
));
}
SupervisorPerformanceResponse
supervisorPerformance
=
supervisorDashboardService
.
getSupervisorPerformance
(
req
,
0
);
log
.
info
(
"通用品牌督导业绩查询成功,{}"
,
JSONObject
.
toJSONString
(
supervisorPerformance
));
/**
* 测试督导业绩查询 - 问界鸿蒙品牌
*/
@Test
public
void
testGetSupervisorPerformanceHarmony
()
{
SupervisorManagementQueryReq
req
=
new
SupervisorManagementQueryReq
();
req
.
setStartDate
(
"2026-05-01"
);
req
.
setEndDate
(
"2026-05-31"
);
req
.
setDateType
(
2
);
// 月
req
.
setStatDimension
(
1
);
// 问界鸿蒙
List
<
SupervisorPerformanceDTO
>
result
=
supervisorDashboardService
.
getSupervisorPerformance
(
req
);
System
.
out
.
println
(
"问界鸿蒙督导业绩查询成功,数量:"
+
(
result
!=
null
?
result
.
size
()
:
0
));
}
// ==================== 门店业绩测试用例(总部运营视角) ====================
...
...
@@ -176,20 +163,6 @@ public class SupervisorDashboardServiceTest extends BaseServiceTest {
}
/**
* 测试管理维度数据计算
*/
@Test
public
void
testManagementDataCalculation
()
{
SupervisorManagementQueryReq
req
=
new
SupervisorManagementQueryReq
();
req
.
setStartDate
(
"2026-05-01"
);
req
.
setEndDate
(
"2026-05-31"
);
req
.
setDateType
(
2
);
// 月
req
.
setStatDimension
(
2
);
// 通用品牌
List
<
SupervisorPerformanceDTO
>
result
=
supervisorDashboardService
.
getSupervisorPerformance
(
req
);
}
// ==================== 门店维度业绩测试用例 ====================
...
...
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