|
@@ -2442,7 +2442,7 @@ public class ProductServiceImpl implements ProductService {
|
|
|
productInfo = productInfo.setByPrivate(existProducts.get(0));
|
|
productInfo = productInfo.setByPrivate(existProducts.get(0));
|
|
|
// 用户填写库存量是需要做对应的出入库。如果新填写的库存数大于原库存数,做入库。否则做出库。
|
|
// 用户填写库存量是需要做对应的出入库。如果新填写的库存数大于原库存数,做入库。否则做出库。
|
|
|
inOutbound = recordInventory(product, existProducts.get(0));
|
|
inOutbound = recordInventory(product, existProducts.get(0));
|
|
|
- BeanUtils.copyProperties(product, productInfo, Product.class);
|
|
|
|
|
|
|
+ BeanUtils.copyProperties(product, productInfo, "id");
|
|
|
} else {
|
|
} else {
|
|
|
// 物料不存在,新增操作
|
|
// 物料不存在,新增操作
|
|
|
productInfo = product;
|
|
productInfo = product;
|
|
@@ -2698,7 +2698,8 @@ public class ProductServiceImpl implements ProductService {
|
|
|
}
|
|
}
|
|
|
final Double minBuyQty = goods.getMinBuyQty();
|
|
final Double minBuyQty = goods.getMinBuyQty();
|
|
|
// 判断前端传入的分段价格是默认的值还是填写错误
|
|
// 判断前端传入的分段价格是默认的值还是填写错误
|
|
|
- int size = goods.getOriginalPrices().size();
|
|
|
|
|
|
|
+ List<GoodsQtyPrice> qtyPrices = goods.getOriginalPrices();
|
|
|
|
|
+ int size = qtyPrices.size();
|
|
|
if (size == 1) {
|
|
if (size == 1) {
|
|
|
GoodsQtyPrice qtyPrice = goods.getOriginalPrices().get(0);
|
|
GoodsQtyPrice qtyPrice = goods.getOriginalPrices().get(0);
|
|
|
// 前端设置的默认值,不用保存
|
|
// 前端设置的默认值,不用保存
|
|
@@ -2708,7 +2709,7 @@ public class ProductServiceImpl implements ProductService {
|
|
|
} else if (size > 1) {
|
|
} else if (size > 1) {
|
|
|
StringBuffer errMsg = new StringBuffer();
|
|
StringBuffer errMsg = new StringBuffer();
|
|
|
for (int i = 0; i < size; i++) {
|
|
for (int i = 0; i < size; i++) {
|
|
|
- if (null == goods.getOriginalPrices().get(i).getPrice()) {
|
|
|
|
|
|
|
+ if (null == qtyPrices.get(i).getRMBPrice() && null == qtyPrices.get(i).getUSDPrice()) {
|
|
|
jointErrMsg(errMsg, String.valueOf(i + 1));
|
|
jointErrMsg(errMsg, String.valueOf(i + 1));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|