Browse Source

F10设备sql适配筛选

jwy
review512jwy@163.com 6 days ago
parent
commit
afd41d9016
  1. 2
      dongjian-dashboard-back-common/src/main/java/com/dongjian/dashboard/back/common/Constants.java
  2. 6
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml

2
dongjian-dashboard-back-common/src/main/java/com/dongjian/dashboard/back/common/Constants.java

@ -76,7 +76,7 @@ public class Constants {
public static final List<Long> DEVICE_TYPE_TEMPERATURE_HUMIDITY = Arrays.asList(8888882L,9999992L);
static {
CATEGORY_MAP.put(CATEGORY_ALARM, new ArrayList<>(List.of(1001L)));
CATEGORY_MAP.put(CATEGORY_ALARM, new ArrayList<>(List.of(1001L, 1011L)));
CATEGORY_MAP.put(CATEGORY_MEASURE, new ArrayList<>(List.of(1003L)));

6
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml

@ -63,7 +63,11 @@
#{deviceId}
</foreach>
</if>
and device_info.flag = 0 and (device_info.device_id LIKE '%\_85' or device_info.device_id LIKE '%\_85_9003' or device_info.device_id LIKE '%\_131_5')
and device_info.flag = 0
<!-- 如果 categoryIdList 不包含 1011,才加 device_id 过滤 -->
<if test="categoryIdList == null or !categoryIdList.contains(1011)">
and (device_info.device_id LIKE '%\_85' or device_info.device_id LIKE '%\_85_9003' or device_info.device_id LIKE '%\_131_5')
</if>
and basic_monitoring_asset.flag != 1 and basic_space.flag != 1 and basic_floor.flag != 1 and basic_building.flag != 1
and type.device_category_id in
<foreach collection="categoryIdList" item="categoryId" open="(" separator="," close=")">

Loading…
Cancel
Save