| | |
| | | @Override |
| | | public ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(orderId); |
| | | if(null != orderTaxi && orderTaxi.getType() == 2){ |
| | | if(null != orderTaxi ){ |
| | | if(orderTaxi.getState() != 1){ |
| | | return ResultUtil.error("订单已被抢了"); |
| | | } |
| | |
| | | orderTaxi.setPrepayStage(5); |
| | | orderTaxi.setPayMoney(formatMoney(orderTaxi.getOrderMoney())); |
| | | |
| | | if (orderTaxi.getRecoveryOrder() == null || orderTaxi.getRecoveryOrder() == 0) { |
| | | Double orderMoney = (2 == orderTaxi.getAbnormal() && 2 == orderTaxi.getAbnormalStatus() |
| | | ? orderTaxi.getResponsibilityMoney().doubleValue() : orderTaxi.getOrderMoney()); |
| | | Map<String, Object> map = incomeService.saveIncome(orderTaxi.getId(), 2, orderMoney); |
| | | orderTaxi.setSplitAllocation(JSON.toJSONString(map)); |
| | | } |
| | | |
| | | if (2 == orderTaxi.getAbnormal() && 1 == orderTaxi.getAbnormalStatus()) { |
| | | orderTaxi.setAbnormalStatus(3); |
| | | orderTaxi.setResponsibilityMoney(new BigDecimal(orderTaxi.getOrderMoney())); |
| | | orderTaxi.setResponsibilityType(3); |
| | | orderTaxi.setAbnormalRemark("乘客已完成预支付订单结算,申诉已自动关闭"); |
| | | } |
| | | // if (orderTaxi.getRecoveryOrder() == null || orderTaxi.getRecoveryOrder() == 0) { |
| | | // Double orderMoney = (2 == orderTaxi.getAbnormal() && 2 == orderTaxi.getAbnormalStatus() |
| | | // ? orderTaxi.getResponsibilityMoney().doubleValue() : orderTaxi.getOrderMoney()); |
| | | // Map<String, Object> map = incomeService.saveIncome(orderTaxi.getId(), 2, orderMoney); |
| | | // orderTaxi.setSplitAllocation(JSON.toJSONString(map)); |
| | | // } |
| | | // |
| | | // if (2 == orderTaxi.getAbnormal() && 1 == orderTaxi.getAbnormalStatus()) { |
| | | // orderTaxi.setAbnormalStatus(3); |
| | | // orderTaxi.setResponsibilityMoney(new BigDecimal(orderTaxi.getOrderMoney())); |
| | | // orderTaxi.setResponsibilityType(3); |
| | | // orderTaxi.setAbnormalRemark("乘客已完成预支付订单结算,申诉已自动关闭"); |
| | | // } |
| | | } |
| | | |
| | | private String buildPrepayRefundNo(Integer orderType, Integer orderId) { |