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