Commit 9040449916508d7426e9449ee1bdf532d1757de9

Authored by 黄 x
1 parent 6acbe1f7

feat: add convert data filter

... ... @@ -365,6 +365,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev
365 365 List<String> queryOrganizationIds = organizationAllIds(tenantId, organizationId);
366 366 queryMap.put("organizationIds", queryOrganizationIds);
367 367 }
  368 + //用于数据流转已选,待选过滤============开始
368 369 if (StringUtils.isNotEmpty(convertConfigId)) {
369 370 ConvertConfigDTO configDTO =
370 371 convertConfigService.findConvertConfigDTOById(tenantId, convertConfigId);
... ... @@ -380,6 +381,7 @@ public class TkDeviceServiceImpl extends AbstractBaseService<DeviceMapper, TkDev
380 381 }
381 382 }
382 383 }
  384 + //用于数据流转已选,待选过滤============结束
383 385 IPage<TkDeviceEntity> page =
384 386 getPage(queryMap, FastIotConstants.DefaultOrder.CREATE_TIME, false);
385 387 IPage<DeviceDTO> deviceIPage = baseMapper.getDevicePage(page, queryMap);
... ...
... ... @@ -97,8 +97,13 @@
97 97 <if test="queryMap.tenantId !=null and queryMap.tenantId !=''">
98 98 AND ifd.tenant_id = #{queryMap.tenantId}
99 99 </if>
100   - <if test="queryMap.convertDevices !=null">
101   - AND ifd.id IN
  100 + <if test="queryMap.selected !=null and queryMap.convertDevices !=null">
  101 + <if test="queryMap.selected == true">
  102 + AND ifd.id IN
  103 + </if>
  104 + <if test="queryMap.selected == false">
  105 + AND ifd.id NOT IN
  106 + </if>
102 107 <foreach collection="queryMap.convertDevices" item="convertDevice" open="(" separator="," close=")">
103 108 #{convertDevice}
104 109 </foreach>
... ...