| | |
| | | package com.ruoyi.production.controller; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | 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.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查询扁平物料明细") |
| | | public R<List<ProductionBomStructureVo>> listByBomId(@PathVariable Long bomId) { |
| | | return R.ok(productionBomStructureService.listByBomId(bomId)); |
| | | } |
| | | |
| | | @GetMapping("/listByOrderId/{productionOrderId}") |
| | | @Operation(summary = "根据生产订单查询订单BOM快照的扁平物料明细") |
| | | public R<List<ProductionBomStructureVo>> listByOrderId(@PathVariable Long productionOrderId) { |
| | | return R.ok(productionBomStructureService.listByOrderId(productionOrderId)); |
| | | } |
| | | |
| | | @Log(title = "全量保存订单BOM扁平物料明细", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/addOrUpdateBomStructs") |
| | | @Operation(summary = "全量保存订单BOM扁平物料明细") |
| | | public R addProductionBomStructure(@RequestBody ProductionBomStructureDto productionBomStructureDto) { |
| | | return R.ok(productionBomStructureService.addProductionBomStructure(productionBomStructureDto)); |
| | | } |
| | | |
| | | } |