Browse Source

完善F10筛选逻辑

jwy
review512jwy@163.com 6 days ago
parent
commit
bad347e12e
  1. 20
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml
  2. 9
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/FavoritedDeviceMapperExt.xml

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

@ -64,10 +64,14 @@
</foreach>
</if>
and device_info.flag = 0
<!-- 如果 categoryIdList 不包含 1011,才加 device_id 过滤 -->
<if test="!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')
and (
device_info.device_id LIKE '%\\_85'
or device_info.device_id LIKE '%\\_85_9003'
or device_info.device_id LIKE '%\\_131_5'
<if test="categoryIdList.contains(1011L)">
or type.device_category_id = 1011
</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=")">
@ -511,7 +515,15 @@
#{companyId}
</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
and (
device_info.device_id LIKE '%\\_85'
or device_info.device_id LIKE '%\\_85_9003'
or device_info.device_id LIKE '%\\_131_5'
<if test="categoryIdList.contains(1011L)">
or type.device_category_id = 1011
</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=")">

9
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/FavoritedDeviceMapperExt.xml

@ -19,7 +19,14 @@
left join type ty on ty.id = dinfo.type_id
WHERE
dinfo.flag != 1 AND basic_monitoring_asset.flag != 1
AND (dinfo.device_id LIKE '%\_85' or dinfo.device_id LIKE '%\_85_9003' or dinfo.device_id LIKE '%\_131_5')
AND (
dinfo.device_id LIKE '%\\_85'
or dinfo.device_id LIKE '%\\_85_9003'
or dinfo.device_id LIKE '%\\_131_5'
<if test="categoryIdList.contains(1011L)">
or ty.device_category_id = 1011
</if>
)
AND basic_space.flag != 1 AND basic_floor.flag != 1 AND basic_building.flag != 1
<if test="buildingId != null">
AND basic_building.building_id = #{buildingId}

Loading…
Cancel
Save