From eaa61bc9ecd9158f192f9999845cb2f05e6970fb Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期四, 21 八月 2025 02:09:02 +0800
Subject: [PATCH] 修改bug

---
 driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/OrderServiceImpl.java |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/OrderServiceImpl.java b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/OrderServiceImpl.java
index c625cf3..0f8679a 100644
--- a/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/OrderServiceImpl.java
+++ b/driver/guns-admin/src/main/java/com/supersavedriving/driver/modular/system/service/impl/OrderServiceImpl.java
@@ -999,6 +999,17 @@
             Map<String, String> distance1 = MapUtil.getDistance(orderInfoWarpper.getStartLng() + "," + orderInfoWarpper.getStartLat(), value, 0);
             orderInfoWarpper.setPickUpTime(Integer.valueOf(distance1.get("duration")) / 60);
         }
+
+        Map<String, String> distance = MapUtil.getDistance(order.getStartLng() + "," + order.getStartLat(), order.getEndLng() + "," + order.getEndLat(), 1);
+        if(null != distance){
+            Double d = Double.valueOf(distance.get("distance")) / 1000;
+            orderInfoWarpper.setEstimatedMileage(d);
+            orderInfoWarpper.setEstimatedTime(Double.valueOf(Integer.valueOf(distance.get("duration")) / 60));
+            Driver driver = driverService.selectById(uid);
+            Order orderPrice = getOrderPrice(1, d, 0, order, "", driver.getBranchOfficeId());
+            orderInfoWarpper.setEstimatedPrice(orderPrice.getEstimatedPrice());
+        }
+
         orderInfoWarpper.setDriverId(order.getDriverId());
         return orderInfoWarpper;
     }
@@ -1168,7 +1179,8 @@
                         .where("'" + geocode.getCity() + "' like CONCAT('%', city, '%') and '" + geocode.getDistrict() + "' like CONCAT('%', district, '%') "));
                 city = null != weatherCity ? weatherCity.getId().toString() : "";
             }
-            boolean badWeather = WeatherUtil.isBadWeather(city);
+//            boolean badWeather = WeatherUtil.isBadWeather(city);
+            boolean badWeather = false;
             if(badWeather){
                 Integer num8 = JSON.parseObject(systemConfig.getContent()).getInteger("num8");
                 if(num8 > 0){

--
Gitblit v1.7.1