|
|
@ -227,11 +227,10 @@ public class BasicdataWarehouseController extends BladeController { |
|
|
|
List<BasicdataWarehouseEntity> warehouseList = warehouseService.list(); |
|
|
|
List<BasicdataWarehouseEntity> warehouseList = warehouseService.list(); |
|
|
|
|
|
|
|
|
|
|
|
List<BasicdataWarehouseEntity> names = warehouseList.stream().filter(warehouseEntity -> warehouseEntity.getName().equals(warehouseWarehouse.getName())).collect(Collectors.toList()); |
|
|
|
List<BasicdataWarehouseEntity> names = warehouseList.stream().filter(warehouseEntity -> warehouseEntity.getName().equals(warehouseWarehouse.getName())).collect(Collectors.toList()); |
|
|
|
List<BasicdataWarehouseEntity> codes = warehouseList.stream().filter(warehouseEntity -> warehouseEntity.getCode().equals(warehouseWarehouse.getCode())).collect(Collectors.toList()); |
|
|
|
List<BasicdataWarehouseEntity> codes = warehouseList.stream().filter(warehouseEntity -> warehouseEntity.getWarehouseCode().equals(warehouseWarehouse.getWarehouseCode())).collect(Collectors.toList()); |
|
|
|
if(!names.isEmpty()){ |
|
|
|
if(!names.isEmpty()){ |
|
|
|
throw new CustomerException("仓库名称重复,请重新输入"); |
|
|
|
throw new CustomerException("仓库名称重复,请重新输入"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(!codes.isEmpty()){ |
|
|
|
if(!codes.isEmpty()){ |
|
|
|
throw new CustomerException("仓库编号重复,请重新输入"); |
|
|
|
throw new CustomerException("仓库编号重复,请重新输入"); |
|
|
|
} |
|
|
|
} |
|
|
|