Commit 9a79d868 by zhouhaibao

[+]驻店员工逻辑调整

1 parent 4ef68d20
...@@ -54,16 +54,17 @@ public class SupervisorEmployeeTrainingInfoService { ...@@ -54,16 +54,17 @@ public class SupervisorEmployeeTrainingInfoService {
} }
// 2、根据督导uuid和业务类型,获取督导下所有门店及员工信息 // 2、根据督导uuid和业务类型,获取督导下所有门店及员工信息
Map<Integer, List<EmployeeRanking>> storeEmployeeMap = List<Integer> merchantIds = supervisorDashboardService.getSupervisorMerchants(supervisorUUID);
supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList(supervisorUUID, request.getBusinessType());
if (CollectionUtils.isEmpty(storeEmployeeMap)) { List<EmployeeRanking> supervisorStoreAndEmployeePhoneList = supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList(
supervisorUUID, merchantIds);
if (CollectionUtils.isEmpty(supervisorStoreAndEmployeePhoneList)) {
log.warn("督导下没有员工信息,supervisorPhone={}", request.getSupervisorPhone()); log.warn("督导下没有员工信息,supervisorPhone={}", request.getSupervisorPhone());
return new ArrayList<>(); return new ArrayList<>();
} }
// 3、提取全部员工手机号(去重) // 3、提取全部员工手机号(去重)
List<String> phoneList = storeEmployeeMap.values().stream() List<String> phoneList = supervisorStoreAndEmployeePhoneList.stream()
.flatMap(List::stream)
.map(EmployeeRanking::getEmployeePhone) .map(EmployeeRanking::getEmployeePhone)
.filter(phone -> phone != null && !phone.isEmpty()) .filter(phone -> phone != null && !phone.isEmpty())
.distinct() .distinct()
......
...@@ -21,7 +21,6 @@ public class SupervisorDashboardServiceTest extends BaseServiceTest { ...@@ -21,7 +21,6 @@ public class SupervisorDashboardServiceTest extends BaseServiceTest {
@Test @Test
public void testGetSupervisorStoreAndEmployeePhoneList() { public void testGetSupervisorStoreAndEmployeePhoneList() {
Map<Integer, List<EmployeeRanking>> employeePhoneList = supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList("63c121922cba4956b2aac3f21dacd92f", null); supervisorDashboardService.getSupervisorStoreAndEmployeePhoneList("63c121922cba4956b2aac3f21dacd92f", null);
TestCase.assertNotNull(employeePhoneList);
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!