| | |
| | | } |
| | | |
| | | private ProductModel findModel(String name, String spec) { |
| | | Product product = productService.getOne(new LambdaQueryWrapper<Product>() |
| | | .eq(Product::getProductName, name).last("limit 1")); |
| | | if (product == null) throw new ServiceException("产品未维护:" + name); |
| | | // Product product = productService.getOne(new LambdaQueryWrapper<Product>() |
| | | // .eq(Product::getProductName, name).last("limit 1")); |
| | | // if (product == null) throw new ServiceException("产品未维护:" + name); |
| | | |
| | | ProductModel model = productModelService.getOne(new LambdaQueryWrapper<ProductModel>() |
| | | .eq(ProductModel::getProductId, product.getId()) |
| | | // .eq(ProductModel::getProductId, product.getId()) |
| | | .eq(ProductModel::getModel, spec).last("limit 1")); |
| | | if (model == null) throw new ServiceException("规格未维护:" + name + "[" + spec + "]"); |
| | | if (model == null) throw new ServiceException("图纸编号未维护:" + name + "[" + spec + "]"); |
| | | return model; |
| | | } |
| | | |