| | |
| | | BigDecimal closeMoney = new BigDecimal(0.00); |
| | | int durationSum = 0; |
| | | //取最高车型计算方案结算订单 |
| | | MemberRides topRides =null; |
| | | for(MemberRides rides : memberRides){ |
| | | if ( isClose && Constants.MEMBER_RIDES_STATUS.BACK_CYCLING.getKey()!=(Constants.formatIntegerNum(rides.getStatus()))){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前订单有未完成的骑行,无法强制结算"); |
| | | } |
| | | durationSum += Constants.formatIntegerNum(rides.getDuration());//累计骑行(计费)时长 |
| | | } |
| | | MemberRides topRides =memberRides.get(0); |
| | | if(durationSum > 0 && topRides != null){ |
| | | int baseTime =Constants.formatIntegerNum(topRides.getBaseTime()); |
| | | closeMoney = Constants.formatDecimalNum(topRides.getBasePrice()); |