|
@@ -2434,12 +2434,12 @@ public class ProductServiceImpl implements ProductService {
|
|
|
return criterionResultMap;
|
|
return criterionResultMap;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- Product productInfo;
|
|
|
|
|
|
|
+ Product productInfo = null;
|
|
|
CommodityInOutbound inOutbound = null;
|
|
CommodityInOutbound inOutbound = null;
|
|
|
// 物料存在,更新
|
|
// 物料存在,更新
|
|
|
- List<Product> existProducts = productDao.findProductByPcmpcodeAndPbrandenAndEnUU(product.getCmpCode(), product.getBrand(), enUU);
|
|
|
|
|
|
|
+ List<V_ProductPrivate> existProducts = v_productPrivateDao.findProductByPcmpcodeAndPbrandenAndEnUU(product.getCmpCode(), product.getBrand(), enUU);
|
|
|
if (CollectionUtils.isNotEmpty(existProducts)) {
|
|
if (CollectionUtils.isNotEmpty(existProducts)) {
|
|
|
- productInfo = 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, Product.class);
|
|
@@ -2563,7 +2563,7 @@ public class ProductServiceImpl implements ProductService {
|
|
|
* @param product 前台传入的物料数据
|
|
* @param product 前台传入的物料数据
|
|
|
* @param existProduct 数据库存在的物料信息
|
|
* @param existProduct 数据库存在的物料信息
|
|
|
*/
|
|
*/
|
|
|
- private CommodityInOutbound recordInventory(Product product, Product existProduct) {
|
|
|
|
|
|
|
+ private CommodityInOutbound recordInventory(Product product, V_ProductPrivate existProduct) {
|
|
|
// 入库
|
|
// 入库
|
|
|
String type;
|
|
String type;
|
|
|
CommodityInOutbound inOutbound;
|
|
CommodityInOutbound inOutbound;
|