| | |
| | | } |
| | | |
| | | // 天气预报动态调价 |
| | | 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(); |
| | |
| | | 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; |
| | | } |
| | |
| | | } |
| | | |
| | | // 天气预报动态调价 |
| | | 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(); |
| | |
| | | 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; |
| | | } |