| | |
| | | Integer oldState = 0; |
| | | Long startServiceTime = null; |
| | | Double servedMileage = null; |
| | | String tripId = ""; |
| | | switch (orderType){ |
| | | case 1: |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | tripId = redisUtil.getValue("trip" + orderPrivateCar.getUserId()); |
| | | if(orderPrivateCar == null){ |
| | | this.removeTask(orderId, orderType); |
| | | }else{ |
| | |
| | | break; |
| | | case 2: |
| | | OrderTaxi orderTaxi = orderTaxiService.selectById(orderId); |
| | | tripId = redisUtil.getValue("trip" + orderTaxi.getUserId()); |
| | | if(orderTaxi == null){ |
| | | this.removeTask(orderId, orderType); |
| | | }else{ |
| | |
| | | break; |
| | | case 3: |
| | | OrderCrossCity orderCrossCity = orderCrossCityService.selectById(orderId); |
| | | tripId = redisUtil.getValue("trip" + orderCrossCity.getUserId()); |
| | | if(orderCrossCity == null){ |
| | | this.removeTask(orderId, orderType); |
| | | }else{ |
| | |
| | | break; |
| | | case 4: |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId); |
| | | tripId = redisUtil.getValue("trip" + orderLogistics.getUserId()); |
| | | if(orderLogistics == null){ |
| | | this.removeTask(orderId, orderType); |
| | | }else{ |
| | |
| | | break; |
| | | case 5: |
| | | OrderLogistics orderLogistics1 = orderLogisticsService.selectById(orderId); |
| | | tripId = redisUtil.getValue("trip" + orderLogistics1.getUserId()); |
| | | if(orderLogistics1 == null){ |
| | | this.removeTask(orderId, orderType); |
| | | }else{ |
| | |
| | | if(ToolUtil.isNotEmpty(value) && ToolUtil.isNotEmpty(startLonLat)){ |
| | | String[] split = value.split(","); |
| | | String[] split1 = startLonLat.split(","); |
| | | DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(split[1]), Double.valueOf(split[0]), Double.valueOf(split1[1]), Double.valueOf(split1[0])); |
| | | DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(split[1]), Double.valueOf(split[0]), Double.valueOf(split1[1]), Double.valueOf(split1[0]), tripId); |
| | | if(null == distancematrix){ |
| | | System.err.println("地图获取距离出错"); |
| | | }else{ |
| | |
| | | if(ToolUtil.isNotEmpty(value) && ToolUtil.isNotEmpty(endLonLat)){ |
| | | String[] split = value.split(","); |
| | | String[] split1 = endLonLat.split(","); |
| | | DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(split[1]), Double.valueOf(split[0]), Double.valueOf(split1[1]), Double.valueOf(split1[0])); |
| | | DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(split[1]), Double.valueOf(split[0]), Double.valueOf(split1[1]), Double.valueOf(split1[0]), tripId); |
| | | if(null == distancematrix){ |
| | | System.err.println("地图获取距离出错"); |
| | | }else{ |