| | |
| | | import com.ruoyi.technology.bean.dto.TechnologyOperationDto; |
| | | import com.ruoyi.technology.bean.vo.TechnologyOperationVo; |
| | | import com.ruoyi.technology.service.TechnologyOperationService; |
| | | 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.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "工序管理") |
| | | @Tag(name = "工序管理") |
| | | @RequestMapping("/technologyOperation") |
| | | @RequiredArgsConstructor |
| | | public class TechnologyOperationController { |
| | |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "Technology operation page", businessType = BusinessType.OTHER) |
| | | @ApiOperation("工序分页查询") |
| | | @Operation(summary = "工序分页查询") |
| | | public R<IPage<TechnologyOperationVo>> listPage(Page<TechnologyOperationDto> page, TechnologyOperationDto technologyOperationDto) { |
| | | return R.ok(technologyOperationService.listPage(page, technologyOperationDto)); |
| | | } |
| | | |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @Log(title = "Add technology operation", businessType = BusinessType.INSERT) |
| | | @ApiOperation("新增工序") |
| | | @Operation(summary = "新增工序") |
| | | public R add(@RequestBody TechnologyOperationDto technologyOperationDto) { |
| | | return technologyOperationService.add(technologyOperationDto); |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @Log(title = "Update technology operation", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("修改工序") |
| | | @Operation(summary = "修改工序") |
| | | public R update(@RequestBody com.ruoyi.technology.pojo.TechnologyOperation technologyOperation) { |
| | | return R.ok(technologyOperationService.updateById(technologyOperation)); |
| | | } |
| | | |
| | | @DeleteMapping("/batchDelete") |
| | | @Log(title = "Delete technology operation", businessType = BusinessType.DELETE) |
| | | @ApiOperation("批量删除工序") |
| | | @Operation(summary = "批量删除工序") |
| | | public R batchDelete(@RequestBody List<Long> ids) { |
| | | return R.ok(technologyOperationService.batchDelete(ids)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation("查询全部工序") |
| | | @Operation(summary = "查询全部工序") |
| | | public R<List<TechnologyOperationVo>> list() { |
| | | return R.ok(technologyOperationService.listVo()); |
| | | } |