| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.bean.dto.ProductionBomStructureDto; |
| | | import com.ruoyi.production.bean.vo.ProductionBomStructureVo; |
| | | import com.ruoyi.production.service.ProductionBomStructureService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/productionBomStructure") |
| | | @AllArgsConstructor |
| | | public class ProductionBomStructureController { |
| | | |
| | | private ProductionBomStructureService productionBomStructureService; |
| | | |
| | | @GetMapping("/listByBomId/{bomId}") |
| | | @Operation(summary = "根据BOM查询生产订单BOM结构树") |
| | | public R<List<ProductionBomStructureVo>> listByBomId(@PathVariable Long bomId) { |
| | | return R.ok(productionBomStructureService.listByBomId(bomId)); |
| | | } |
| | | |
| | | @PostMapping("/addOrUpdateBomStructs") |
| | | @Operation(summary = "新增或修改BOM结构") |
| | | public R addProductionBomStructure(@RequestBody ProductionBomStructureDto productionBomStructureDto) { |
| | | return R.ok(productionBomStructureService.addProductionBomStructure(productionBomStructureDto)); |
| | | } |
| | | |
| | | } |