| | |
| | | Double startPrice = rule.getDouble("num1"); |
| | | |
| | | // 超出公里数价格 |
| | | Double distancePrice = rule.getDouble("num4") * exceedDistance; |
| | | Double distancePrice = new BigDecimal(rule.getDouble("num4") * exceedDistance).setScale(2,RoundingMode.HALF_UP).doubleValue(); |
| | | |
| | | // 超出时间价格 |
| | | Double durationPrice = rule.getDouble("num5") * exceedTime; |
| | | Double durationPrice = new BigDecimal(rule.getDouble("num5") * exceedTime).setScale(2,RoundingMode.HALF_UP).doubleValue(); |
| | | |
| | | startPrice = new BigDecimal(startPrice).multiply(BigDecimal.valueOf(priceRate)).setScale(2, RoundingMode.HALF_UP).doubleValue(); |
| | | |
| | |
| | | if (realDistance > rule.getDouble("num12")) { |
| | | longDistanceThree = rule.getDouble("num34") * (realDistance - rule.getDouble("num12")); |
| | | } |
| | | amount = rule.getDouble("num29") + (exceedDistance * rule.getDouble("num30")) + (exceedTime * rule.getDouble("num31")) + (wait * waitMoney) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | amount = rule.getDouble("num29") + new BigDecimal(exceedDistance * rule.getDouble("num30")).setScale(2,RoundingMode.HALF_UP).doubleValue() + (exceedTime * rule.getDouble("num31")) + (wait * waitMoney) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | |
| | | |
| | | // 起步价 |
| | |
| | | |
| | | // 里程费 |
| | | double distancePrice = (exceedDistance * rule.getDouble("num30")) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | distancePrice = new BigDecimal(distancePrice).setScale(2,RoundingMode.HALF_UP).doubleValue(); |
| | | xpPricingCardVo.setDistancePrice(distancePrice); |
| | | |
| | | // 时长 |
| | |
| | | if (realDistance > rule.getDouble("num12")) { |
| | | longDistanceThree = rule.getDouble("num20") * (realDistance - rule.getDouble("num12")); |
| | | } |
| | | amount = rule.getDouble("num15") + (exceedDistance * rule.getDouble("num16")) + (exceedTime * rule.getDouble("num17")) + (wait * waitMoney) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | amount = rule.getDouble("num15") + new BigDecimal(exceedDistance * rule.getDouble("num16")).setScale(2,RoundingMode.HALF_UP).doubleValue() + (exceedTime * rule.getDouble("num17")) + (wait * waitMoney) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | |
| | | |
| | | // 起步价 |
| | |
| | | |
| | | // 里程费 |
| | | double distancePrice = (exceedDistance * rule.getDouble("num16")) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | distancePrice = new BigDecimal(distancePrice).setScale(2,RoundingMode.HALF_UP).doubleValue(); |
| | | xpPricingCardVo.setDistancePrice(distancePrice); |
| | | |
| | | // 时长 |
| | |
| | | if (realDistance > rule.getDouble("num12")) { |
| | | longDistanceThree = rule.getDouble("num28") * (realDistance - rule.getDouble("num12")); |
| | | } |
| | | amount = rule.getDouble("num23") + (exceedDistance * rule.getDouble("num24")) + (exceedTime * rule.getDouble("num25")) + (wait * waitMoney) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | amount = rule.getDouble("num23") + new BigDecimal(exceedDistance * rule.getDouble("num24")).setScale(2,RoundingMode.HALF_UP).doubleValue() + (exceedTime * rule.getDouble("num25")) + (wait * waitMoney) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | |
| | | |
| | | // 起步价 |
| | |
| | | |
| | | // 里程费 |
| | | double distancePrice = (exceedDistance * rule.getDouble("num24")) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | distancePrice = new BigDecimal(distancePrice).setScale(2,RoundingMode.HALF_UP).doubleValue(); |
| | | xpPricingCardVo.setDistancePrice(distancePrice); |
| | | |
| | | // 时长 |
| | |
| | | if (realDistance > rule.getDouble("num12")) { |
| | | longDistanceThree = rule.getDouble("num13") * (realDistance - rule.getDouble("num12")); |
| | | } |
| | | amount = rule.getDouble("num1") + (exceedDistance * rule.getDouble("num4")) + (exceedTime * rule.getDouble("num5")) + (wait * waitMoney) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | amount = rule.getDouble("num1") + new BigDecimal(exceedDistance * rule.getDouble("num4")).setScale(2,RoundingMode.HALF_UP).doubleValue() + (exceedTime * rule.getDouble("num5")) + (wait * waitMoney) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | |
| | | |
| | | // 起步价 |
| | |
| | | |
| | | // 里程费 |
| | | double distancePrice = (exceedDistance * rule.getDouble("num4")) + longDistanceOne + longDistanceTwo + longDistanceThree; |
| | | distancePrice = new BigDecimal(distancePrice).setScale(2,RoundingMode.HALF_UP).doubleValue(); |
| | | xpPricingCardVo.setDistancePrice(distancePrice); |
| | | |
| | | // 时长 |
| | |
| | | xpPricingCardVo.setTotalPrice(amount); |
| | | |
| | | |
| | | |
| | | return xpPricingCardVo; |
| | | } |
| | | /** |