| | |
| | | package com.ruoyi.safe.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.dto.ProcessRouteDto; |
| | | import com.ruoyi.production.pojo.ProcessRoute; |
| | | import com.ruoyi.safe.pojo.SafeCertification; |
| | | import com.ruoyi.safe.service.SafeCertificationService; |
| | | 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.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/safeCertification") |
| | | @Api(tags = "安全生产--安全规程与资质管理") |
| | | @Tag(name = "安全生产--安全规程与资质管理") |
| | | @AllArgsConstructor |
| | | public class SafeCertificationController { |
| | | |
| | | @Autowired |
| | | private SafeCertificationService safeCertificationService; |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation("分页查询") |
| | | @Operation(summary = "分页查询") |
| | | public R page(Page<SafeCertification> page, SafeCertification safeCertification) { |
| | | return R.ok(safeCertificationService.pageSafeCertification(page, safeCertification)); |
| | | } |
| | | |
| | | @ApiOperation("新增安全规程与资质管理") |
| | | @Operation(summary = "新增安全规程与资质管理") |
| | | @PostMapping() |
| | | public R add(@RequestBody SafeCertification safeCertification) { |
| | | return R.ok(safeCertificationService.save(safeCertification)); |
| | | } |
| | | |
| | | @ApiOperation("修改安全规程与资质管理") |
| | | @Operation(summary = "修改安全规程与资质管理") |
| | | @PutMapping () |
| | | public R update(@RequestBody SafeCertification safeCertification) { |
| | | return R.ok(safeCertificationService.updateById(safeCertification)); |
| | | } |
| | | |
| | | @ApiOperation("删除安全规程与资质管理") |
| | | @Operation(summary = "删除安全规程与资质管理") |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeCertification(@RequestBody List<Integer> ids) { |
| | | return R.ok(safeCertificationService.removeBatchByIds(ids)); |