| | |
| | | package com.ruoyi.safe.specialequipment.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | |
| | | 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/ledger") |
| | | @AllArgsConstructor |
| | | public class SpecialEquipmentLedgerController extends BaseController { |
| | | private final SpecialEquipmentLedgerService service; |
| | | @GetMapping("/listPage") @Operation(summary = "特种设备台账-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentLedger req) { return AjaxResult.success(service.listPage(page, req)); } |
| | | @GetMapping("/list") @Operation(summary = "特种设备台账-列表查询") |
| | | public AjaxResult list(SpecialEquipmentLedger req) { return AjaxResult.success(service.list(Wrappers.lambdaQuery(req))); } |
| | | @PostMapping("/add") @Log(title = "特种设备台账-新增", businessType = BusinessType.INSERT) |
| | | |
| | | @GetMapping("/listPage") |
| | | @Operation(summary = "特种设备台账-分页查询") |
| | | public AjaxResult listPage(Page page, SpecialEquipmentLedger req) { |
| | | return AjaxResult.success(service.listPage(page, req)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @Operation(summary = "特种设备台账-列表查询") |
| | | public AjaxResult list(SpecialEquipmentLedger req) { |
| | | return AjaxResult.success(service.list(Wrappers.lambdaQuery(req))); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @Log(title = "特种设备台账-新增", businessType = BusinessType.INSERT) |
| | | @Operation(summary = "特种设备台账-新增") |
| | | public AjaxResult add(@RequestBody SpecialEquipmentLedger req) { return service.save(req) ? success() : error(); } |
| | | @PostMapping("/update") @Log(title = "特种设备台账-修改", businessType = BusinessType.UPDATE) |
| | | public AjaxResult add(@RequestBody SpecialEquipmentLedger req) { |
| | | return service.save(req) ? success() : error(); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @Log(title = "特种设备台账-修改", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "特种设备台账-修改") |
| | | public AjaxResult update(@RequestBody SpecialEquipmentLedger req) { return service.updateById(req) ? success() : error(); } |
| | | @DeleteMapping("/delete") @Log(title = "特种设备台账-删除", businessType = BusinessType.DELETE) |
| | | public AjaxResult update(@RequestBody SpecialEquipmentLedger 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(); |
| | | } |
| | | } |