| | |
| | | @Override |
| | | public List<String> listEquipmentId(MdcEfficiencyReportQueryVo vo) { |
| | | LambdaQueryWrapper<MdcEquipment> queryWrapper = new LambdaQueryWrapper<>(); |
| | | if (vo.getEquipmentIdList() != null && !vo.getEquipmentIdList().isEmpty()) { |
| | | queryWrapper.in(MdcEquipment::getEquipmentId, vo.getEquipmentIdList()); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getEquipmentType())) { |
| | | queryWrapper.in(MdcEquipment::getEquipmentType, Arrays.asList(vo.getEquipmentType().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDeviceLevel())) { |
| | | queryWrapper.in(MdcEquipment::getDeviceLevel, Arrays.asList(vo.getDeviceLevel().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDriveType())) { |
| | | queryWrapper.in(MdcEquipment::getDriveType, Arrays.asList(vo.getDriveType().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDeviceCategory())) { |
| | | queryWrapper.in(MdcEquipment::getDeviceCategory, Arrays.asList(vo.getDeviceCategory().split(","))); |
| | | if (vo != null) { |
| | | if (vo.getEquipmentIdList() != null && !vo.getEquipmentIdList().isEmpty()) { |
| | | queryWrapper.in(MdcEquipment::getEquipmentId, vo.getEquipmentIdList()); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getEquipmentType())) { |
| | | queryWrapper.in(MdcEquipment::getEquipmentType, Arrays.asList(vo.getEquipmentType().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDeviceLevel())) { |
| | | queryWrapper.in(MdcEquipment::getDeviceLevel, Arrays.asList(vo.getDeviceLevel().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDriveType())) { |
| | | queryWrapper.in(MdcEquipment::getDriveType, Arrays.asList(vo.getDriveType().split(","))); |
| | | } |
| | | if (StringUtils.isNotEmpty(vo.getDeviceCategory())) { |
| | | queryWrapper.in(MdcEquipment::getDeviceCategory, Arrays.asList(vo.getDeviceCategory().split(","))); |
| | | } |
| | | } |
| | | List<MdcEquipment> list = super.list(queryWrapper); |
| | | // List<MdcEquipment> list = super.list(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentType, equipmentType).in(MdcEquipment::getEquipmentId, equipmentIdList)); |
| | | return list.stream().map(MdcEquipment::getEquipmentId).collect(Collectors.toList()); |
| | | } |
| | | |
| | |
| | | // List<MdcEquipment> list = super.list(new LambdaQueryWrapper<MdcEquipment>().eq(MdcEquipment::getEquipmentType, equipmentType).in(MdcEquipment::getEquipmentId, equipmentIdList)); |
| | | return list.stream().map(MdcEquipment::getEquipmentId).collect(Collectors.toList()); |
| | | } |
| | | |
| | | } |