| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | 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.AjaxResult; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.production.dto.ProductProcessDto; |
| | | import com.ruoyi.production.dto.ProductStructureDto; |
| | | import com.ruoyi.production.pojo.ProductStructure; |
| | | import com.ruoyi.production.service.ProductStructureService; |
| | |
| | | |
| | | @RequestMapping("productStructure") |
| | | @RestController |
| | | @Api(tags = "产品结构") |
| | | @Api(tags = "BOM") |
| | | public class ProductStructureController { |
| | | @Autowired |
| | | private ProductStructureService productStructureService; |
| | | |
| | | |
| | | @ApiOperation("根据productId查询") |
| | | @GetMapping("/listByproductModelId/{productModelId}") |
| | | public R listByproductModelId( @PathVariable("productModelId") Long productModelId){ |
| | | return R.ok(productStructureService.listByproductModelId( productModelId)); |
| | | } |
| | | |
| | | @ApiOperation("新增产品结构") |
| | | @ApiOperation("新增BOM") |
| | | @PostMapping() |
| | | public R addOrUpdate(@RequestBody ProductStructureDto productStructureDto){ |
| | | return R.ok(productStructureService.addProductStructureDto(productStructureDto)); |
| | | } |
| | | |
| | | @ApiOperation("BOM查看详情") |
| | | @GetMapping("/listBybomId/{bomId}") |
| | | public R listBybomId( @PathVariable("bomId") Long bomId){ |
| | | return R.ok(productStructureService.listBybomId(bomId)); |
| | | } |
| | | } |