Commit 5aaac761 by 范富荣

Revert "feat: 美团月度部门报告新增二级部门推送人"

This reverts commit 536443e33729b3e779a03ff48f3a643ff4e4c3c7.
1 parent 0d4f27a3
...@@ -33,9 +33,6 @@ public class DeptMonthlyReportDTO implements Serializable { ...@@ -33,9 +33,6 @@ public class DeptMonthlyReportDTO implements Serializable {
@ApiModelProperty("部门名称") @ApiModelProperty("部门名称")
private String directOrgName; private String directOrgName;
@ApiModelProperty("部门名称路径")
private String orgNamePath;
@ApiModelProperty("部门报告统计详情") @ApiModelProperty("部门报告统计详情")
private DeptReportDetailDTO reportDetail; private DeptReportDetailDTO reportDetail;
......
...@@ -104,26 +104,6 @@ public class MeiTuanDeptMonthlyReportJob implements SimpleJob { ...@@ -104,26 +104,6 @@ public class MeiTuanDeptMonthlyReportJob implements SimpleJob {
} }
} }
// 读取二级部门负责人配置
String level2DeptPersonList = env.getProperty("staff.meituan.order.send.level2dept.person", String.class);
log.info("推送二级部门负责人名单:{}", level2DeptPersonList);
List<DeptStaffDTO> level2DeptStaffDTOList = Collections.emptyList();
if (!StringUtils.isEmpty(level2DeptPersonList)) {
try {
level2DeptStaffDTOList = JSON.parseArray(level2DeptPersonList, DeptStaffDTO.class);
} catch (Exception e) {
log.error("解析配置的二级部门负责人名单失败: {}", level2DeptPersonList, e);
}
}
Map<String, List<DeptStaffDTO.Staff>> level2DeptStaffMap = new HashMap<>();
if (!CollectionUtils.isEmpty(level2DeptStaffDTOList)) {
for (DeptStaffDTO deptStaffDTO : level2DeptStaffDTOList) {
level2DeptStaffMap.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();
...@@ -144,30 +124,6 @@ public class MeiTuanDeptMonthlyReportJob implements SimpleJob { ...@@ -144,30 +124,6 @@ public class MeiTuanDeptMonthlyReportJob implements SimpleJob {
} }
} }
// 匹配二级部门负责人
String orgNamePath = dto.getOrgNamePath();
String level2DeptName = "";
if (!StringUtils.isEmpty(orgNamePath) && orgNamePath.contains("-")) {
String[] parts = orgNamePath.split("-");
level2DeptName = parts[parts.length - 1].trim();
}
List<DeptStaffDTO.Staff> level2DeptStaffList = new ArrayList<>();
if (!StringUtils.isEmpty(level2DeptName) && !CollectionUtils.isEmpty(level2DeptStaffMap)) {
for (Map.Entry<String, List<DeptStaffDTO.Staff>> entry : level2DeptStaffMap.entrySet()) {
if (level2DeptName.contains(entry.getKey())) {
level2DeptStaffList.addAll(entry.getValue());
}
}
}
if (!CollectionUtils.isEmpty(level2DeptStaffList)) {
for (DeptStaffDTO.Staff staff : level2DeptStaffList) {
StaffUniqueMarkInfo markInfo = new StaffUniqueMarkInfo();
markInfo.setStaffName(staff.getStaffName());
markInfo.setStaffIdentifier(staff.getStaffPhone());
staffUniqueMarkInfos.add(markInfo);
}
}
if (!StringUtils.isEmpty(personHrList)){ if (!StringUtils.isEmpty(personHrList)){
String[] persons = personHrList.split(","); String[] persons = personHrList.split(",");
for (String person : persons) { for (String person : persons) {
......
...@@ -744,7 +744,6 @@ public class StaffMeituanOrderService { ...@@ -744,7 +744,6 @@ public class StaffMeituanOrderService {
if (deptName == null) { if (deptName == null) {
deptName = ""; deptName = "";
} }
String orgNamePath = lastDeptOrders.get(0).getOrgNamePath();
int monthValue = lastMonth.getMonthValue(); int monthValue = lastMonth.getMonthValue();
int monthStartDay = 1; int monthStartDay = 1;
...@@ -963,7 +962,6 @@ public class StaffMeituanOrderService { ...@@ -963,7 +962,6 @@ public class StaffMeituanOrderService {
return DeptMonthlyReportDTO.builder() return DeptMonthlyReportDTO.builder()
.directOrgId(directOrgId) .directOrgId(directOrgId)
.directOrgName(deptName) .directOrgName(deptName)
.orgNamePath(orgNamePath)
.reportDetail(reportDetail) .reportDetail(reportDetail)
.focusIssues(focusIssues) .focusIssues(focusIssues)
.build(); .build();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!