Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-staff
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 87d43ece
authored
Jan 23, 2026
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
申诉单管理
1 parent
df624291
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
11 deletions
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/StaffSalaryAppealApplyRecordMapper.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/StaffSalaryAppealApplyRecordService.java
rpc-dj-staff/src/main/resources/META-INF/orm/StaffSalaryAppealApplyRecordMapper.xml
rpc-dj-staff/src/test/java/cn/com/glsx/dj/staff/service/StaffSalaryAppealApplyRecordServiceTest.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/mapper/StaffSalaryAppealApplyRecordMapper.java
View file @
87d43ec
...
...
@@ -3,9 +3,11 @@ package cn.com.glsx.dj.staff.mapper;
import
cn.com.glsx.dj.staff.dto.StaffSalaryAppealApplyRecordDTO
;
import
cn.com.glsx.dj.staff.model.StaffSalaryAppealApplyRecord
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.oreframework.datasource.mybatis.mapper.OreMapper
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
public
interface
StaffSalaryAppealApplyRecordMapper
extends
OreMapper
<
StaffSalaryAppealApplyRecord
>
{
...
...
@@ -21,7 +23,23 @@ public interface StaffSalaryAppealApplyRecordMapper extends OreMapper<StaffSalar
List
<
StaffSalaryAppealApplyRecordDTO
>
replyRecordList
(
StaffSalaryAppealApplyRecordDTO
condition
);
/**
* web后台分页查询申诉记录
* web分页查询申诉
* @param condition
* @return
*/
List
<
StaffSalaryAppealApplyRecordDTO
>
webPageList
(
StaffSalaryAppealApplyRecordDTO
condition
);
/**
* 批量查询员工的门店信息
* @param phoneList 手机号列表
* @return Map<手机号, 门店信息列表>
*/
List
<
Map
<
String
,
Object
>>
batchSelectMerchantInfoByPhones
(
@Param
(
"phoneList"
)
List
<
String
>
phoneList
);
/**
* 批量查询员工的场景标签
* @param phoneList 手机号列表
* @return Map<手机号, 场景标签>
*/
List
<
Map
<
String
,
Object
>>
batchSelectSceneLabelByPhones
(
@Param
(
"phoneList"
)
List
<
String
>
phoneList
);
}
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/StaffSalaryAppealApplyRecordService.java
View file @
87d43ec
...
...
@@ -5,6 +5,7 @@ import cn.com.glsx.dj.smartcarlife.dto.StaffOrderStatDTO;
import
cn.com.glsx.dj.smartcarlife.model.StaffConfig
;
import
cn.com.glsx.dj.smartcarlife.remote.StaffBaseInfoRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.StaffDailyReportRemote
;
import
cn.com.glsx.dj.staff.dto.MerchantInfo
;
import
cn.com.glsx.dj.staff.dto.SalaryAppealApplyAttachmentDTO
;
import
cn.com.glsx.dj.staff.dto.StaffSalaryAppealApplyRecordDTO
;
import
cn.com.glsx.dj.staff.dto.performance.PerformanceTimeCycleDTO
;
...
...
@@ -217,7 +218,67 @@ public class StaffSalaryAppealApplyRecordService {
log
.
info
(
"webPageList start, pagination:{}"
,
pagination
);
try
{
Page
<
StaffSalaryAppealApplyRecordDTO
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
(),
pagination
.
isNeedCount
());
staffSalaryAppealApplyRecordMapper
.
webPageList
(
pagination
.
getCondition
());
List
<
StaffSalaryAppealApplyRecordDTO
>
list
=
staffSalaryAppealApplyRecordMapper
.
webPageList
(
pagination
.
getCondition
());
// 批量填充门店信息和场景类型列表
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
// 收集所有手机号
List
<
String
>
phoneList
=
list
.
stream
()
.
map
(
StaffSalaryAppealApplyRecordDTO:
:
getStaffPhone
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
// 批量查询门店信息
List
<
Map
<
String
,
Object
>>
merchantMapList
=
staffSalaryAppealApplyRecordMapper
.
batchSelectMerchantInfoByPhones
(
phoneList
);
Map
<
String
,
List
<
MerchantInfo
>>
phoneToMerchantsMap
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
merchantMapList
)
{
String
phone
=
(
String
)
map
.
get
(
"phoneNumber"
);
Integer
merchantId
=
(
Integer
)
map
.
get
(
"merchantId"
);
String
merchantName
=
(
String
)
map
.
get
(
"merchantName"
);
MerchantInfo
merchantInfo
=
new
MerchantInfo
();
merchantInfo
.
setMerchantId
(
merchantId
);
merchantInfo
.
setMerchantName
(
merchantName
);
phoneToMerchantsMap
.
computeIfAbsent
(
phone
,
k
->
new
ArrayList
<>()).
add
(
merchantInfo
);
}
// 批量查询场景标签
List
<
Map
<
String
,
Object
>>
sceneLabelMapList
=
staffSalaryAppealApplyRecordMapper
.
batchSelectSceneLabelByPhones
(
phoneList
);
Map
<
String
,
List
<
Integer
>>
phoneToSceneTypesMap
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
sceneLabelMapList
)
{
String
phone
=
(
String
)
map
.
get
(
"phoneNumber"
);
String
sceneLabel
=
(
String
)
map
.
get
(
"sceneLabel"
);
if
(
sceneLabel
!=
null
&&
!
sceneLabel
.
isEmpty
())
{
// 合并同一手机号的多个场景标签,去重
Set
<
Integer
>
sceneTypeSet
=
phoneToSceneTypesMap
.
computeIfAbsent
(
phone
,
k
->
new
ArrayList
<>())
.
stream
().
collect
(
Collectors
.
toSet
());
// 解析逗号分隔的场景标签
String
[]
sceneArr
=
sceneLabel
.
split
(
","
);
for
(
String
scene
:
sceneArr
)
{
scene
=
scene
.
trim
();
if
(!
scene
.
isEmpty
())
{
try
{
sceneTypeSet
.
add
(
Integer
.
parseInt
(
scene
));
}
catch
(
NumberFormatException
e
)
{
log
.
warn
(
"场景标签解析失败: phone={}, scene={}"
,
phone
,
scene
);
}
}
}
phoneToSceneTypesMap
.
put
(
phone
,
new
ArrayList
<>(
sceneTypeSet
));
}
}
// 填充数据到DTO
for
(
StaffSalaryAppealApplyRecordDTO
dto
:
list
)
{
String
phone
=
dto
.
getStaffPhone
();
dto
.
setMerchantInfoList
(
phoneToMerchantsMap
.
getOrDefault
(
phone
,
new
ArrayList
<>()));
dto
.
setSceneTypeList
(
phoneToSceneTypesMap
.
getOrDefault
(
phone
,
new
ArrayList
<>()));
}
}
return
page
;
}
catch
(
Exception
e
)
{
log
.
error
(
"webPageList error"
,
e
);
...
...
rpc-dj-staff/src/main/resources/META-INF/orm/StaffSalaryAppealApplyRecordMapper.xml
View file @
87d43ec
...
...
@@ -89,15 +89,6 @@
<if
test=
"appealType != null"
>
AND appeal_type = #{appealType}
</if>
<if
test=
"sceneType != null"
>
AND scene_type = #{sceneType}
</if>
<if
test=
"merchantIdList != null and merchantIdList.size() > 0"
>
AND merchant_id IN
<foreach
collection=
"merchantIdList"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"staffName != null and staffName != ''"
>
AND staff_name LIKE CONCAT('%', #{staffName}, '%')
</if>
...
...
@@ -116,7 +107,70 @@
<if
test=
"appealMonthEnd != null and appealMonthEnd != ''"
>
AND appeal_month
<
= #{appealMonthEnd}
</if>
<if
test=
"merchantIdList != null and merchantIdList.size() > 0"
>
AND EXISTS (
SELECT 1
FROM dj_car_life_staff_info dclsi
LEFT JOIN dj_car_life_scene_merchant_ref dclsmr
ON dclsi.merchant_id = dclsmr.sub_merchant_id
AND dclsmr.sub_merchant_type IN (6, 8)
AND dclsmr.deleted_flag = 'N'
WHERE dclsi.phone_number = dj_car_life_staff_salary_appeal_apply_record.staff_phone
AND dclsi.deleted_flag = 'N'
AND dclsmr.main_merchant_id IN
<foreach
collection=
"merchantIdList"
item=
"merchantId"
open=
"("
separator=
","
close=
")"
>
#{merchantId}
</foreach>
)
</if>
<if
test=
"sceneTypeList != null and sceneTypeList.size() > 0"
>
AND EXISTS (
SELECT 1
FROM dj_car_life_staff_info dclsi
WHERE dclsi.phone_number = dj_car_life_staff_salary_appeal_apply_record.staff_phone
AND dclsi.deleted_flag = 'N'
AND (
<foreach
collection=
"sceneTypeList"
item=
"sceneType"
separator=
"OR"
>
FIND_IN_SET(#{sceneType}, dclsi.staff_scene_label) > 0
</foreach>
)
)
</if>
ORDER BY created_date DESC
</select>
<!-- 批量查询员工的门店信息 -->
<select
id=
"batchSelectMerchantInfoByPhones"
resultType=
"java.util.HashMap"
>
SELECT
dclsi.phone_number AS phoneNumber,
dclsmr.main_merchant_id AS merchantId,
dclsmr.main_merchant_name AS merchantName
FROM dj_car_life_staff_info dclsi
LEFT JOIN dj_car_life_scene_merchant_ref dclsmr
ON dclsi.merchant_id = dclsmr.sub_merchant_id
AND dclsmr.sub_merchant_type IN (6, 8)
AND dclsmr.deleted_flag = 'N'
WHERE dclsi.phone_number IN
<foreach
collection=
"phoneList"
item=
"phone"
open=
"("
separator=
","
close=
")"
>
#{phone}
</foreach>
AND dclsi.deleted_flag = 'N'
AND dclsmr.main_merchant_id IS NOT NULL
</select>
<!-- 批量查询员工的场景标签 -->
<select
id=
"batchSelectSceneLabelByPhones"
resultType=
"java.util.HashMap"
>
SELECT
phone_number AS phoneNumber,
staff_scene_label AS sceneLabel
FROM dj_car_life_staff_info
WHERE phone_number IN
<foreach
collection=
"phoneList"
item=
"phone"
open=
"("
separator=
","
close=
")"
>
#{phone}
</foreach>
AND deleted_flag = 'N'
AND staff_scene_label IS NOT NULL
AND staff_scene_label != ''
</select>
</mapper>
\ No newline at end of file
rpc-dj-staff/src/test/java/cn/com/glsx/dj/staff/service/StaffSalaryAppealApplyRecordServiceTest.java
0 → 100644
View file @
87d43ec
This diff is collapsed.
Click to expand it.
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