diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.java index d83996f..bfa1514 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.java @@ -20,7 +20,7 @@ public interface HistoryAbnormalAlarmMapper extends UserDataScopeBaseMapper selectPageList(IPage page, String type, List stations); - List getAlarmEntity(@Param("type") String type,@Param("stationName") String stationName,@Param("startTime") Date startTime,@Param("endTime") Date endTime); + List getAlarmEntity(@Param("type") String type,@Param("stationName") List stationName,@Param("startTime") Date startTime,@Param("endTime") Date endTime); List getStationName(); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.xml index 8d2cbc8..930c9d6 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.xml @@ -27,20 +27,23 @@ select distinct STATION_NAME from hzims_history_abnormal_alarm - select * from hzims_history_abnormal_alarm where is_deleted = 0 and type = #{type} - - and station_name = #{stationName} + + and station_name in + + #{item} + - - and start_time = #{startTime} + + and start_time > #{startTime} - - and end_time = #{endTime} + + and end_time <= #{endTime} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java index 01c9fe7..302a3f3 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java @@ -158,7 +158,8 @@ public class HistoryAbnormalAlarmServiceImpl extends BaseServiceImpl getAlarmEntityQueryWrapper(HistoryAbnormalAlarmEntity entity) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (entity.getStationName() != null) { - queryWrapper.lambda().like(HistoryAbnormalAlarmEntity::getStationName, entity.getStationName()); + String[] list = entity.getStationName().split(","); + queryWrapper.lambda().in(HistoryAbnormalAlarmEntity::getStationName, list); } if (entity.getType() != null) { queryWrapper.lambda().eq(HistoryAbnormalAlarmEntity::getType, entity.getType());