Commit 9422fd78 by 丁伟峰

Merge branch 'feature-dingwf-0715' into develop

2 parents 5984a8cb f4e9243d
......@@ -46,9 +46,10 @@ public class EngineerGanttServiceImpl implements EngineerGanttService {
// 按日期返回技术员们当天的服务甘特图,不需要翻页
log.info("getEngineersGanttList: {}", reqDTO);
List<String> engineerCodes = reqDTO.getEngineerCodes();
if (engineerCodes == null || engineerCodes.size() > 0) {
if (engineerCodes == null || engineerCodes.size() == 0) {
// 需要根据levelType/levelValue/brandIds/branchIds/groupIds/teamIds/key,后端查询匹配
engineerCodes = findEngineers(reqDTO.getLevelType(), reqDTO.getLevelValue(), reqDTO.getBranchIds(), reqDTO.getGroupIds(), reqDTO.getTeamIds(), reqDTO.getKey());
log.info("根据多条件,查询返回符合条件的技术员列表:{}", engineerCodes);
}
List<OrderAppointmentEntity> orderAppointments = orderAppointmentDao.findByDateAndEngineerCodeIn(reqDTO.getDate(), engineerCodes);
......@@ -122,10 +123,14 @@ public class EngineerGanttServiceImpl implements EngineerGanttService {
} else {
engineerCodes.addAll(engineerUtil.getEngineersByLevel(levelType, levelValue).stream().map(EngineerInfoEntity::getEngineerCode).collect(Collectors.toList()));
}
// 最后,还需要根据key进行过滤(需要结合数据库表)
engineerCodes = new ArrayList<>(new HashSet<>(engineerCodes));
if (StringUtils.isBlank(key)) {
return engineerCodes;
} else {
// 最后,还需要根据key进行过滤(需要结合数据库表)
return engineerUtil.filterEngineersByKey(engineerCodes, key).stream().map(EngineerInfoEntity::getEngineerCode).collect(Collectors.toList());
}
}
public Map<String, OrderRequestEntity> getOrdersByOrderIds(List<String> orderIds) {
List<OrderRequestEntity> orders = orderRequestDao.findAllByOrderIdIn(orderIds);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!