From 1f41490f50b3861f68e54cd8aebee37549bab3eb Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期六, 08 二月 2025 17:23:41 +0800
Subject: [PATCH] 补充

---
 UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java |   38 +++++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java b/UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
index 2c86ade..85f6856 100644
--- a/UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
+++ b/UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -1281,7 +1281,7 @@
                         case 1:
                             break;
                         case 2:
-                            orderTaxiService.payOrderTaxiCallback(id, order_id, 2);
+                            orderTaxiService.payOrderTaxiCallback(id, order_id, 1);
                             break;
                         case 3:
                             break;
@@ -1414,22 +1414,34 @@
                                            HttpServletRequest request, HttpServletResponse response){
         try {
             String url = "https://api.map.baidu.com/directionlite/v1/driving?origin="
-                    +startLat+","+startLon+"&destination="+nextLatitude+","+nextLongitude+"&ak=WQhfsluNzEeUHUxoH4jc4JiCQOXw4Mnx&ret_coordtype=bd09ll&coord_type=bd09ll";
+                    +startLat+","+startLon+"&destination="+nextLatitude+","+nextLongitude+"&ak=WQhfsluNzEeUHUxoH4jc4JiCQOXw4Mnx&ret_coordtype=gcj02";
             String get = HttpUtil.get(url);
             JSONObject jsonObject = JSON.parseObject(get);
             JSONArray jsonArray = jsonObject.getJSONObject("result").getJSONArray("routes").getJSONObject(0).getJSONArray("steps");
 
-            for (int i = 0; i < jsonArray.size(); i++) {
-                JSONObject jsonObject1 = jsonArray.getJSONObject(i);
-                JSONObject start_location = jsonObject1.getJSONObject("start_location");
-                double[] doubles = GpsCoordinateUtils.calBD09toGCJ02(start_location.getDouble("lat"), start_location.getDouble("lng"));
-                start_location.put("lat", doubles[0]);
-                start_location.put("lng", doubles[1]);
-                JSONObject end_location = jsonObject1.getJSONObject("end_location");
-                double[] doubles1 = GpsCoordinateUtils.calBD09toGCJ02(end_location.getDouble("lat"), end_location.getDouble("lng"));
-                end_location.put("lat", doubles1[0]);
-                end_location.put("lng", doubles1[1]);
-            }
+//            for (int i = 0; i < jsonArray.size(); i++) {
+//                JSONObject jsonObject1 = jsonArray.getJSONObject(i);
+//                JSONObject start_location = jsonObject1.getJSONObject("start_location");
+//                double[] doubles = GpsCoordinateUtils.calBD09toGCJ02(start_location.getDouble("lat"), start_location.getDouble("lng"));
+//                start_location.put("lat", doubles[0]);
+//                start_location.put("lng", doubles[1]);
+//                JSONObject end_location = jsonObject1.getJSONObject("end_location");
+//                double[] doubles1 = GpsCoordinateUtils.calBD09toGCJ02(end_location.getDouble("lat"), end_location.getDouble("lng"));
+//                end_location.put("lat", doubles1[0]);
+//                end_location.put("lng", doubles1[1]);
+//            }
+//            for (int i = 0; i < jsonArray.size(); i++) {
+//                JSONObject jsonObject1 = jsonArray.getJSONObject(i);
+//                String path = jsonObject1.getString("path");
+//                String[] split = path.split(";");
+//                StringBuilder temp = new StringBuilder();
+//                for (String s : split) {
+//                    String[] split1 = s.split(",");
+//                    double[] doubles = GpsCoordinateUtils.calBD09toGCJ02(Double.valueOf(split1[0]), Double.valueOf(split1[1]));
+//                    temp.append(doubles[0]).append(",").append(doubles[1]).append(";");
+//                }
+//                jsonObject1.put("path", temp.toString());
+//            }
             System.out.println(jsonArray);
             return ResultUtil.success(jsonArray);
         }catch (Exception e){

--
Gitblit v1.7.1