| New file |
| | |
| | | package com.example.erp.controller.sd; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.entity.sd.BomBase; |
| | | import com.example.erp.service.sd.BasicDataService; |
| | | import com.example.erp.service.sd.BomDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/BomData") |
| | | @Api(value="BOM相关controller",tags={"BOM相关操作接口"}) |
| | | public class BomDataController { |
| | | final |
| | | BomDataService bomDataService; |
| | | |
| | | public BomDataController(BomDataService bomDataService) { |
| | | this.bomDataService = bomDataService; |
| | | } |
| | | @ApiOperation("更新基础数据") |
| | | @PostMapping("saveMaterialBomData") |
| | | public Result saveMaterialBomData(@RequestBody Map<String, Object> object){ |
| | | return Result.success(bomDataService.saveMaterialBomDataSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("保存产品Bom") |
| | | @PostMapping("saveProductBOM") |
| | | public Result saveProductBOM(@RequestBody Map<String, Object> object){ |
| | | return Result.success(bomDataService.saveProductBOMSv(object)); |
| | | } |
| | | @ApiOperation("查询订单BOM对应订单数据") |
| | | @PostMapping("/getOrderBomData/{orderId}") |
| | | public Result getOrderBomData(@PathVariable String orderId){ |
| | | return Result.success(bomDataService.getOrderBomDataSv(orderId)); |
| | | } |
| | | |
| | | @ApiOperation("更新基础数据") |
| | | @PostMapping("getBomDataProduct") |
| | | public Result getBomDataProduct(@RequestBody Map<String, Object> object){ |
| | | return Result.success(bomDataService.getBomDataProductSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("产品bom明细查询") |
| | | @PostMapping("/editProductBOM/{produceId}") |
| | | public Result editProductBOM(@PathVariable String produceId){ |
| | | return Result.success(bomDataService.editProductBOMSv(produceId)); |
| | | } |
| | | |
| | | } |