From 48fec1634b25b672450b645eeb4f133216112119 Mon Sep 17 00:00:00 2001
From: yyy <1083599556@qq.com>
Date: 星期日, 17 五月 2026 23:56:36 +0800
Subject: [PATCH] 修改bug

---
 xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java b/xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
index 31638f7..0ff139d 100644
--- a/xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
+++ b/xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
@@ -2542,7 +2542,7 @@
                             }
 
                             // 天气预报动态调价
-                            JSONArray ws = jsonObject.getJSONArray("weather");
+                            JSONArray ws = jsonObject.getJSONArray("weatherRules");
                             if (null != ws) {
                                 WeatherDTO data = xpMapClient.wether(order.getCityCode()).getData();
                                 List<WeatherDTO.Lives> lives = data.getLives();
@@ -2550,8 +2550,8 @@
                                     String w = lives.get(0).getWeather();
                                     for (Object o : ws) {
                                         JSONObject ele = JSONObject.parseObject(o.toString());
-                                        if (w.contains(ele.getString("weatherType"))) {
-                                            double floatRate = jsonObject.getDouble("ratio");
+                                        if (w.contains(ele.getString("weatherType")) || ele.getString("weatherType").contains(w)) {
+                                            double floatRate = ele.getDouble("ratio");
                                             priceRate = new BigDecimal(priceRate).add(new BigDecimal(floatRate)).doubleValue();
                                             break;
                                         }
@@ -2663,7 +2663,7 @@
                             }
 
                             // 天气预报动态调价
-                            JSONArray ws = jsonObject.getJSONArray("weather");
+                            JSONArray ws = jsonObject.getJSONArray("weatherRules");
                             if (null != ws) {
                                 WeatherDTO data = xpMapClient.wether(order.getCityCode()).getData();
                                 List<WeatherDTO.Lives> lives = data.getLives();
@@ -2671,8 +2671,8 @@
                                     String w = lives.get(0).getWeather();
                                     for (Object o : ws) {
                                         JSONObject ele = JSONObject.parseObject(o.toString());
-                                        if (w.contains(ele.getString("weatherType"))) {
-                                            double floatRate = jsonObject.getDouble("ratio");
+                                        if (w.contains(ele.getString("weatherType")) || ele.getString("weatherType").contains(w)) {
+                                            double floatRate = ele.getDouble("ratio");
                                             priceRate = new BigDecimal(priceRate).add(new BigDecimal(floatRate)).doubleValue();
                                             break;
                                         }

--
Gitblit v1.7.1