|
|
@ -299,7 +299,7 @@ public class EpmetUserServiceImpl implements EpmetUserService { |
|
|
|
List<CustomerStaffDTO> staffList = new ArrayList<>(); |
|
|
|
//2-1.按名字检索时先查询人员基础信息
|
|
|
|
if (!StringUtils.isEmpty(formDTO.getStaffName())) { |
|
|
|
staffList = customerStaffDao.selectByStaffIds(null, formDTO.getStaffName()); |
|
|
|
staffList = customerStaffDao.selectByStaffIds(formDTO.getCustomerId(), null, formDTO.getStaffName()); |
|
|
|
if (!CollectionUtils.isEmpty(staffList)) { |
|
|
|
formDTO.setStaffId(staffList.get(0).getUserId()); |
|
|
|
}else { |
|
|
@ -311,7 +311,7 @@ public class EpmetUserServiceImpl implements EpmetUserService { |
|
|
|
//2-3.查询人员基本信息【之前sql关联人员表查性别、姓名效率低 所以分开查)
|
|
|
|
if (CollectionUtils.isEmpty(staffList)) { |
|
|
|
List<String> staffIdList = resultList.stream().map(StaffListResultDTO::getStaffId).collect(Collectors.toList()); |
|
|
|
staffList = customerStaffDao.selectByStaffIds(staffIdList, null); |
|
|
|
staffList = customerStaffDao.selectByStaffIds(formDTO.getCustomerId(), staffIdList, null); |
|
|
|
} |
|
|
|
|
|
|
|
//3.封装数据并返回
|
|
|
|