| | |
| | | */ |
| | | @GetMapping("/checkAreaBind") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiOperation(value = "设备区域绑定校验", notes = "传入deviceId") |
| | | public R<Boolean> checkAreaBind(@ApiParam(value = "设备ID", required = true) @RequestParam Long deviceId) { |
| | | @ApiOperation(value = "设备区域绑定校验", notes = "传入deviceId,返回设备绑定区域名称") |
| | | public R<String> checkAreaBind(@ApiParam(value = "设备ID", required = true) @RequestParam Long deviceId) { |
| | | FwDeviceEntity device = fwDeviceService.getById(deviceId); |
| | | if (device == null || (device.getIsDeleted() != null && device.getIsDeleted() != 0)) { |
| | | return R.fail("该设备不存在"); |
| | | } |
| | | return R.data(fwDeviceService.existsAreaBindByDeviceId(deviceId)); |
| | | return R.data(fwDeviceService.selectAreaBindNameByDeviceId(deviceId)); |
| | | } |
| | | |
| | | /** |