From ded87427ffd9d8d74ad7cdae5c838b2f07e08f56 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期一, 13 五月 2024 11:36:02 +0800 Subject: [PATCH] 报表筛选多选 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOverallEquipmentEfficiencyMapper.xml | 8 ++++---- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOverallEquipmentEfficiencyMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOverallEquipmentEfficiencyMapper.xml index be774b6..e3eaa1c 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOverallEquipmentEfficiencyMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcOverallEquipmentEfficiencyMapper.xml @@ -50,16 +50,16 @@ </foreach> </if> <if test="mdcOverallEquipmentEfficiency.driveType != null and mdcOverallEquipmentEfficiency.driveType != ''"> - AND t2.drive_type = #{ mdcOverallEquipmentEfficiency.driveType } + AND t2.drive_type IN (#{ mdcOverallEquipmentEfficiency.driveType }) </if> <if test="mdcOverallEquipmentEfficiency.deviceLevel != null and mdcOverallEquipmentEfficiency.deviceLevel != ''"> - AND t2.device_level = #{ mdcOverallEquipmentEfficiency.deviceLevel } + AND t2.device_level IN (#{ mdcOverallEquipmentEfficiency.deviceLevel }) </if> <if test="mdcOverallEquipmentEfficiency.deviceCategory != null and mdcOverallEquipmentEfficiency.deviceCategory != ''"> - AND t2.device_category = #{ mdcOverallEquipmentEfficiency.deviceCategory } + AND t2.device_category IN (#{ mdcOverallEquipmentEfficiency.deviceCategory }) </if> <if test="mdcOverallEquipmentEfficiency.equipmentType != null and mdcOverallEquipmentEfficiency.equipmentType != ''"> - AND t2.equipment_type = #{ mdcOverallEquipmentEfficiency.equipmentType } + AND t2.equipment_type IN (#{ mdcOverallEquipmentEfficiency.equipmentType }) </if> </where> </select> diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java index b9a7384..c5db8a6 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcEquipmentServiceImpl.java @@ -730,16 +730,16 @@ queryWrapper.in(MdcEquipment::getEquipmentId, vo.getEquipmentIdList()); } if (StringUtils.isNotEmpty(vo.getEquipmentType())) { - queryWrapper.eq(MdcEquipment::getEquipmentType, vo.getEquipmentType()); + queryWrapper.in(MdcEquipment::getEquipmentType, Arrays.asList(vo.getEquipmentType().split(","))); } if (StringUtils.isNotEmpty(vo.getDeviceLevel())) { - queryWrapper.eq(MdcEquipment::getDeviceLevel, vo.getDeviceLevel()); + queryWrapper.in(MdcEquipment::getDeviceLevel, Arrays.asList(vo.getDeviceLevel().split(","))); } if (StringUtils.isNotEmpty(vo.getDriveType())) { - queryWrapper.eq(MdcEquipment::getDriveType, vo.getDriveType()); + queryWrapper.in(MdcEquipment::getDriveType, Arrays.asList(vo.getDriveType().split(","))); } if (StringUtils.isNotEmpty(vo.getDeviceCategory())) { - queryWrapper.eq(MdcEquipment::getDeviceCategory, 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)); @@ -880,16 +880,16 @@ queryWrapper.in(MdcEquipment::getEquipmentId, vo.getEquipmentIdList()); } if (StringUtils.isNotEmpty(vo.getEquipmentType())) { - queryWrapper.eq(MdcEquipment::getEquipmentType, vo.getEquipmentType()); + queryWrapper.in(MdcEquipment::getEquipmentType, Arrays.asList(vo.getEquipmentType().split(","))); } if (StringUtils.isNotEmpty(vo.getDeviceLevel())) { - queryWrapper.eq(MdcEquipment::getDeviceLevel, vo.getDeviceLevel()); + queryWrapper.in(MdcEquipment::getDeviceLevel, Arrays.asList(vo.getDeviceLevel().split(","))); } if (StringUtils.isNotEmpty(vo.getDriveType())) { - queryWrapper.eq(MdcEquipment::getDriveType, vo.getDriveType()); + queryWrapper.in(MdcEquipment::getDriveType, Arrays.asList(vo.getDriveType().split(","))); } if (StringUtils.isNotEmpty(vo.getDeviceCategory())) { - queryWrapper.eq(MdcEquipment::getDeviceCategory, 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)); -- Gitblit v1.9.3