| | |
| | | * 订单发起接口 |
| | | * @param orderId |
| | | */ |
| | | public void orderCreate(Integer orderId) throws Exception { |
| | | public void orderCreate(Integer orderId) { |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | Map<String, Object> query = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | if (orderPrivateCar.getBoardingLon()!=null && orderPrivateCar.getBoardingLat()!=null){ |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("Address", geocode.get("provinceCode"));//发起第行政区划代码 |
| | |
| | | * 订单成功接口 |
| | | * @param orderId |
| | | */ |
| | | public void orderMatch(Integer orderId) throws Exception { |
| | | public void orderMatch(Integer orderId) { |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | Car car = carService.selectById(orderPrivateCar.getCarId()); |
| | | String value = redisUtil.getValue("DRIVER" + orderPrivateCar.getDriverId()); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | if (orderPrivateCar.getBoardingLon()!=null && orderPrivateCar.getBoardingLat()!=null){ |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("Address", geocode.get("provinceCode"));//发起第行政区划代码 |
| | |
| | | * 经营支付接口 |
| | | * @param orderId |
| | | */ |
| | | public void operatePay(Integer orderId) throws Exception { |
| | | public void operatePay(Integer orderId) { |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | Map<String, Object> query = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); |
| | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("OrderId", orderPrivateCar.getOrderNum());//订单号 |
| | | if (orderPrivateCar.getBoardingLon()!=null && orderPrivateCar.getBoardingLat()!=null){ |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("OnArea", geocode.get("provinceCode"));//发起第行政区划代码 |
| | |
| | | * 驾驶员定位信息 |
| | | * @param orderId |
| | | */ |
| | | public void positionDriver(Integer orderId) throws Exception { |
| | | public void positionDriver(Integer orderId) { |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | Car car = carService.selectById(orderPrivateCar.getCarId()); |
| | |
| | | } |
| | | jsonObject.put("LicenseId", driver.getIdCard());//机动车驾驶证号 |
| | | if (orderPrivateCar.getBoardingLon()!=null && orderPrivateCar.getBoardingLat()!=null){ |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("DriverRegionCode", geocode.get("provinceCode"));//发起第行政区划代码 |
| | |
| | | * 车辆定位信息 |
| | | * @param orderId |
| | | */ |
| | | public void positionVehicle(Integer orderId) throws Exception { |
| | | public void positionVehicle(Integer orderId) { |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | Car car = carService.selectById(orderPrivateCar.getCarId()); |
| | | List<OrderPosition> orderPositions = null; |
| | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("VehicleNo", car.getCarLicensePlate());//车辆号牌 |
| | | if (orderPrivateCar.getBoardingLon()!=null && orderPrivateCar.getBoardingLat()!=null){ |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("VehicleRegionCode", geocode.get("provinceCode"));//发起第行政区划代码 |