Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
  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()));
  }