From 1352a1ab3dcd5d69f0ddfdcc8718fd45239e960d Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 21 三月 2025 21:47:59 +0800
Subject: [PATCH] 代码

---
 UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java b/UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
index 0b99ce3..4552bb6 100644
--- a/UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
+++ b/UserOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java
@@ -1073,7 +1073,10 @@
                 value = map.get("lon") + "," + map.get("lat");
             }
         }
-        Map<String, String> distance = gdMapElectricFenceUtil.getDistance(value, orderTaxi.getStartLon() + "," + orderTaxi.getStartLat(), 1);
+        // todo 注意 因更换地图为百度 两者lon和lat位置互换了
+        String[] split = value.split(",");
+        value = split[1] + "," + split[0];
+        Map<String, String> distance = gdMapElectricFenceUtil.getDistance(value, orderTaxi.getStartLat() + "," + orderTaxi.getStartLon(), 1);
         String d = "0";
         String t = "0";
         if(null == distance){
@@ -1086,8 +1089,8 @@
         orderServerWarpper.setOrderId(orderTaxi.getId());
         orderServerWarpper.setOrderType(2);
         orderServerWarpper.setState(orderTaxi.getState());
-        orderServerWarpper.setLon(null != value ? value.split(",")[0] : "0.0");
-        orderServerWarpper.setLat(null != value ? value.split(",")[1] : "0.0");
+        orderServerWarpper.setLon(null != value ? value.split(",")[1] : "0.0");
+        orderServerWarpper.setLat(null != value ? value.split(",")[0] : "0.0");
         value = value == null ? "0.0,0.0" : value;
         double[] doubles = GpsCoordinateUtils.calBD09toGCJ02(Double.parseDouble(value.split(",")[1]), Double.parseDouble(value.split(",")[0]));
         orderServerWarpper.setNextLongitude(String.valueOf(doubles[0]));
@@ -1110,7 +1113,7 @@
             orderServerWarpper.setLaveTime("0");
         }
         if(orderTaxi.getState() == 5 || orderTaxi.getState() == 6){//服务中
-            distance = gdMapElectricFenceUtil.getDistance(value, orderTaxi.getEndLon() + "," + orderTaxi.getEndLat(), 1);
+            distance = gdMapElectricFenceUtil.getDistance(value, orderTaxi.getEndLat() + "," + orderTaxi.getEndLon(), 1);
             if(null == distance){
                 System.err.println("查询距离出错了");
             }else{
@@ -1272,10 +1275,10 @@
             orderTaxi.setPayMoney(query.getAmount());
             this.updateById(orderTaxi);
 
-            UserInfo userInfo = userInfoService.selectById(orderTaxi.getUserId());
-            SysIntegral query1 = sysIntegralMapper.query(orderTaxi.getCompanyId());
-            userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分
-            userInfoService.updateById(userInfo);
+//            UserInfo userInfo = userInfoService.selectById(orderTaxi.getUserId());
+//            SysIntegral query1 = sysIntegralMapper.query(orderTaxi.getCompanyId());
+//            userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分
+//            userInfoService.updateById(userInfo);
 
             //处理优惠券和红包
             if(null != orderTaxi.getCouponId()){

--
Gitblit v1.7.1