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 5e07bf10
authored
Mar 20, 2026
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]驻店员工逻辑调整
1 parent
db78ad4c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
35 deletions
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/BusinessSceneMapper.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardService.java
rpc-dj-supervisor/src/main/resources/META-INF/orm/BusinessSceneMapper.xml
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/src/test/java/cn/com/glsx/dj/supervisor/remote/SupervisorDashboardRemoteImplTest.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/BusinessSceneMapper.java
View file @
5e07bf1
...
@@ -171,4 +171,6 @@ public interface BusinessSceneMapper {
...
@@ -171,4 +171,6 @@ public interface BusinessSceneMapper {
);
);
String
findDepartmentByOid
(
@Param
(
"oid"
)
Integer
oIdDepartmentId
);
String
findDepartmentByOid
(
@Param
(
"oid"
)
Integer
oIdDepartmentId
);
List
<
EmployeeStoreTransferDTO
>
findRecordsByPhoneNumber
(
@Param
(
"phoneNumber"
)
String
phoneNumber
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardService.java
View file @
5e07bf1
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
service
;
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
service
;
import
cn.com.glsx.dj.beisen.remote.BeiSenOrgRemote
;
import
cn.com.glsx.dj.mindworkplate.model.EarlyWarningThresholdConfig
;
import
cn.com.glsx.dj.mindworkplate.model.EarlyWarningThresholdConfig
;
import
cn.com.glsx.dj.mindworkplate.remote.WarningMsgRemote
;
import
cn.com.glsx.dj.mindworkplate.remote.WarningMsgRemote
;
import
cn.com.glsx.dj.smartcarlife.dto.ShopMerchantDirectorConfigDTO
;
import
cn.com.glsx.dj.smartcarlife.dto.ShopMerchantDirectorConfigDTO
;
...
@@ -15,6 +14,7 @@ import cn.com.glsx.dj.supervisor.dto.EmployeeBasicInfoReq;
...
@@ -15,6 +14,7 @@ import cn.com.glsx.dj.supervisor.dto.EmployeeBasicInfoReq;
import
cn.com.glsx.dj.supervisor.dto.EmployeeBehaviorDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeBehaviorDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeBehaviorReq
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeBehaviorReq
;
import
cn.com.glsx.dj.supervisor.dto.EmployeePerformanceDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeePerformanceDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeePerformanceReq
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeRanking
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeRanking
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferReq
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferReq
;
...
@@ -36,25 +36,24 @@ import cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO;
...
@@ -36,25 +36,24 @@ import cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO;
import
cn.com.glsx.merchants.remote.MerchantUserRemote
;
import
cn.com.glsx.merchants.remote.MerchantUserRemote
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Map.Entry
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
javax.annotation.Resource
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.env.Environment
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
@Service
@Slf4j
@Slf4j
public
class
SupervisorDashboardService
{
public
class
SupervisorDashboardService
{
...
@@ -86,6 +85,9 @@ public class SupervisorDashboardService {
...
@@ -86,6 +85,9 @@ public class SupervisorDashboardService {
@Autowired
@Autowired
private
WarningMsgRemote
warningMsgRemote
;
private
WarningMsgRemote
warningMsgRemote
;
@Autowired
private
Environment
environment
;
/**
/**
* 处理员工列表,包括获取业务场景标签
* 处理员工列表,包括获取业务场景标签
...
@@ -244,8 +246,13 @@ public class SupervisorDashboardService {
...
@@ -244,8 +246,13 @@ public class SupervisorDashboardService {
return
sortDirection
==
1
?
-
compareResult
:
compareResult
;
// 降序时取反
return
sortDirection
==
1
?
-
compareResult
:
compareResult
;
// 降序时取反
});
});
}
else
{
}
else
{
// 默认按产值降序排序
// 假设 getPersonalOutput() 返回的是 BigDecimal 或 Integer 等实现了 Comparable 的类型
storeAndEmployeePhoneList
.
sort
((
a
,
b
)
->
b
.
getPersonalOutput
().
compareTo
(
a
.
getPersonalOutput
()));
storeAndEmployeePhoneList
.
sort
(
Comparator
.
comparing
(
a
->
a
.
getPersonalOutput
(),
Comparator
.
nullsLast
(
Comparator
.
reverseOrder
())
// nullsLast 保证空值在最后,reverseOrder 实现降序
)
);
}
}
vo
.
setEmployeeList
(
storeAndEmployeePhoneList
);
vo
.
setEmployeeList
(
storeAndEmployeePhoneList
);
...
@@ -339,7 +346,13 @@ public class SupervisorDashboardService {
...
@@ -339,7 +346,13 @@ public class SupervisorDashboardService {
});
});
}
else
{
}
else
{
// 默认按产值降序排序
// 默认按产值降序排序
storePhoneMap
.
sort
((
a
,
b
)
->
b
.
getPersonalOutput
().
compareTo
(
a
.
getPersonalOutput
()));
// 假设 getPersonalOutput() 返回的是 BigDecimal 或 Integer 等实现了 Comparable 的类型
storePhoneMap
.
sort
(
Comparator
.
comparing
(
a
->
a
.
getDealCount
(),
Comparator
.
nullsLast
(
Comparator
.
reverseOrder
())
// nullsLast 保证空值在最后,reverseOrder 实现降序
)
);
}
}
vo
.
setEmployeeList
(
storePhoneMap
);
vo
.
setEmployeeList
(
storePhoneMap
);
...
@@ -361,6 +374,7 @@ public class SupervisorDashboardService {
...
@@ -361,6 +374,7 @@ public class SupervisorDashboardService {
params
.
setBizs
(
dashboardQueryReq
.
getBizs
());
params
.
setBizs
(
dashboardQueryReq
.
getBizs
());
params
.
setDateType
(
dashboardQueryReq
.
getDateType
());
params
.
setDateType
(
dashboardQueryReq
.
getDateType
());
params
.
setStartDate
(
dashboardQueryReq
.
getStartDate
());
params
.
setStartDate
(
dashboardQueryReq
.
getStartDate
());
params
.
setBrandIds
(
environment
.
getProperty
(
"bi.default.brandIds"
)==
null
?
"-1,-2,-4,3454"
:
environment
.
getProperty
(
"bi.default.brandIds"
));
params
.
setEndDate
(
dashboardQueryReq
.
getEndDate
());
params
.
setEndDate
(
dashboardQueryReq
.
getEndDate
());
if
(
CollectionUtils
.
isNotEmpty
(
dashboardQueryReq
.
getMerchantIds
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
dashboardQueryReq
.
getMerchantIds
()))
{
params
.
setMerchantIds
(
params
.
setMerchantIds
(
...
@@ -621,6 +635,7 @@ public class SupervisorDashboardService {
...
@@ -621,6 +635,7 @@ public class SupervisorDashboardService {
biParams
.
setDateType
(
req
.
getDateType
());
biParams
.
setDateType
(
req
.
getDateType
());
biParams
.
setStartDate
(
req
.
getStartDate
());
biParams
.
setStartDate
(
req
.
getStartDate
());
biParams
.
setEndDate
(
req
.
getEndDate
());
biParams
.
setEndDate
(
req
.
getEndDate
());
biParams
.
setBrandIds
(
environment
.
getProperty
(
"bi.default.brandIds"
)==
null
?
"-1,-2,-4,3454"
:
environment
.
getProperty
(
"bi.default.brandIds"
));
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getMerchantIds
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getMerchantIds
()))
{
biParams
.
setMerchantIds
(
biParams
.
setMerchantIds
(
...
@@ -808,7 +823,7 @@ public class SupervisorDashboardService {
...
@@ -808,7 +823,7 @@ public class SupervisorDashboardService {
* @param req 查询参数
* @param req 查询参数
* @return 员工行为数据
* @return 员工行为数据
*/
*/
public
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeeBehaviorDTO
getEmployeeBehaviorData
(
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeeBehaviorReq
req
)
{
public
EmployeeBehaviorDTO
getEmployeeBehaviorData
(
EmployeeBehaviorReq
req
)
{
log
.
info
(
"开始获取个人行为分析数据,请求参数:{}"
,
req
);
log
.
info
(
"开始获取个人行为分析数据,请求参数:{}"
,
req
);
// 构建个人行为分析数据
// 构建个人行为分析数据
...
@@ -1017,7 +1032,7 @@ public class SupervisorDashboardService {
...
@@ -1017,7 +1032,7 @@ public class SupervisorDashboardService {
RpcResponse
<
List
<
BeisenEmployeeInfoDTO
>>
beisenResponse
=
merchantUserRemote
.
selectByPhones
(
phoneNumbers
);
RpcResponse
<
List
<
BeisenEmployeeInfoDTO
>>
beisenResponse
=
merchantUserRemote
.
selectByPhones
(
phoneNumbers
);
// 3. 构建人员基础信息
// 3. 构建人员基础信息
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeeBasicInfoDTO
basicInfo
=
new
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeeBasicInfoDTO
();
EmployeeBasicInfoDTO
basicInfo
=
new
EmployeeBasicInfoDTO
();
if
(
beisenResponse
.
isSuccess
()
&&
beisenResponse
.
getResult
()
!=
null
&&
!
beisenResponse
.
getResult
().
isEmpty
())
{
if
(
beisenResponse
.
isSuccess
()
&&
beisenResponse
.
getResult
()
!=
null
&&
!
beisenResponse
.
getResult
().
isEmpty
())
{
BeisenEmployeeInfoDTO
beisenInfo
=
beisenResponse
.
getResult
().
get
(
0
);
BeisenEmployeeInfoDTO
beisenInfo
=
beisenResponse
.
getResult
().
get
(
0
);
...
@@ -1241,7 +1256,7 @@ public class SupervisorDashboardService {
...
@@ -1241,7 +1256,7 @@ public class SupervisorDashboardService {
* @param req 查询参数
* @param req 查询参数
* @return 个人业绩数据
* @return 个人业绩数据
*/
*/
public
EmployeePerformanceDTO
getEmployeePerformanceData
(
cn
.
com
.
glsx
.
dj
.
supervisor
.
dto
.
EmployeePerformanceReq
req
)
{
public
EmployeePerformanceDTO
getEmployeePerformanceData
(
EmployeePerformanceReq
req
)
{
log
.
info
(
"开始获取个人业绩数据,请求参数:{}"
,
req
);
log
.
info
(
"开始获取个人业绩数据,请求参数:{}"
,
req
);
// 构建个人业绩数据
// 构建个人业绩数据
...
@@ -1258,19 +1273,20 @@ public class SupervisorDashboardService {
...
@@ -1258,19 +1273,20 @@ public class SupervisorDashboardService {
storeItemCodes
=
"A036,A076,A084,A075,A0107,A0108,A0109,A0110,A0111,A0112,A0113,A0114,A0115,A0116,A0117,A0118,A0119,A0120"
;
storeItemCodes
=
"A036,A076,A084,A075,A0107,A0108,A0109,A0110,A0111,A0112,A0113,A0114,A0115,A0116,A0117,A0118,A0119,A0120"
;
}
}
cn
.
com
.
glsx
.
dj
.
supervisor
.
service
.
DataBizQueryParamsDTO
storeQueryParams
=
new
cn
.
com
.
glsx
.
dj
.
supervisor
.
service
.
DataBizQueryParamsDTO
();
DataBizQueryParamsDTO
storeQueryParams
=
new
DataBizQueryParamsDTO
();
storeQueryParams
.
setBizs
(
req
.
getBizs
());
storeQueryParams
.
setBizs
(
req
.
getBizs
());
storeQueryParams
.
setMerchantIds
(
req
.
getMerchantId
()
!=
null
?
req
.
getMerchantId
().
toString
()
:
null
);
// 门店ID
storeQueryParams
.
setMerchantIds
(
req
.
getMerchantId
()
!=
null
?
req
.
getMerchantId
().
toString
()
:
null
);
// 门店ID
storeQueryParams
.
setStartDate
(
req
.
getStartDate
());
// 开始时间
storeQueryParams
.
setStartDate
(
req
.
getStartDate
());
// 开始时间
storeQueryParams
.
setEndDate
(
req
.
getEndDate
());
// 结束时间
storeQueryParams
.
setEndDate
(
req
.
getEndDate
());
// 结束时间
storeQueryParams
.
setItemCodes
(
storeItemCodes
);
// 多个指标编码,用逗号隔开
storeQueryParams
.
setItemCodes
(
storeItemCodes
);
// 多个指标编码,用逗号隔开
storeQueryParams
.
setBrandIds
(
environment
.
getProperty
(
"bi.default.brandIds"
)==
null
?
"-1,-2,-4,3454"
:
environment
.
getProperty
(
"bi.default.brandIds"
));
storeQueryParams
.
setDateType
(
req
.
getDateType
());
storeQueryParams
.
setDateType
(
req
.
getDateType
());
String
storeJsonBody
=
cn
.
hutool
.
json
.
JSONUtil
.
toJsonStr
(
storeQueryParams
);
String
storeJsonBody
=
JSONUtil
.
toJsonStr
(
storeQueryParams
);
cn
.
com
.
glsx
.
dj
.
supervisor
.
model
.
DataResp
<
List
<
cn
.
com
.
glsx
.
dj
.
supervisor
.
model
.
DataBusinessDTO
>>
storeDataResp
=
getDataStatsService
.
getListDataResp
(
storeJsonBody
);
DataResp
<
List
<
DataBusinessDTO
>>
storeDataResp
=
getDataStatsService
.
getListDataResp
(
storeJsonBody
);
if
(
storeDataResp
!=
null
&&
storeDataResp
.
getContent
()
!=
null
&&
!
storeDataResp
.
getContent
().
isEmpty
())
{
if
(
storeDataResp
!=
null
&&
storeDataResp
.
getContent
()
!=
null
&&
!
storeDataResp
.
getContent
().
isEmpty
())
{
for
(
cn
.
com
.
glsx
.
dj
.
supervisor
.
model
.
DataBusinessDTO
storeData
:
storeDataResp
.
getContent
())
{
for
(
DataBusinessDTO
storeData
:
storeDataResp
.
getContent
())
{
storeMetrics
.
put
(
storeData
.
getItemCode
(),
storeData
.
getItemValue
());
storeMetrics
.
put
(
storeData
.
getItemCode
(),
storeData
.
getItemValue
());
storeRates
.
put
(
storeData
.
getItemCode
(),
storeData
.
getRate
());
// 环比
storeRates
.
put
(
storeData
.
getItemCode
(),
storeData
.
getRate
());
// 环比
}
}
...
@@ -1320,12 +1336,14 @@ public class SupervisorDashboardService {
...
@@ -1320,12 +1336,14 @@ public class SupervisorDashboardService {
employeeQueryParams
.
setStartDate
(
req
.
getStartDate
());
// 开始时间
employeeQueryParams
.
setStartDate
(
req
.
getStartDate
());
// 开始时间
employeeQueryParams
.
setEndDate
(
req
.
getEndDate
());
// 结束时间
employeeQueryParams
.
setEndDate
(
req
.
getEndDate
());
// 结束时间
employeeQueryParams
.
setItemCodes
(
employeeItemCodes
);
// 多个指标编码,用逗号隔开
employeeQueryParams
.
setItemCodes
(
employeeItemCodes
);
// 多个指标编码,用逗号隔开
employeeQueryParams
.
setBrandIds
(
environment
.
getProperty
(
"bi.default.brandIds"
)==
null
?
"-1,-2,-4,3454"
:
environment
.
getProperty
(
"bi.default.brandIds"
));
String
employeeJsonBody
=
cn
.
hutool
.
json
.
JSONUtil
.
toJsonStr
(
employeeQueryParams
);
String
employeeJsonBody
=
JSONUtil
.
toJsonStr
(
employeeQueryParams
);
DataResp
<
List
<
DataBusinessDTO
>>
employeeDataResp
=
getDataStatsService
.
getListDataResp
(
employeeJsonBody
);
DataResp
<
List
<
DataBusinessDTO
>>
employeeDataResp
=
getDataStatsService
.
getListDataResp
(
employeeJsonBody
);
if
(
employeeDataResp
!=
null
&&
employeeDataResp
.
getContent
()
!=
null
&&
!
employeeDataResp
.
getContent
().
isEmpty
())
{
if
(
employeeDataResp
!=
null
&&
employeeDataResp
.
getContent
()
!=
null
&&
!
employeeDataResp
.
getContent
().
isEmpty
())
{
for
(
cn
.
com
.
glsx
.
dj
.
supervisor
.
model
.
DataBusinessDTO
employeeData
:
employeeDataResp
.
getContent
())
{
for
(
DataBusinessDTO
employeeData
:
employeeDataResp
.
getContent
())
{
employeeMetrics
.
put
(
employeeData
.
getItemCode
(),
employeeData
.
getItemValue
());
employeeMetrics
.
put
(
employeeData
.
getItemCode
(),
employeeData
.
getItemValue
());
employeeRates
.
put
(
employeeData
.
getItemCode
(),
employeeData
.
getRate
());
// 环比
employeeRates
.
put
(
employeeData
.
getItemCode
(),
employeeData
.
getRate
());
// 环比
}
}
...
@@ -1461,6 +1479,7 @@ public class SupervisorDashboardService {
...
@@ -1461,6 +1479,7 @@ public class SupervisorDashboardService {
behaviorReq
.
setBizs
(
req
.
getBizs
());
behaviorReq
.
setBizs
(
req
.
getBizs
());
behaviorReq
.
setStartDate
(
req
.
getStartDate
());
behaviorReq
.
setStartDate
(
req
.
getStartDate
());
behaviorReq
.
setEndDate
(
req
.
getEndDate
());
behaviorReq
.
setEndDate
(
req
.
getEndDate
());
EmployeeBehaviorDTO
behaviorData
=
getEmployeeBehaviorData
(
behaviorReq
);
EmployeeBehaviorDTO
behaviorData
=
getEmployeeBehaviorData
(
behaviorReq
);
String
dailyPerformanceRate
=
"0%"
;
String
dailyPerformanceRate
=
"0%"
;
if
(
behaviorData
!=
null
&&
behaviorData
.
getDailyReport
()
!=
null
)
{
if
(
behaviorData
!=
null
&&
behaviorData
.
getDailyReport
()
!=
null
)
{
...
@@ -1536,6 +1555,11 @@ public class SupervisorDashboardService {
...
@@ -1536,6 +1555,11 @@ public class SupervisorDashboardService {
req
.
getMerchantIds
(),
req
.
getMerchantIds
(),
req
.
getBizs
()
req
.
getBizs
()
);
);
if
(
CollectionUtils
.
isEmpty
(
transferRecords
)){
transferRecords
=
businessSceneMapper
.
findRecordsByPhoneNumber
(
req
.
getPhoneNumber
());
}
log
.
info
(
"获取员工调店记录成功,共 {} 条"
,
transferRecords
.
size
());
log
.
info
(
"获取员工调店记录成功,共 {} 条"
,
transferRecords
.
size
());
return
transferRecords
;
return
transferRecords
;
...
...
rpc-dj-supervisor/src/main/resources/META-INF/orm/BusinessSceneMapper.xml
View file @
5e07bf1
...
@@ -270,5 +270,16 @@
...
@@ -270,5 +270,16 @@
WHERE
WHERE
d.o_id = #{oid}
d.o_id = #{oid}
</select>
</select>
<select
id=
"findRecordsByPhoneNumber"
resultType=
"cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferDTO"
>
\
SELECT
t1.staff_phone AS phoneNumber,
t1.merchant_id AS merchantId,
t1.merchant_name AS merchantName,
t1.staff_uuid as employeeId
from dj_car_life_staff_account_record t1
WHERE t1.staff_phone = #{phoneNumber}
ORDER BY t1.updated_date DESC limit 1
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
rpc-dj-supervisor/src/main/resources/META-INF/orm/ExcellentCaseReviewMapper.xml
View file @
5e07bf1
...
@@ -112,13 +112,17 @@
...
@@ -112,13 +112,17 @@
FROM reception_customer_info t1
FROM reception_customer_info t1
LEFT JOIN inspection_badge_recordings t2 ON t1.id = t2.reception_id
LEFT JOIN inspection_badge_recordings t2 ON t1.id = t2.reception_id
LEFT JOIN inspection_conversation_batch t3 ON t3.record_id=t2.id
LEFT JOIN inspection_conversation_batch t3 ON t3.record_id=t2.id
LEFT JOIN inspection_defence t5 ON
t3.id =t5.batch_id
LEFT JOIN inspection_defence t5 ON
(t3.id =t5.batch_id and t5.deleted_flag = 'N')
LEFT JOIN dj_car_life_service_merchant t6 ON t1.merchant_id = t6.merchant_id
LEFT JOIN dj_car_life_service_merchant t6 ON t1.merchant_id = t6.merchant_id
LEFT JOIN dj_car_life_staff_info t8 ON t1.staff_uuid = t8.staff_uuid
RIGHT JOIN excellent_case_review t7 ON t7.recording_id = t2.id
RIGHT JOIN excellent_case_review t7 ON t7.recording_id = t2.id
WHERE t7.deleted_flag = 'N'
WHERE t7.deleted_flag = 'N'
<if
test=
"query.merchantId != null"
>
<if
test=
"query.merchantId != null"
>
and t6.merchant_id = #{query.merchantId}
and t6.merchant_id = #{query.merchantId}
</if>
</if>
<if
test=
"query.staffName != null and query.staffName != ''"
>
and t8.staff_name like CONCAT('%', #{query.staffName}, '%')
</if>
<if
test=
"query.merchantName != null and query.merchantName != ''"
>
<if
test=
"query.merchantName != null and query.merchantName != ''"
>
and t6.merchant_name like CONCAT('%', #{query.merchantName}, '%')
and t6.merchant_name like CONCAT('%', #{query.merchantName}, '%')
</if>
</if>
...
...
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemoteImplTest.java
View file @
5e07bf1
...
@@ -38,6 +38,7 @@ public class ExcellentCaseReviewRemoteImplTest extends BaseServiceTest {
...
@@ -38,6 +38,7 @@ public class ExcellentCaseReviewRemoteImplTest extends BaseServiceTest {
public
void
testQueryExcellentCaseList
()
{
public
void
testQueryExcellentCaseList
()
{
RpcPagination
<
ExcellentCaseReviewQueryDTO
>
request
=
new
RpcPagination
<>();
RpcPagination
<
ExcellentCaseReviewQueryDTO
>
request
=
new
RpcPagination
<>();
ExcellentCaseReviewQueryDTO
condition
=
new
ExcellentCaseReviewQueryDTO
();
ExcellentCaseReviewQueryDTO
condition
=
new
ExcellentCaseReviewQueryDTO
();
condition
.
setStaffName
(
"陈希1"
);
request
.
setCondition
(
condition
);
request
.
setCondition
(
condition
);
RpcResponse
response
=
excellentCaseReviewRemote
.
queryExcellentCaseList
(
request
);
RpcResponse
response
=
excellentCaseReviewRemote
.
queryExcellentCaseList
(
request
);
System
.
out
.
println
(
JSON
.
toJSONString
(
response
));
System
.
out
.
println
(
JSON
.
toJSONString
(
response
));
...
...
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/remote/SupervisorDashboardRemoteImplTest.java
View file @
5e07bf1
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
remote
;
package
cn
.
com
.
glsx
.
dj
.
supervisor
.
remote
;
import
cn.com.glsx.dj.supervisor.dto.*
;
import
cn.com.glsx.dj.supervisor.dto.DashboardQueryReq
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeBasicInfoDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeBasicInfoReq
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeBehaviorDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeBehaviorReq
;
import
cn.com.glsx.dj.supervisor.dto.EmployeePerformanceDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeePerformanceReq
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferDTO
;
import
cn.com.glsx.dj.supervisor.dto.EmployeeStoreTransferReq
;
import
cn.com.glsx.dj.supervisor.dto.RecordingListDTO
;
import
cn.com.glsx.dj.supervisor.dto.RecordingQueryReq
;
import
cn.com.glsx.dj.supervisor.dto.SupervisorDashboardVO
;
import
cn.com.glsx.dj.supervisor.service.BaseServiceTest
;
import
cn.com.glsx.dj.supervisor.service.BaseServiceTest
;
import
cn.com.glsx.dj.supervisor.service.SupervisorDashboardService
;
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.exception.RpcServiceException
;
import
cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO
;
import
cn.com.glsx.merchants.remote.MerchantUserRemote
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
java.util.List
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @Title:
* @Title:
* @Description:
* @Description:
...
@@ -31,10 +34,9 @@ public class SupervisorDashboardRemoteImplTest extends BaseServiceTest {
...
@@ -31,10 +34,9 @@ public class SupervisorDashboardRemoteImplTest extends BaseServiceTest {
public
void
testGetDashboardData
()
{
public
void
testGetDashboardData
()
{
DashboardQueryReq
req
=
new
DashboardQueryReq
();
DashboardQueryReq
req
=
new
DashboardQueryReq
();
req
.
setSupervisorId
(
"63c121922cba4956b2aac3f21dacd92f"
);
req
.
setSupervisorId
(
"63c121922cba4956b2aac3f21dacd92f"
);
req
.
setStartDate
(
"2026-03-01"
);
req
.
setStartDate
(
"2026-03-20"
);
req
.
setEndDate
(
"2026-03-16"
);
req
.
setEndDate
(
"2026-03-20"
);
req
.
setBizs
(
2
);
req
.
setDateType
(
0
);
req
.
setDateType
(
4
);
req
.
setNeedAiAnalysis
(
true
);
req
.
setNeedAiAnalysis
(
true
);
RpcResponse
<
SupervisorDashboardVO
>
response
=
supervisorDashboardRemote
.
getDashboardData
(
req
);
RpcResponse
<
SupervisorDashboardVO
>
response
=
supervisorDashboardRemote
.
getDashboardData
(
req
);
System
.
out
.
println
(
JSON
.
toJSONString
(
response
));
System
.
out
.
println
(
JSON
.
toJSONString
(
response
));
...
@@ -89,7 +91,7 @@ public class SupervisorDashboardRemoteImplTest extends BaseServiceTest {
...
@@ -89,7 +91,7 @@ public class SupervisorDashboardRemoteImplTest extends BaseServiceTest {
@Test
@Test
public
void
testGetEmployeeStoreTransferRecords
()
{
public
void
testGetEmployeeStoreTransferRecords
()
{
EmployeeStoreTransferReq
req
=
new
EmployeeStoreTransferReq
();
EmployeeStoreTransferReq
req
=
new
EmployeeStoreTransferReq
();
req
.
setPhoneNumber
(
"13
132112126
"
);
req
.
setPhoneNumber
(
"13
510709444
"
);
RpcResponse
<
List
<
EmployeeStoreTransferDTO
>>
response
=
supervisorDashboardRemote
.
getEmployeeStoreTransferRecords
(
req
);
RpcResponse
<
List
<
EmployeeStoreTransferDTO
>>
response
=
supervisorDashboardRemote
.
getEmployeeStoreTransferRecords
(
req
);
System
.
out
.
println
(
JSON
.
toJSONString
(
response
));
System
.
out
.
println
(
JSON
.
toJSONString
(
response
));
}
}
...
...
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