| | |
| | | @Override |
| | | public ResultUtil confirmFees(Integer orderId, Integer type, Double travelFee, Double parkingFee, Double crossingFee) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(orderId); |
| | | orderTaxi.setPayManner(type); |
| | | if(orderTaxi.getPayManner()==3){ |
| | | if(2 == type && orderTaxi.getPayManner()==3){ |
| | | orderTaxi.setState(9); |
| | | Driver driver = driverService.selectById(orderTaxi.getDriverId()); |
| | | |
| | |
| | | driverService.updateById(driver); |
| | | } |
| | | //打表计费,直接订单完成支付, |
| | | if(orderTaxi.getPayManner()==2){ |
| | | if(2 == type && orderTaxi.getPayManner()==2){ |
| | | orderTaxi = this.setMoney2(orderTaxi, parkingFee, crossingFee); |
| | | //在线上计费的基础上随机加0.01-1的金额 |
| | | Double orderMoney = orderTaxi.getOrderMoney() + (new BigDecimal(Math.random()).setScale(2, BigDecimal.ROUND_DOWN).doubleValue()); |
| | |
| | | driverService.updateById(driver); |
| | | } |
| | | //线上计费,计算费用后修改为待支付 |
| | | if(orderTaxi.getPayManner()==1){ |
| | | if(1 == type && orderTaxi.getPayManner()==1){ |
| | | orderTaxi = this.setMoney2(orderTaxi, crossingFee, crossingFee); |
| | | orderTaxi.setState(7); |
| | | } |