public String getSelectMoney() { double selectMoney = 0; for (ShoppingCart.BuyCarListBean goods : list) { for (ShoppingCart.BuyCarListBean.GoodslistBean goodslist : goods.getGoodslist()) { if (1 == goodslist.getIsCheck() && !"YES".equals(goodslist.getIsInvalid()) && !"YES".equals(goodslist.getIsOff())) { selectMoney += goodslist.getNewPrice() * goodslist.getCount(); } } } return StringUtils.doubleTo(selectMoney); }
public String getSaveMoney() { double oldMoney = 0; for (ShoppingCart.BuyCarListBean goods : list) { for (ShoppingCart.BuyCarListBean.GoodslistBean goodslist : goods.getGoodslist()) { if ("YES".equals(goodslist.getIsInvalid()) || "YES".equals(goodslist.getIsOff())) { } else { if (1 == goodslist.getIsCheck()) { oldMoney += goodslist.getOldPrice() * goodslist.getCount(); } } } } return StringUtils.doubleTo(oldMoney - Double.valueOf(getSelectMoney())); }