商品单位-仓库管理
This commit is contained in:
parent
0d4f3db67f
commit
349bc91fc2
|
|
@ -61,7 +61,7 @@ public class SupermarketMaterialTypeServiceImpl implements ISupermarketMaterialT
|
||||||
try {
|
try {
|
||||||
SupermarketMaterialType checkResult = supermarketMaterialTypeMapper.selectSupermarketMaterialTypeByMaterialTypeName(supermarketMaterialType);
|
SupermarketMaterialType checkResult = supermarketMaterialTypeMapper.selectSupermarketMaterialTypeByMaterialTypeName(supermarketMaterialType);
|
||||||
if (Objects.nonNull(checkResult)) {
|
if (Objects.nonNull(checkResult)) {
|
||||||
throw new ServiceException("改超市商品类别名已存在");
|
throw new ServiceException("该超市商品类别名已存在");
|
||||||
}
|
}
|
||||||
return supermarketMaterialTypeMapper.insertSupermarketMaterialType(supermarketMaterialType);
|
return supermarketMaterialTypeMapper.insertSupermarketMaterialType(supermarketMaterialType);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -84,7 +84,7 @@ public class SupermarketMaterialTypeServiceImpl implements ISupermarketMaterialT
|
||||||
List<String> otherSupermarketMaterialTypeList = allSupermarketMaterialTypeList.stream().filter(item -> !item.getMaterialTypeId().equals(supermarketMaterialType.getMaterialTypeId()))
|
List<String> otherSupermarketMaterialTypeList = allSupermarketMaterialTypeList.stream().filter(item -> !item.getMaterialTypeId().equals(supermarketMaterialType.getMaterialTypeId()))
|
||||||
.map(SupermarketMaterialType::getMaterialTypeName).collect(Collectors.toList());
|
.map(SupermarketMaterialType::getMaterialTypeName).collect(Collectors.toList());
|
||||||
if (otherSupermarketMaterialTypeList.contains(supermarketMaterialType.getMaterialTypeName())) {
|
if (otherSupermarketMaterialTypeList.contains(supermarketMaterialType.getMaterialTypeName())) {
|
||||||
throw new ServiceException("改超市商品类别名已存在");
|
throw new ServiceException("该超市商品类别名已存在");
|
||||||
}
|
}
|
||||||
return supermarketMaterialTypeMapper.updateSupermarketMaterialType(supermarketMaterialType);
|
return supermarketMaterialTypeMapper.updateSupermarketMaterialType(supermarketMaterialType);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue