|
|
@@ -2455,13 +2455,16 @@ public class ProductServiceImpl implements ProductService {
|
|
|
qtyContainPrice = 0.0d; qty = 0.0d; totalPrice = 0.0d;
|
|
|
if (doubleList == null) {
|
|
|
doubleList = new ArrayList<>();
|
|
|
+ doubleList.add(qtyContainPrice);
|
|
|
+ doubleList.add(qty);
|
|
|
+ doubleList.add(totalPrice);
|
|
|
} else {
|
|
|
qtyContainPrice = doubleList.get(0);
|
|
|
qty = doubleList.get(1);
|
|
|
totalPrice = doubleList.get(2);
|
|
|
}
|
|
|
if (InOutBoundType.INBOUND.equals(inOutboundDetail.getCommodityInOutbound().getType())) {
|
|
|
- qty = NumberUtil.add(doubleList.get(0), inOutboundDetail.getQty());
|
|
|
+ qty = NumberUtil.add(qty, inOutboundDetail.getQty());
|
|
|
if (inOutboundDetail.getPrice() != null) {
|
|
|
qtyContainPrice = NumberUtil.add(qtyContainPrice, inOutboundDetail.getQty());
|
|
|
totalPrice = NumberUtil.add(totalPrice, NumberUtil.mul(inOutboundDetail.getPrice(), inOutboundDetail.getQty()));
|
|
|
@@ -2492,7 +2495,7 @@ public class ProductServiceImpl implements ProductService {
|
|
|
List<Goods> goodsList = goodsService.findByProductids(prids);
|
|
|
for (Product product : products) {
|
|
|
for (Goods goods : goodsList) {
|
|
|
- if ((goods.getProductid() != null) && (goods.getProductid().longValue() == product.getId().longValue())) {
|
|
|
+ if (goods.getProductid().longValue() == product.getId().longValue()) {
|
|
|
goods.setReserve(product.getErpReserve());
|
|
|
goods.setStatus();
|
|
|
}
|