| | |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.safe.pojo.SafeContingencyPlan; |
| | | import com.ruoyi.safe.service.SafeContingencyPlanService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/safeContingencyPlan") |
| | | @Api(tags = "安全生产--应急预案查阅") |
| | | @Tag(name = "安全生产--应急预案查阅") |
| | | @AllArgsConstructor |
| | | public class SafeContingencyPlanController { |
| | | |
| | | private final SafeContingencyPlanService safeContingencyPlanService; |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation("分页查询") |
| | | @Operation(summary = "分页查询") |
| | | public R page(Page page, SafeContingencyPlan safeContingencyPlan) { |
| | | return R.ok(safeContingencyPlanService.pageSafeContingencyPlan(page, safeContingencyPlan)); |
| | | } |
| | | |
| | | @ApiOperation("新增应急预案查阅") |
| | | @Operation(summary = "新增应急预案查阅") |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeContingencyPlan safeContingencyPlan) { |
| | | return R.ok(safeContingencyPlanService.save(safeContingencyPlan)); |
| | | } |
| | | |
| | | @ApiOperation("修改应急预案查阅") |
| | | @Operation(summary = "修改应急预案查阅") |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeContingencyPlan safeContingencyPlan) { |
| | | return R.ok(safeContingencyPlanService.updateById(safeContingencyPlan)); |
| | | } |
| | | |
| | | @ApiOperation("删除应急预案查阅") |
| | | @Operation(summary = "删除应急预案查阅") |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeCertification(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeContingencyPlanService.removeBatchByIds(ids)); |