feat: [excel-129]支持分类代码为10开头的物料添加工艺包到上级
This commit is contained in:
parent
c88ed37c41
commit
3789b30bf7
|
|
@ -473,7 +473,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
* @return
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public BaseMaterialVO createTechnologyPackage(TechnologyPackageParam packageParam) throws IOException {
|
||||
public BaseMaterialVO createTechnologyPackage(TechnologyPackageParam packageParam) {
|
||||
VUtils.isTure(Objects.isNull(packageParam.getTechnologyPackageTypeRowId())).throwMessage("请选择工艺包类型");
|
||||
BomNewTechnologyPackageTypeEntity technologyPackageTypeEntity = technologyPackageTypeService.getById(packageParam.getTechnologyPackageTypeRowId());
|
||||
//单条物料
|
||||
|
|
@ -489,7 +489,14 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
result = Convert.convert(BomNewPbomParentVO.class, parent);
|
||||
}
|
||||
materialMainService.intiMaterialInfo(ImmutableList.of(result));
|
||||
VUtils.isTure(StrUtil.isBlank(result.getMaterialCategoryCode()) || !result.getMaterialCategoryCode().startsWith("20")).throwMessage("插入工艺包的物料需为制作物料");
|
||||
//VUtils.isTure(StrUtil.isBlank(result.getMaterialCategoryCode()) || !result.getMaterialCategoryCode().startsWith("20")).throwMessage("插入工艺包的物料需为制作物料");
|
||||
VUtils.isTure(StrUtil.isBlank(result.getMaterialCategoryCode())).throwMessage("物料分类代码不能为空");
|
||||
if (result.getMaterialCategoryCode().startsWith("10")) {
|
||||
//工艺包只能添加到上级
|
||||
VUtils.isTure(!Objects.equals(packageParam.getLevelBelong(), 0)).throwMessage("10分类开头的物料,工艺包只能添加到上级");
|
||||
} else if (!result.getMaterialCategoryCode().startsWith("20")) {
|
||||
VUtils.isTure(true).throwMessage("插入工艺包的物料需为制作物料或10分类开头");
|
||||
}
|
||||
|
||||
// drawingNo = StrUtil.join("", result.getDrawingNo(), technologyPackageTypeEntity.getDrawingNoSuffix());
|
||||
// 检查改图号是否已存在主数据中
|
||||
|
|
|
|||
Loading…
Reference in New Issue