Authored by mali

寄存列表 价格 取整

@@ -154,7 +154,7 @@ public class DepositServiceImpl implements DepositService { @@ -154,7 +154,7 @@ public class DepositServiceImpl implements DepositService {
154 bo.setPic(ImageUrlAssist.getAllProductPicUrl(goods.getImageUrl(), "goodsimg", "center", "d2hpdGU=")); 154 bo.setPic(ImageUrlAssist.getAllProductPicUrl(goods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
155 BuyerOrder buyerOrder = buyerGoodsMap.get(buyerGoodsMap.get(depo.getOrderCode())); 155 BuyerOrder buyerOrder = buyerGoodsMap.get(buyerGoodsMap.get(depo.getOrderCode()));
156 if (buyerOrder != null) { 156 if (buyerOrder != null) {
157 - bo.setPrice(buyerOrder.getAmount().toString()); 157 + bo.setPrice(String.valueOf(buyerOrder.getAmount().intValue()));
158 } 158 }
159 bo.setDepositStatusName(getBackStatusName(depo.getStatus())); 159 bo.setDepositStatusName(getBackStatusName(depo.getStatus()));
160 bo.setDepositCode(depo.getDepositCode()); 160 bo.setDepositCode(depo.getDepositCode());
@@ -617,7 +617,7 @@ public class DepositServiceImpl implements DepositService { @@ -617,7 +617,7 @@ public class DepositServiceImpl implements DepositService {
617 bo.setPic(ImageUrlAssist.getAllProductPicUrl(goods.getImageUrl(), "goodsimg", "center", "d2hpdGU=")); 617 bo.setPic(ImageUrlAssist.getAllProductPicUrl(goods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
618 BuyerOrder buyerOrder = buyerGoodsMap.get(depo.getOrderCode()); 618 BuyerOrder buyerOrder = buyerGoodsMap.get(depo.getOrderCode());
619 if (buyerOrder != null) { 619 if (buyerOrder != null) {
620 - bo.setPrice(buyerOrder.getAmount().toString()); 620 + bo.setPrice(String.valueOf(buyerOrder.getAmount().intValue()));
621 } 621 }
622 bo.setSizeName(goods.getSizeName()); 622 bo.setSizeName(goods.getSizeName());
623 bo.setOrderStatusName(getOrderStatusName(depo.getOrderStatus())); 623 bo.setOrderStatusName(getOrderStatusName(depo.getOrderStatus()));
@@ -628,7 +628,7 @@ public class DepositServiceImpl implements DepositService { @@ -628,7 +628,7 @@ public class DepositServiceImpl implements DepositService {
628 628
629 bo.setStorageId(depo.getStorageId()); 629 bo.setStorageId(depo.getStorageId());
630 BigDecimal least = leastMap.get(depo.getStorageId()); 630 BigDecimal least = leastMap.get(depo.getStorageId());
631 - bo.setFlashMinPrice(least == null ? "" : least.toString()); 631 + bo.setFlashMinPrice(least == null ? "" : String.valueOf(least.intValue()));
632 bo.setDepositCode(depo.getDepositCode()); 632 bo.setDepositCode(depo.getDepositCode());
633 } 633 }
634 634
@@ -79,5 +79,12 @@ public class MathUtils { @@ -79,5 +79,12 @@ public class MathUtils {
79 } 79 }
80 double val = 10D; 80 double val = 10D;
81 System.out.println(val + " -> 折扣 " + calDiscount((int)val)); 81 System.out.println(val + " -> 折扣 " + calDiscount((int)val));
  82 +
  83 +
  84 + System.out.println(String.valueOf(new BigDecimal(19).intValue()));
  85 + }
  86 +
  87 + public static String convert2PercentROUND(BigDecimal rate, int newScale, int round) {
  88 + return rate.multiply(new BigDecimal(100)).setScale(newScale, round) + "%";
82 } 89 }
83 } 90 }