| | |
| | | package com.ruoyi.safe.specialequipment.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 io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Tag(name = "安全生产--特种设备检验维保记录") |
| | | @RequestMapping("/safe/specialEquipment/record") |
| | | @AllArgsConstructor |
| | | public class SpecialEquipmentRecordController extends BaseController { |
| | | private final SpecialEquipmentRecordService service; |
| | | @GetMapping("/listPage") @Operation(summary = "检验维保记录-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentRecord req) { return AjaxResult.success(service.listPage(page, req)); } |
| | | @PostMapping("/add") @Log(title = "检验维保记录-新增", businessType = BusinessType.INSERT) |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "检验维保记录-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentRecord req) { |
| | | return AjaxResult.success(service.listPage(page, req)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "检验维保记录-新增", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "检验维保记录-新增") |
| | | public AjaxResult add(@RequestBody SpecialEquipmentRecord req) { return service.save(req) ? success() : error(); } |
| | | @PostMapping("/update") @Log(title = "检验维保记录-修改", businessType = BusinessType.UPDATE) |
| | | public AjaxResult add(@RequestBody SpecialEquipmentRecord req) { |
| | | return service.save(req) ? success() : error(); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @Log(title = "检验维保记录-修改", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "检验维保记录-修改") |
| | | public AjaxResult update(@RequestBody SpecialEquipmentRecord req) { return service.updateById(req) ? success() : error(); } |
| | | @DeleteMapping("/delete") @Log(title = "检验维保记录-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult update(@RequestBody SpecialEquipmentRecord req) { |
| | | return service.updateById(req) ? success() : error(); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @Log(title = "检验维保记录-删除", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "检验维保记录-删除") |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { return service.removeByIds(ids) ? success() : error(); } |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | return service.removeByIds(ids) ? success() : error(); |
| | | } |
| | | } |