| | |
| | | package com.ruoyi.technology.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.technology.pojo.TechnologyRouting; |
| | | import com.ruoyi.technology.service.TechnologyRoutingService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * 工艺路线表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 芯导软件(江苏)有限公司 |
| | | * @since 2026-04-20 10:06:33 |
| | | */ |
| | | import java.util.Arrays; |
| | | |
| | | @RestController |
| | | @RequestMapping("/technologyRouting") |
| | | @Api(tags = "工艺路线") |
| | | public class TechnologyRoutingController { |
| | | |
| | | @Autowired |
| | | private TechnologyRoutingService technologyRoutingService; |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation("工艺路线分页查询") |
| | | public R page(Page<TechnologyRouting> page, TechnologyRouting technologyRouting) { |
| | | return R.ok(technologyRoutingService.pageTechnologyRouting(page, technologyRouting)); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("工艺路线详情") |
| | | public R getInfo(@PathVariable("id") Long id) { |
| | | return R.ok(technologyRoutingService.getById(id)); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增工艺路线") |
| | | public R add(@RequestBody TechnologyRouting technologyRouting) { |
| | | return R.ok(technologyRoutingService.saveTechnologyRouting(technologyRouting)); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改工艺路线") |
| | | public R edit(@RequestBody TechnologyRouting technologyRouting) { |
| | | return R.ok(technologyRoutingService.updateById(technologyRouting)); |
| | | } |
| | | |
| | | @DeleteMapping("/{ids}") |
| | | @ApiOperation("删除工艺路线") |
| | | public R remove(@PathVariable("ids") Long[] ids) { |
| | | return R.ok(technologyRoutingService.removeTechnologyRouting(Arrays.asList(ids))); |
| | | } |
| | | } |