| | |
| | | double v = ((double) tUserFeeSetting.getFee()) / 100; |
| | | BigDecimal multiply = price.getPrice().multiply(new BigDecimal(v)); |
| | | BigDecimal subtract = price.getPrice().subtract(multiply); |
| | | priceInfo.setCarrierCost(subtract); |
| | | priceInfo.setSalesProfit(new BigDecimal(commission)); |
| | | priceInfo.setMargin(multiply); |
| | | }else { |
| | | priceInfo.setMargin(new BigDecimal(0)); |
| | | priceInfo.setSalesProfit(new BigDecimal(commission)); |
| | | priceInfo.setCarrierCost(price.getPrice()); |
| | | } |
| | | priceInfos.add(priceInfo); |
| | | break; |
| | |
| | | }else { |
| | | for (TPrice price : prices) { |
| | | PriceInfo priceInfo = new PriceInfo(); |
| | | priceInfo.setCarrierCost(price.getPrice()); |
| | | priceInfo.setCustomerCost(price.getPrice()); |
| | | priceInfo.setName(price.getType()); |
| | | priceInfo.setSalesProfit(new BigDecimal(0)); |
| | | priceInfo.setMargin(new BigDecimal(0)); |
| | | priceInfos.add(priceInfo); |
| | | } |
| | | } |