Showing
1 changed file
with
13 additions
and
0 deletions
... | ... | @@ -221,6 +221,19 @@ public class TkDeviceController extends BaseController { |
221 | 221 | if (getCurrentUser().isCustomerUser()) { |
222 | 222 | queryMap.put("customerId", getCurrentUser().getCustomerId().toString()); |
223 | 223 | } |
224 | + DeviceState deviceState = | |
225 | + null != queryMap.get("deviceState") | |
226 | + && StringUtils.isNotEmpty(queryMap.get("deviceState").toString()) | |
227 | + ? DeviceState.valueOf(queryMap.get("deviceState").toString()) | |
228 | + : null; | |
229 | + if (deviceState != null) { | |
230 | + if (!deviceState.equals(DeviceState.INACTIVE)) { | |
231 | + queryMap.put("deviceState", deviceState.equals(DeviceState.ONLINE)); | |
232 | + } else { | |
233 | + queryMap.put("activeState", DeviceState.INACTIVE); | |
234 | + queryMap.remove("deviceState"); | |
235 | + } | |
236 | + } | |
224 | 237 | return tkdeviceService.page(getCurrentUser().getCurrentTenantId(), queryMap); |
225 | 238 | } |
226 | 239 | ... | ... |