| | |
| | | @Resource |
| | | private UserInfoMapper userInfoMapper; |
| | | |
| | | @Resource |
| | | private TUseMoneyMapper useMoneyMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private TransactionDetailsMapper transactionDetailsMapper; |
| | | |
| | | |
| | | |
| | |
| | | public Map<String, Object> queryOrderInfo(Integer orderId) throws Exception { |
| | | return orderTaxiMapper.queryOrderInfo(orderId); |
| | | } |
| | | |
| | | @Resource |
| | | private TUseMoneyMapper useMoneyMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private TransactionDetailsMapper transactionDetailsMapper; |
| | | /** |
| | | * 走订单流程操作 |
| | | * @param orderId |
| | |
| | | * @throws Exception |
| | | */ |
| | | public OrderTaxi setMoney2(OrderTaxi orderTaxi, Double parkingFee, Double crossingFee) throws Exception { |
| | | Map<String, Object> query1 = systemPriceMapper.query1(orderTaxi.getCompanyId(), 1); |
| | | Map<String, Object> query1 = systemPriceMapper.query1(orderTaxi.getCompanyId(), 2); |
| | | //开始根据不同的方式计算金额 |
| | | double amount = 0; |
| | | JSONObject jsonObject = JSON.parseObject(String.valueOf(query1.get("content"))); |
| | | |
| | | JSONObject contentExclusive = JSON.parseObject(query1.get("contentExclusive").toString());//独享 |
| | | System.out.println("独享内容"+contentExclusive); |
| | | //乘车类型(1=独享,2=一口价,3=拼车) |
| | | double d = (null == orderTaxi.getMileage() ? 0D : orderTaxi.getMileage()); |
| | | System.out.println("行驶里程数"+d); |
| | | //在价格区间按照一口价算,不在区间按实时价格算 |
| | | System.out.println("不在区间===================="); |
| | | orderTaxi = calculationPrice(orderTaxi,contentExclusive,jsonObject.getLongValue("num1"),jsonObject.getDouble("num2"),parkingFee,crossingFee); |
| | | orderTaxi = calculationPrice(orderTaxi,jsonObject,jsonObject.getLongValue("num29"),jsonObject.getDouble("num30"),parkingFee,crossingFee); |
| | | System.out.println("返回订单数据"+orderTaxi); |
| | | return orderTaxi; |
| | | } |