| | |
| | | } |
| | | String durationAndMileage = key.split("\\|")[2]; |
| | | startDetail.setDuration(Double.valueOf(durationAndMileage.split("&")[0])); |
| | | startDetail.setMileage(new BigDecimal(durationAndMileage.split("&")[1])); |
| | | startDetail.setMileage(new BigDecimal(durationAndMileage.split("&")[1]).multiply(BigDecimal.valueOf(1000))); |
| | | start.add(startDetail); |
| | | } |
| | | // 封装里程费 |
| | |
| | | // 封装时长费 |
| | | FareBreakdownDetailVo timeDetail = new FareBreakdownDetailVo(); |
| | | if (key.contains("时长费")) { |
| | | timeDetail.setType(startDetail.getType()); |
| | | if(key.contains("普通时段")){ |
| | | timeDetail.setType(1); |
| | | } |
| | | if(key.contains("夜间行驶")){ |
| | | timeDetail.setType(2); |
| | | } |
| | | if(key.contains("高峰")){ |
| | | timeDetail.setType(3); |
| | | } |
| | | if(key.contains("节假")){ |
| | | timeDetail.setType(4); |
| | | } |
| | | |
| | | timeDetail.setMoney(stringBigDecimalEntry.getValue()); |
| | | timeDetail.setDuration(Double.valueOf(key.split("&")[1])); |
| | | duration.add(timeDetail); |
| | |
| | | if (key.contains("远途费")) { |
| | | longDetail.setType(startDetail.getType()); |
| | | longDetail.setMoney(stringBigDecimalEntry.getValue()); |
| | | longDetail.setMileage(new BigDecimal(key.split("&")[1])); |
| | | // longDetail.setMileage(new BigDecimal(key.split("&")[1])); |
| | | longDistance.add(longDetail); |
| | | } |
| | | } |
| | |
| | | order.setStatus(9); |
| | | order.setAppUserId(null); |
| | | baseMapper.updateById(order); |
| | | |
| | | if(order.getCouponId()!=null){ |
| | | UseUserCouponDto useUserCouponDto = new UseUserCouponDto(); |
| | | useUserCouponDto.setUserCouponId(order.getCouponId()); |
| | | xpAppUserCouponClient.useUserCoupon(useUserCouponDto); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |