|
|
@ -172,14 +172,14 @@ public class BomServiceImpl implements BomService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public BomDO bomItemCodeAndVersionExist(String productItemCode, String version) { |
|
|
|
public List<BomDO> bomItemCodeAndVersionExist(String productItemCode, String version) { |
|
|
|
QueryWrapper queryWrapper = new QueryWrapper(); |
|
|
|
queryWrapper.eq("product_item_code",productItemCode); |
|
|
|
queryWrapper.eq("version",version); |
|
|
|
queryWrapper.eq("available","TRUE"); |
|
|
|
BomDO bomDO = bomMapper.selectOne(queryWrapper); |
|
|
|
if( bomDO != null){ |
|
|
|
return bomDO; |
|
|
|
List<BomDO> bomDOList = bomMapper.selectList(queryWrapper); |
|
|
|
if( bomDOList != null && bomDOList.size() > 0){ |
|
|
|
return bomDOList; |
|
|
|
}else { |
|
|
|
throw exception(BOM_ITEM_VERSION_QTY_EXISTS, "父物料" + productItemCode + "与bom版本" + version + "关系无效"); |
|
|
|
} |
|
|
|