|
|
@@ -2446,10 +2446,13 @@ public class ProductServiceImpl implements ProductService {
|
|
|
// 物料存在,更新
|
|
|
List<V_ProductPrivate> existProducts = v_productPrivateDao.findProductByPcmpcodeAndPbrandenAndEnUU(product.getCmpCode(), product.getBrand(), enUU);
|
|
|
if (CollectionUtils.isNotEmpty(existProducts)) {
|
|
|
- productInfo = productInfo.setByPrivate(existProducts.get(0));
|
|
|
+ V_ProductPrivate productPrivate = existProducts.get(0);
|
|
|
+ productInfo = productInfo.setByPrivate(productPrivate);
|
|
|
// 用户填写库存量是需要做对应的出入库。如果新填写的库存数大于原库存数,做入库。否则做出库。
|
|
|
inOutbound = recordInventory(product, existProducts.get(0));
|
|
|
- BeanUtils.copyProperties(product, productInfo, "id,standard");
|
|
|
+ BeanUtils.copyProperties(product, productInfo, Product.class);
|
|
|
+ productInfo.setStandard(productPrivate.getStandard());
|
|
|
+ productInfo.setId(productPrivate.getId());
|
|
|
} else {
|
|
|
// 物料不存在,新增操作
|
|
|
productInfo = product;
|