|
|
@@ -191,9 +191,12 @@ public class PurcInquiryServiceImpl implements PurcInquiryService {
|
|
|
item.setProduct(product);
|
|
|
item.setProductId(product.getId());
|
|
|
} else {// 导入或手动输入的一般不带有id
|
|
|
- product = productDao.findByEnUUAndCodeAndBrand(
|
|
|
- SystemSession.getUser().getEnterprise().getUu(), purcitem.getProdCode(),
|
|
|
- purcitem.getInbrand());
|
|
|
+ List<Product> products = productDao.findByEnUUAndCode(
|
|
|
+ SystemSession.getUser().getEnterprise().getUu(),
|
|
|
+ purcitem.getProdCode());
|
|
|
+ if (!CollectionUtils.isEmpty(products)) {
|
|
|
+ product = products.get(0);
|
|
|
+ }
|
|
|
if (product != null) {// 存在直接选择
|
|
|
item.setProduct(product);
|
|
|
item.setProductId(product.getId());
|