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 71c53674
authored
Apr 01, 2026
by
庞善天
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
指定部门推送指定人员名单
1 parent
94c63432
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
1 deletions
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/meituan/DeptStaffDTO.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/job/MeiTuanDeptMonthlyReportJob.java
rpc-dj-staff-api/src/main/java/cn/com/glsx/dj/staff/dto/meituan/DeptStaffDTO.java
0 → 100644
View file @
71c5367
package
cn
.
com
.
glsx
.
dj
.
staff
.
dto
.
meituan
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
DeptStaffDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"部门名称"
)
private
String
deptName
;
@ApiModelProperty
(
"员工列表"
)
private
List
<
Staff
>
staffList
;
/**
* 员工类
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
static
class
Staff
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"员工姓名"
)
private
String
staffName
;
@ApiModelProperty
(
"员工手机号"
)
private
String
staffPhone
;
}
}
\ No newline at end of file
\ No newline at end of file
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/job/MeiTuanDeptMonthlyReportJob.java
View file @
71c5367
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.job;
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.staff.job;
import
cn.com.glsx.dj.staff.dto.WechatMessageSendDTO
;
import
cn.com.glsx.dj.staff.dto.WechatMessageSendDTO
;
import
cn.com.glsx.dj.staff.dto.meituan.DeptMonthlyReportDTO
;
import
cn.com.glsx.dj.staff.dto.meituan.DeptMonthlyReportDTO
;
import
cn.com.glsx.dj.staff.dto.meituan.DeptStaffDTO
;
import
cn.com.glsx.dj.staff.enums.MeituanPushStatusEnum
;
import
cn.com.glsx.dj.staff.enums.MeituanPushStatusEnum
;
import
cn.com.glsx.dj.staff.enums.MeituanPushTypeEnum
;
import
cn.com.glsx.dj.staff.enums.MeituanPushTypeEnum
;
import
cn.com.glsx.dj.staff.model.StaffMeituanPushLog
;
import
cn.com.glsx.dj.staff.model.StaffMeituanPushLog
;
...
@@ -22,7 +23,11 @@ import org.springframework.stereotype.Service;
...
@@ -22,7 +23,11 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 每月1号上午10点15分定时任务推送美团消费部门月度报告
* 每月1号上午10点15分定时任务推送美团消费部门月度报告
...
@@ -80,6 +85,25 @@ public class MeiTuanDeptMonthlyReportJob implements SimpleJob {
...
@@ -80,6 +85,25 @@ public class MeiTuanDeptMonthlyReportJob implements SimpleJob {
String
personHrList
=
env
.
getProperty
(
"staff.meituan.order.send.hr.person"
,
String
.
class
);
String
personHrList
=
env
.
getProperty
(
"staff.meituan.order.send.hr.person"
,
String
.
class
);
log
.
info
(
"推送hr人员名单:{}"
,
personHrList
);
log
.
info
(
"推送hr人员名单:{}"
,
personHrList
);
String
deptPersonList
=
env
.
getProperty
(
"staff.meituan.order.send.dept.person"
,
String
.
class
);
log
.
info
(
"推送指定部门人员名单:{}"
,
deptPersonList
);
List
<
DeptStaffDTO
>
deptStaffDTOList
=
Collections
.
emptyList
();
if
(!
StringUtils
.
isEmpty
(
deptPersonList
))
{
try
{
deptStaffDTOList
=
JSON
.
parseArray
(
deptPersonList
,
DeptStaffDTO
.
class
);
}
catch
(
Exception
e
)
{
log
.
error
(
"解析配置的部门人员名单失败: {}"
,
deptPersonList
,
e
);
}
}
Map
<
String
,
List
<
DeptStaffDTO
.
Staff
>>
deptStaffMap
=
new
HashMap
<>();
if
(!
CollectionUtils
.
isEmpty
(
deptStaffDTOList
))
{
for
(
DeptStaffDTO
deptStaffDTO
:
deptStaffDTOList
)
{
deptStaffMap
.
computeIfAbsent
(
deptStaffDTO
.
getDeptName
(),
k
->
new
ArrayList
<>()).
addAll
(
deptStaffDTO
.
getStaffList
());
}
}
int
pushCount
=
0
;
int
pushCount
=
0
;
for
(
DeptMonthlyReportDTO
dto
:
reportList
)
{
for
(
DeptMonthlyReportDTO
dto
:
reportList
)
{
Long
directOrgId
=
dto
.
getDirectOrgId
();
Long
directOrgId
=
dto
.
getDirectOrgId
();
...
@@ -87,7 +111,17 @@ public class MeiTuanDeptMonthlyReportJob implements SimpleJob {
...
@@ -87,7 +111,17 @@ public class MeiTuanDeptMonthlyReportJob implements SimpleJob {
List
<
StaffUniqueMarkInfo
>
staffUniqueMarkInfos
=
meiTuanOrderManager
.
obtainDeptList
(
directOrgId
);
List
<
StaffUniqueMarkInfo
>
staffUniqueMarkInfos
=
meiTuanOrderManager
.
obtainDeptList
(
directOrgId
);
if
(
CollectionUtils
.
isEmpty
(
staffUniqueMarkInfos
)){
if
(
CollectionUtils
.
isEmpty
(
staffUniqueMarkInfos
)){
log
.
info
(
"根据部门id查询不到对应的部门主管,directOrgId:{}"
,
directOrgId
);
log
.
info
(
"根据部门id查询不到对应的部门主管,directOrgId:{}"
,
directOrgId
);
continue
;
staffUniqueMarkInfos
=
new
ArrayList
<>();
}
List
<
DeptStaffDTO
.
Staff
>
extraStaffList
=
deptStaffMap
.
get
(
directOrgName
);
if
(!
CollectionUtils
.
isEmpty
(
extraStaffList
))
{
for
(
DeptStaffDTO
.
Staff
staff
:
extraStaffList
)
{
StaffUniqueMarkInfo
markInfo
=
new
StaffUniqueMarkInfo
();
markInfo
.
setStaffName
(
staff
.
getStaffName
());
markInfo
.
setStaffIdentifier
(
staff
.
getStaffPhone
());
staffUniqueMarkInfos
.
add
(
markInfo
);
}
}
}
if
(!
StringUtils
.
isEmpty
(
personHrList
)){
if
(!
StringUtils
.
isEmpty
(
personHrList
)){
...
...
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