| | |
| | | @ApiImplicitParam(value = "流程操作状态(3=开始出发预约点,4=到达预约点,5=开始服务,6=服务结束)", name = "state", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "当前经度", name = "lon", required = true, dataType = "double"), |
| | | @ApiImplicitParam(value = "当前纬度", name = "lat", required = true, dataType = "double"), |
| | | @ApiImplicitParam(value = "支付方式 1=线上 2=线下支付", name = "payManner", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil process(Integer orderId, Integer orderType, Integer state, Double lon, Double lat,Integer payManner, HttpServletRequest request){ |
| | | public ResultUtil process(Integer orderId, Integer orderType, Integer state, Double lon, Double lat,HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return orderService.process(orderId, orderType, state, uid, lon, lat,payManner); |
| | | return orderService.process(orderId, orderType, state, uid, lon, lat); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception; |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception { |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception { |
| | | OrderCrossCity orderCrossCity = this.selectById(orderId); |
| | | switch (state){ |
| | | case 3://出发前往预约点 |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception; |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception { |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception { |
| | | OrderLogistics orderLogistics = this.selectById(orderId); |
| | | switch (state){ |
| | | case 3://出发前往预约点 |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payType) throws Exception; |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception; |
| | | ResultUtil specail(Integer orderId, Double lon, Double lat, String endAddress) throws Exception; |
| | | |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception { |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | System.err.println("==========="+orderId); |
| | | switch (state){ |
| | |
| | | orderPrivateCar.setGetoffAddress(address); |
| | | orderPrivateCar.setGetoffTime(new Date()); |
| | | orderPrivateCar.setEndServiceTime(new Date()); |
| | | orderPrivateCar.setPayManner(payManner); |
| | | if(payManner==2){ |
| | | orderPrivateCar.setState(8); |
| | | } |
| | | |
| | | |
| | | // //设置结束的时候的经纬度 |
| | | // if (orderPrivateCar.getEndLat()!=null){ |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil process(Integer orderId, Integer orderType, Integer state, Integer uid, Double lon, Double lat,Integer payManner) throws Exception; |
| | | ResultUtil process(Integer orderId, Integer orderType, Integer state, Integer uid, Double lon, Double lat) throws Exception; |
| | | ResultUtil specail(Integer orderId, Integer uid, Double lon, Double lat,String endAddress) throws Exception; |
| | | |
| | | |
| | |
| | | |
| | | Map<String, Object> queryOrderInfo(Integer orderId) throws Exception; |
| | | |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception; |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception; |
| | | |
| | | Map<String, Object> queryMoneyInfo(Integer orderId) throws Exception; |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil process(Integer orderId, Integer orderType, Integer state, Integer uid, Double lon, Double lat,Integer payManner) throws Exception { |
| | | public ResultUtil process(Integer orderId, Integer orderType, Integer state, Integer uid, Double lon, Double lat) throws Exception { |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(String.valueOf(lon), String.valueOf(lat)); |
| | | String address = geocode.get("address"); |
| | | switch (orderType){ |
| | | case 1://专车 |
| | | return orderPrivateCarService.process(orderId, state, lon, lat, address,payManner); |
| | | return orderPrivateCarService.process(orderId, state, lon, lat, address); |
| | | case 2://出租 |
| | | return orderTaxiService.process(orderId, state, lon, lat, address,payManner); |
| | | return orderTaxiService.process(orderId, state, lon, lat, address); |
| | | case 3://城际 |
| | | return orderCrossCityService.process(orderId, state, lon, lat, address,payManner); |
| | | return orderCrossCityService.process(orderId, state, lon, lat, address); |
| | | case 4://同城小件 |
| | | return orderLogisticsService.process(orderId, state, lon, lat, address,payManner); |
| | | return orderLogisticsService.process(orderId, state, lon, lat, address); |
| | | case 5://跨城小件 |
| | | return orderLogisticsService.process(orderId, state, lon, lat, address,payManner); |
| | | return orderLogisticsService.process(orderId, state, lon, lat, address); |
| | | case 6: |
| | | break; |
| | | case 7://专车 |
| | | return orderTransferService.process(orderId, state, lon, lat, address,payManner); |
| | | return orderTransferService.process(orderId, state, lon, lat, address); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | return map; |
| | | } |
| | | @Override |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception { |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception { |
| | | TOrderTransfer orderPrivateCar = this.selectById(orderId); |
| | | switch (state){ |
| | | case 3://出发前往预约点 |
| | |
| | | orderPrivateCar.setGetoffTime(new Date()); |
| | | orderPrivateCar.setEndServiceTime(new Date()); |
| | | |
| | | orderPrivateCar.setPayManner(payManner); |
| | | if(payManner == 2){ |
| | | orderPrivateCar.setState(8); |
| | | } |
| | | |
| | | // //设置结束的时候的经纬度 |
| | | // if (orderPrivateCar.getEndLat()!=null){ |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception; |
| | | ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception; |
| | | |
| | | |
| | | /** |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address,Integer payManner) throws Exception { |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception { |
| | | OrderTaxi orderTaxi = this.selectById(orderId); |
| | | switch (state){ |
| | | case 3://出发前往预约点 |
| | |
| | | orderTaxi.setState(6); |
| | | orderTaxi.setEndServiceTime(new Date()); |
| | | |
| | | orderTaxi.setPayManner(payManner); |
| | | if(payManner==2){ |
| | | orderTaxi.setState(8); |
| | | } |
| | | |
| | | pushUtil.removeTask(orderId, 2);//删除定时任务,结束推送数据 |
| | | systemNoticeService.addSystemNotice(1, "司机已结束本次行程,谢谢使用", orderTaxi.getUserId()); |