Browse Source

问题处理

yzc 1 year ago
parent
commit
5e965644db

+ 4 - 2
hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

@@ -138,8 +138,10 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
 
             //赋值原材料信息
             ProductInfo productInfo = rawMaterialMap.get(record.getRawMaterialId());
-            record.setRawMaterialName(productInfo.getName());
-            record.setRawMaterialCode(productInfo.getCustomCode());
+            if (ObjectUtil.isNotEmpty(productInfo)) {
+                record.setRawMaterialName(productInfo.getName());
+                record.setRawMaterialCode(productInfo.getCustomCode());
+            }
 
         }