From d8440cc93f48e5a4b932d8daf740023e16d65008 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 18 五月 2026 00:07:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/1.0' into 1.0

---
 xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/utils/XpPricingUtil.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/utils/XpPricingUtil.java b/xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/utils/XpPricingUtil.java
index e553206..342f76e 100644
--- a/xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/utils/XpPricingUtil.java
+++ b/xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/utils/XpPricingUtil.java
@@ -116,7 +116,7 @@
                                 priceRate =  new BigDecimal(priceRate).multiply(divide).add(new BigDecimal(priceRate)).setScale(2, RoundingMode.HALF_UP).doubleValue();
                             }
                             //天气动态调价
-                            JSONArray ws = jsonObject.getJSONArray("weather");
+                            JSONArray ws = jsonObject.getJSONArray("weatherRules");
                             if(null != ws){
                                 XpOpenCity openCity = openCityClient.getXpOpenCityById(openCityId).getData();
                                 WeatherDTO data = xpMapClient.wether(openCity.getCityCode()).getData();
@@ -125,8 +125,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;
                                         }
@@ -227,7 +227,7 @@
                             }
 
                             // 天气预报动态调价
-                            JSONArray ws = jsonObject.getJSONArray("weather");
+                            JSONArray ws = jsonObject.getJSONArray("weatherRules");
                             if (null != ws) {
                                 XpOpenCity openCity = openCityClient.getXpOpenCityById(openCityId).getData();
                                 WeatherDTO data = xpMapClient.wether(openCity.getCityCode()).getData();
@@ -236,8 +236,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