| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeHazard; |
| | | import com.ruoyi.safe.service.SafeHazardService; |
| | |
| | | return R.ok(safeHazardService.pageSafeHazard(page, safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "新增危险源", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "新增危险源台账") |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeHazard safeHazard) { |
| | | return R.ok(safeHazardService.save(safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "修改危险源", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "修改危险源台账") |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeHazard safeHazard) { |
| | | return R.ok(safeHazardService.updateById(safeHazard)); |
| | | } |
| | | |
| | | @Log(title = "删除危险源", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "删除危险源台账") |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeHazard(@RequestBody List<Integer> ids) { |