| | |
| | | package com.ruoyi.technology.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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 com.ruoyi.framework.web.domain.R; |
| | | 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 lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 芯导软件(江苏)有限公司 |
| | | * @since 2026-04-20 09:49:48 |
| | | */ |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "工序管理") |
| | | @RequestMapping("/technologyOperation") |
| | | @RequiredArgsConstructor |
| | | public class TechnologyOperationController { |
| | | |
| | | private final TechnologyOperationService technologyOperationService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "Technology operation page", businessType = BusinessType.OTHER) |
| | | @ApiOperation("工序分页查询") |
| | | public R<IPage<TechnologyOperationVo>> listPage(Page<TechnologyOperationDto> page, TechnologyOperationDto technologyOperationDto) { |
| | | return R.ok(technologyOperationService.listPage(page, technologyOperationDto)); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log(title = "Add technology operation", businessType = BusinessType.INSERT) |
| | | @ApiOperation("新增工序") |
| | | public R add(@RequestBody TechnologyOperationDto technologyOperationDto) { |
| | | return technologyOperationService.add(technologyOperationDto); |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @Log(title = "Update technology operation", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("修改工序") |
| | | 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("批量删除工序") |
| | | public R batchDelete(@RequestBody List<Long> ids) { |
| | | return R.ok(technologyOperationService.batchDelete(ids)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation("查询全部工序") |
| | | public R<List<TechnologyOperationVo>> list() { |
| | | return R.ok(technologyOperationService.listVo()); |
| | | } |
| | | } |