|
|
@@ -40,8 +40,7 @@ public class IotDeviceController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('iot:device:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public TableDataInfo list(IotDevice iotDevice)
|
|
|
- {
|
|
|
+ public TableDataInfo list(IotDevice iotDevice) {
|
|
|
startPage();
|
|
|
List<IotDevice> list = iotDeviceService.selectIotDeviceList(iotDevice);
|
|
|
return getDataTable(list);
|
|
|
@@ -53,8 +52,7 @@ public class IotDeviceController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('iot:device:export')")
|
|
|
@Log(title = "设备基础", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, IotDevice iotDevice)
|
|
|
- {
|
|
|
+ public void export(HttpServletResponse response, IotDevice iotDevice) {
|
|
|
List<IotDevice> list = iotDeviceService.selectIotDeviceList(iotDevice);
|
|
|
ExcelUtil<IotDevice> util = new ExcelUtil<IotDevice>(IotDevice.class);
|
|
|
util.exportExcel(response, list, "设备基础数据");
|
|
|
@@ -64,10 +62,9 @@ public class IotDeviceController extends BaseController
|
|
|
* 获取设备基础详细信息
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('iot:device:query')")
|
|
|
- @GetMapping(value = "/info/{id}")
|
|
|
- public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
- {
|
|
|
- return success(iotDeviceService.selectIotDeviceById(id));
|
|
|
+ @GetMapping(value = "/info/{devBid}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("devBid") String devBid) {
|
|
|
+ return success(iotDeviceService.selectIotDeviceByDevBid(devBid));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -76,8 +73,7 @@ public class IotDeviceController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('iot:device:add')")
|
|
|
@Log(title = "设备基础", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/add")
|
|
|
- public AjaxResult add(@RequestBody IotDevice iotDevice)
|
|
|
- {
|
|
|
+ public AjaxResult add(@RequestBody IotDevice iotDevice) {
|
|
|
return toAjax(iotDeviceService.insertIotDevice(iotDevice));
|
|
|
}
|
|
|
|
|
|
@@ -87,8 +83,7 @@ public class IotDeviceController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('iot:device:edit')")
|
|
|
@Log(title = "设备基础", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping("/edit")
|
|
|
- public AjaxResult edit(@RequestBody IotDevice iotDevice)
|
|
|
- {
|
|
|
+ public AjaxResult edit(@RequestBody IotDevice iotDevice) {
|
|
|
return toAjax(iotDeviceService.updateIotDevice(iotDevice));
|
|
|
}
|
|
|
|
|
|
@@ -97,9 +92,8 @@ public class IotDeviceController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('iot:device:remove')")
|
|
|
@Log(title = "设备基础", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/delete/{ids}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
- {
|
|
|
- return toAjax(iotDeviceService.deleteIotDeviceByIds(ids));
|
|
|
+ @DeleteMapping("/delete/{devBid}")
|
|
|
+ public AjaxResult remove(@PathVariable String devBid) {
|
|
|
+ return toAjax(iotDeviceService.deleteIotDeviceByDevBid(devBid));
|
|
|
}
|
|
|
}
|