| | |
| | | warpper.setStartLon(orderTaxi.getStartLon()); |
| | | warpper.setEndLat(orderTaxi.getEndLat()); |
| | | warpper.setEndLon(orderTaxi.getEndLon()); |
| | | ResultUtil<Double> forecastPrice = getForecastPrice(warpper); |
| | | if(forecastPrice.getCode() != 200){ |
| | | return ResultUtil.error(forecastPrice.getMsg()); |
| | | } |
| | | orderTaxi.setOrderMoney(forecastPrice.getData()); |
| | | |
| | | if (!StringUtils.hasLength(orderTaxi.getPassengers()) || StringUtils.hasLength(orderTaxi.getPassengersPhone()) ){ |
| | | // 如果没有填写乘车人电话或者姓名 那么用用户的 |
| | |
| | | @Override |
| | | public List<Map<String, Object>> queryCoupon(Integer orderId, Integer uid, Integer pageNum, Integer size) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(orderId); |
| | | List<Map<String, Object>> list = userCouponRecordService.queryCoupon(uid, null, 1, 2, orderTaxi.getOrderMoney(), pageNum, size); |
| | | List<Map<String, Object>> list1 = userCouponRecordService.queryCoupon(uid, null, 1, 0, orderTaxi.getOrderMoney(), pageNum, size); |
| | | Driver driver = driverService.selectById(orderTaxi.getDriverId()); |
| | | Integer companyId = driver.getCompanyId(); |
| | | List<CompanyCity> companyCityList = companyCityService.selectList(new EntityWrapper<CompanyCity>().eq("companyId", companyId)); |
| | | List<Map<String, Integer>> cityCode = new ArrayList<>(); |
| | | for (CompanyCity companyCity : companyCityList) { |
| | | Map<String, Integer> city = new HashMap<>(); |
| | | if(ToolUtil.isNotEmpty(companyCity.getAreaCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getAreaCode())); |
| | | }else if(ToolUtil.isEmpty(companyCity.getAreaCode()) && ToolUtil.isNotEmpty(companyCity.getCityCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getCityCode())); |
| | | }else if(ToolUtil.isEmpty(companyCity.getCityCode()) && ToolUtil.isNotEmpty(companyCity.getProvinceCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getProvinceCode())); |
| | | } |
| | | } |
| | | List<Map<String, Object>> list = userCouponRecordService.queryCoupon1(uid, JSON.toJSONString(cityCode), 1, 2, orderTaxi.getOrderMoney(), pageNum, size); |
| | | List<Map<String, Object>> list1 = userCouponRecordService.queryCoupon1(uid, JSON.toJSONString(cityCode), 1, 0, orderTaxi.getOrderMoney(), pageNum, size); |
| | | list.addAll(list1); |
| | | return list; |
| | | } |
| | |
| | | |
| | | |
| | | systemNoticeService.addSystemNotice(1, "您已使用" + (type == 1 ? "微信" : "支付宝") + "成功完成出行订单支付,谢谢使用!", orderTaxi.getUserId(), 1); |
| | | //添加司机消息提醒 |
| | | systemNoticeService.addSystemNotice(2, "用户已线上完成支付", driver.getId(), 1); |
| | | //推送状态,让司机端播报语音 |
| | | pushUtil.pushOrderState(2, orderTaxi.getDriverId(), orderTaxi.getId(), 2, orderTaxi.getState(), 0); |
| | | }else{ |
| | | System.err.println("预支付数据异常(orderId = " + id + ")"); |
| | | } |