|
@@ -13,7 +13,7 @@ import com.zd.common.core.web.controller.BaseController;
|
|
|
import com.zd.common.core.web.page.TableDataInfo;
|
|
import com.zd.common.core.web.page.TableDataInfo;
|
|
|
import com.zd.common.log.annotation.Log;
|
|
import com.zd.common.log.annotation.Log;
|
|
|
import com.zd.common.log.enums.BusinessType;
|
|
import com.zd.common.log.enums.BusinessType;
|
|
|
-import com.zd.common.response.ResultData;
|
|
|
|
|
|
|
+import com.zd.common.security.annotation.PreAuthorize;
|
|
|
import com.zd.system.api.domain.InventoryTag;
|
|
import com.zd.system.api.domain.InventoryTag;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -39,7 +39,7 @@ public class AlarmRecordController extends BaseController<AlarmRecord> {
|
|
|
/**
|
|
/**
|
|
|
* 查询报警记录列表
|
|
* 查询报警记录列表
|
|
|
*/
|
|
*/
|
|
|
-// @PreAuthorize(hasPermi = "airbottle:alarm:record:list")
|
|
|
|
|
|
|
+ @PreAuthorize(hasPermi = "airbottle:alarm:record:list")
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
@ApiOperation(value = "查询报警记录列表")
|
|
@ApiOperation(value = "查询报警记录列表")
|
|
|
public TableDataInfo<AlarmRecordVo> list(AlarmRecord alarmRecord) {
|
|
public TableDataInfo<AlarmRecordVo> list(AlarmRecord alarmRecord) {
|
|
@@ -67,7 +67,7 @@ public class AlarmRecordController extends BaseController<AlarmRecord> {
|
|
|
* 导出报警记录列表
|
|
* 导出报警记录列表
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation(value = "导出报警记录列表")
|
|
@ApiOperation(value = "导出报警记录列表")
|
|
|
-// @PreAuthorize(hasPermi = "airbottle:alarm:record:export")
|
|
|
|
|
|
|
+ @PreAuthorize(hasPermi = "airbottle:alarm:record:export")
|
|
|
@Log(title = "报警记录", businessType = BusinessType.EXPORT)
|
|
@Log(title = "报警记录", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
|
public void export(HttpServletResponse response, AlarmRecord alarmRecord) throws IOException {
|
|
public void export(HttpServletResponse response, AlarmRecord alarmRecord) throws IOException {
|
|
@@ -90,27 +90,6 @@ public class AlarmRecordController extends BaseController<AlarmRecord> {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 获取报警记录详细信息
|
|
|
|
|
- */
|
|
|
|
|
- @ApiOperation(value = "获取报警记录详细信息")
|
|
|
|
|
-// @PreAuthorize(hasPermi = "airbottle:alarm:record:query")
|
|
|
|
|
- @GetMapping(value = "/{id}")
|
|
|
|
|
- public ResultData<AlarmRecord> getInfo(@PathVariable("id") Long id) {
|
|
|
|
|
- return ResultData.success(alarmRecordService.selectAlarmRecordById(id));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 新增报警记录
|
|
|
|
|
- */
|
|
|
|
|
- @ApiOperation(value = "新增报警记录")
|
|
|
|
|
-// @PreAuthorize(hasPermi = "airbottle:alarm:record:add")
|
|
|
|
|
- @Log(title = "报警记录", businessType = BusinessType.INSERT)
|
|
|
|
|
- @PostMapping
|
|
|
|
|
- public ResultData<Boolean> add(@RequestBody AlarmRecord alarmRecord) {
|
|
|
|
|
- return ResultData.result(alarmRecordService.insertAlarmRecord(alarmRecord));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
* 识别器新增报警记录
|
|
* 识别器新增报警记录
|
|
|
*/
|
|
*/
|
|
|
@ApiOperation(value = "识别器新增报警记录")
|
|
@ApiOperation(value = "识别器新增报警记录")
|
|
@@ -120,26 +99,4 @@ public class AlarmRecordController extends BaseController<AlarmRecord> {
|
|
|
alarmRecordService.remoteAdd(tag);
|
|
alarmRecordService.remoteAdd(tag);
|
|
|
return R.ok();
|
|
return R.ok();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 修改报警记录
|
|
|
|
|
- */
|
|
|
|
|
- @ApiOperation(value = "修改报警记录")
|
|
|
|
|
-// @PreAuthorize(hasPermi = "airbottle:alarm:record:edit")
|
|
|
|
|
- @Log(title = "报警记录", businessType = BusinessType.UPDATE)
|
|
|
|
|
- @PutMapping
|
|
|
|
|
- public ResultData<Boolean> edit(@RequestBody AlarmRecord alarmRecord) {
|
|
|
|
|
- return ResultData.result(alarmRecordService.updateAlarmRecord(alarmRecord));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 删除报警记录
|
|
|
|
|
- */
|
|
|
|
|
- @ApiOperation(value = "删除报警记录")
|
|
|
|
|
-// @PreAuthorize(hasPermi = "airbottle:alarm:record:remove")
|
|
|
|
|
- @Log(title = "报警记录", businessType = BusinessType.DELETE)
|
|
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
|
|
- public ResultData<Boolean> remove(@PathVariable Long[] ids) {
|
|
|
|
|
- return ResultData.result(alarmRecordService.deleteAlarmRecordByIds(ids));
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|