创建根
This commit is contained in:
parent
0b8748bd1f
commit
56aa5bc38a
|
|
@ -167,6 +167,19 @@ public class EbomApi extends BaseApi {
|
|||
return ResultVO.success(true);
|
||||
}
|
||||
|
||||
@PostMapping("createParentBom")
|
||||
@ApiOperation("创建BOM")
|
||||
public ResultVO<Boolean> createParentBom(@RequestBody BomNewEBomCreateDTO createDTO) {
|
||||
VUtils.isTure(StrUtil.isBlank(createDTO.getMaterialNo())).throwMessage("物料编码不能为空");
|
||||
//子级物料编码不能为空
|
||||
VUtils.isTure(CollUtil.isEmpty(createDTO.getDatas())).throwMessage("子级不能为空");
|
||||
List<BomNewEBomImportExcelDTO> noMaterialList = createDTO.getDatas().stream().filter(u -> StrUtil.isBlank(u.getMaterialNo())).collect(Collectors.toList());
|
||||
VUtils.isTure(CollUtil.isNotEmpty(noMaterialList)).throwMessage("子级存在物料编码为空的数据");
|
||||
bomNewEbomParentService.createBom(createDTO);
|
||||
return ResultVO.success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("revertDesign")
|
||||
@ApiOperation("退回到设计")
|
||||
|
|
|
|||
Loading…
Reference in New Issue