| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得产品BOM") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('mes:md-item:query')") |
| | | public CommonResult<MesMdProductBomRespVO> getProductBom(@RequestParam("id") Long id) { |
| | | MesMdProductBomDO productBom = productBomService.getProductBom(id); |
| | | return success(BeanUtils.toBean(productBom, MesMdProductBomRespVO.class)); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得产品BOM分页") |
| | | @PreAuthorize("@ss.hasPermission('mes:md-item:query')") |
| | | public CommonResult<PageResult<MesMdProductBomRespVO>> getProductBomPage(@Valid MesMdProductBomPageReqVO pageReqVO) { |
| | | PageResult<MesMdProductBomDO> pageResult = productBomService.getProductBomPage(pageReqVO); |
| | | List<MesMdProductBomRespVO> voList = buildProductBomRespVOList(pageResult.getList()); |
| | |
| | | @GetMapping("/list-by-item-id") |
| | | @Operation(summary = "根据物料产品编号获得产品BOM列表") |
| | | @Parameter(name = "itemId", description = "物料产品编号", required = true, example = "1") |
| | | @PreAuthorize("@ss.hasPermission('mes:md-item:query')") |
| | | public CommonResult<List<MesMdProductBomRespVO>> getProductBomListByItemId( |
| | | @RequestParam("itemId") Long itemId) { |
| | | List<MesMdProductBomDO> list = productBomService.getProductBomListByItemId(itemId); |