| | |
| | | }).start(); |
| | | } |
| | | |
| | | |
| | | System.err.println("===="+orderPrivateCar.getState()); |
| | | //推单操作 |
| | | if(orderPrivateCar.getState() == 1){ |
| | | this.pushOrder(orderPrivateCar); |
| | | } |
| | | System.err.println("===="+orderPrivateCar.getState()); |
| | | |
| | | //添加消息 |
| | | systemNoticeService.addSystemNotice(1, "您的专车订单已下单成功,我们正在为您指派司机,请稍后!", orderPrivateCar.getUserId(), 1); |
| | |
| | | @Override |
| | | public List<Map<String, Object>> queryCoupon(Integer orderId, Integer uid, Integer pageNum, Integer size) throws Exception { |
| | | OrderTransferCar orderPrivateCar = this.selectById(orderId); |
| | | List<Map<String, Object>> list = userCouponRecordService.queryCoupon(uid, orderPrivateCar.getCompanyId(), 1, 1, orderPrivateCar.getOrderMoney(), pageNum, size); |
| | | List<Map<String, Object>> list = userCouponRecordService.queryCoupon(uid, orderPrivateCar.getCompanyId(), 1, 7, orderPrivateCar.getOrderMoney(), pageNum, size); |
| | | List<Map<String, Object>> list1 = userCouponRecordService.queryCoupon(uid, orderPrivateCar.getCompanyId(), 1, 0, orderPrivateCar.getOrderMoney(), pageNum, size); |
| | | list.addAll(list1); |
| | | return list; |
| | |
| | | //计算折扣 |
| | | UserActivityDiscount1 query2 = userActivityDiscount1Mapper.query(orderPrivateCar.getCompanyId()); |
| | | if(null != query2){ |
| | | Double special = query2.getSpecial(); |
| | | Double special = query2.getTaxi(); |
| | | orderPrivateCar.setDiscount(special); |
| | | double v = new BigDecimal(orderMoney).multiply(new BigDecimal(special / 10)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | if(orderMoney.compareTo(v) > 0){ |
| | |
| | | |
| | | //添加已收入明细 |
| | | Company company = companyService.selectById(orderPrivateCar.getCompanyId()); |
| | | Double speMoney = company.getSpeMoney(); |
| | | Double speMoney = company.getTransferMoney(); |
| | | BigDecimal d = null;//企业收入 |
| | | BigDecimal c = null;//司机收入 |
| | | if(company.getIsSpeFixedOrProportional() == 2){//固定 |
| | | if(company.getIsTransferFixedOrProportional()!=null&&company.getIsTransferFixedOrProportional() == 2){//固定 |
| | | d = new BigDecimal(speMoney); |
| | | c = new BigDecimal(orderPrivateCar.getOrderMoney()).subtract(d);//只有出行金额参与抽成,其余归属司机 |
| | | } |
| | | if(company.getIsSpeFixedOrProportional() == 1){//比例 |
| | | if(company.getIsTransferFixedOrProportional()!=null&&company.getIsTransferFixedOrProportional() == 1){//比例 |
| | | Double price = orderPrivateCar.getStartMoney() + orderPrivateCar.getMileageMoney() + orderPrivateCar.getWaitMoney() + orderPrivateCar.getDurationMoney() + orderPrivateCar.getLongDistanceMoney(); |
| | | d = new BigDecimal(price).multiply(new BigDecimal(speMoney).divide(new BigDecimal(100), new MathContext(2, RoundingMode.HALF_EVEN))).setScale(2, BigDecimal.ROUND_HALF_EVEN); |
| | | c = new BigDecimal(orderPrivateCar.getOrderMoney()).subtract(d).setScale(2, BigDecimal.ROUND_HALF_EVEN); |