Browse Source

Merge remote-tracking branch 'origin/dev_bugfix_ljj' into dev_bugfix_ljj

dev_shibei_match
jianjun 4 years ago
parent
commit
d498bcccfb
  1. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

4
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

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

Loading…
Cancel
Save