| | |
| | | orderTaxi.setPayManner(type); |
| | | if(type == 2){//其他支付,不需要操作,直接完成订单 |
| | | orderTaxi = this.setMoney1(orderTaxi, travelFee, parkingFee, crossingFee); |
| | | orderTaxi.setState(8); |
| | | orderTaxi.setState(7); |
| | | }else{ |
| | | orderTaxi = this.setMoney2(orderTaxi, parkingFee, crossingFee); |
| | | orderTaxi.setState(7); |
| | |
| | | public List<OrderTaxi> taskMidAxbUnBindSend() throws Exception { |
| | | return orderTaxiMapper.taskMidAxbUnBindSend(); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> queryMoneyInfo(Integer orderId) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(orderId); |
| | | if(orderTaxi.getState() == 5 || orderTaxi.getState() == 6){//服务中的时候获取实时费用数据 |
| | | if(orderTaxi.getPayManner() == 2){//其他支付,不需要操作,直接完成订单 |
| | | orderTaxi = this.setMoney1(orderTaxi, 0D, 0D, 0D); |
| | | }else{ |
| | | orderTaxi = this.setMoney2(orderTaxi, 0D, 0D); |
| | | } |
| | | } |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("orderMoney", orderTaxi.getOrderMoney());//订单金额 |
| | | map.put("startMileage", orderTaxi.getStartMileage());//起步价 |
| | | map.put("startMoney", orderTaxi.getStartMoney());//起步价 |
| | | map.put("mileageKilometers", orderTaxi.getMileageKilometers());//里程费 |
| | | map.put("mileageMoney", orderTaxi.getMileageMoney());//里程费 |
| | | map.put("duration", orderTaxi.getDuration());//时长费 |
| | | map.put("durationMoney", orderTaxi.getDurationMoney());//时长费 |
| | | map.put("wait", orderTaxi.getWait());//等待费 |
| | | map.put("waitMoney", orderTaxi.getWaitMoney());//等待费 |
| | | map.put("longDistance", orderTaxi.getLongDistance());//远途费 |
| | | map.put("longDistanceMoney", orderTaxi.getLongDistanceMoney());//远途费 |
| | | map.put("parkMoney", orderTaxi.getParkMoney());//停车费 |
| | | map.put("roadTollMoney", orderTaxi.getRoadTollMoney());//过路费 |
| | | map.put("redPacketMoney", orderTaxi.getRedPacketMoney());//红包抵扣金额 |
| | | map.put("couponMoney", orderTaxi.getCouponMoney());//优惠券抵扣金额 |
| | | map.put("discountMoney", orderTaxi.getDiscountMoney());//折扣抵扣金额 |
| | | map.put("discount", orderTaxi.getDiscount());//折扣 |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 计算价格 |
| | | * @param orderTaxi |
| | |
| | | // OrderTaxi.setLongDistance(new BigDecimal((d > rule.getDouble("num6")) ? d - rule.getDouble("num6") : 0).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | OrderTaxi.setLongDistance(new BigDecimal((d > rule.getDouble("num6")) ? d - rule.getDouble("num6") : 0).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | OrderTaxi.setLongDistanceMoney(new BigDecimal(yt1 + yt2 + yt3).setScale(2, BigDecimal.ROUND_DOWN).doubleValue());//远途费 |
| | | OrderTaxi.setParkMoney(parkingFee);//停车费 |
| | | OrderTaxi.setRoadTollMoney(crossingFee);//过路费 |
| | | OrderTaxi.setParkMoney(Objects.isNull(parkingFee)?0D:parkingFee);//停车费 |
| | | OrderTaxi.setRoadTollMoney(Objects.isNull(crossingFee)?0D:crossingFee);//过路费 |
| | | OrderTaxi.setRedPacketMoney(0D);//红包抵扣 |
| | | OrderTaxi.setCouponMoney(0D);//优惠券抵扣 |
| | | OrderTaxi.setDiscount(0D);//优惠抵扣 |
| | |
| | | // OrderTaxi.setLongDistance(new BigDecimal((d > rule.getDouble("num6")) ? d - rule.getDouble("num6") : 0).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | OrderTaxi.setLongDistance(new BigDecimal((d > rule.getDouble("num6")) ? d - rule.getDouble("num6") : 0).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | OrderTaxi.setLongDistanceMoney(new BigDecimal(yt1 + yt2 + yt3).setScale(2, BigDecimal.ROUND_DOWN).doubleValue());//远途费 |
| | | OrderTaxi.setParkMoney(parkingFee);//停车费 |
| | | OrderTaxi.setRoadTollMoney(crossingFee);//过路费 |
| | | OrderTaxi.setParkMoney(Objects.isNull(parkingFee)?0D:parkingFee);//停车费 |
| | | OrderTaxi.setRoadTollMoney(Objects.isNull(crossingFee)?0D:crossingFee);//过路费 |
| | | OrderTaxi.setRedPacketMoney(0D);//红包抵扣 |
| | | OrderTaxi.setCouponMoney(0D);//优惠券抵扣 |
| | | OrderTaxi.setDiscount(0D);//优惠抵扣 |
| | |
| | | // OrderTaxi.setLongDistance(new BigDecimal((d > rule.getDouble("num6")) ? d - rule.getDouble("num6") : 0).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | OrderTaxi.setLongDistance(new BigDecimal((d > rule.getDouble("num6")) ? d - rule.getDouble("num6") : 0).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | OrderTaxi.setLongDistanceMoney(new BigDecimal(yt1 + yt2 + yt3).setScale(2, BigDecimal.ROUND_DOWN).doubleValue());//远途费 |
| | | OrderTaxi.setParkMoney(parkingFee);//停车费 |
| | | OrderTaxi.setRoadTollMoney(crossingFee);//过路费 |
| | | OrderTaxi.setParkMoney(Objects.isNull(parkingFee)?0D:parkingFee);//停车费 |
| | | OrderTaxi.setRoadTollMoney(Objects.isNull(crossingFee)?0D:crossingFee);//过路费 |
| | | OrderTaxi.setRedPacketMoney(0D);//红包抵扣 |
| | | OrderTaxi.setCouponMoney(0D);//优惠券抵扣 |
| | | OrderTaxi.setDiscount(0D);//优惠抵扣 |