| | |
| | | condition = "20"; |
| | | } else if ("雨".equals(text)) { |
| | | condition = "0"; |
| | | }else { |
| | | condition = "50"; |
| | | } |
| | | nextDayMap.put("condition", condition); |
| | | } |
| | |
| | | String nextDayTemp = dataMap.get("temp").toString(); |
| | | String nextDayCloud = dataMap.get("cloud").toString(); |
| | | Integer condition = Integer.valueOf(dataMap.get("condition").toString()); |
| | | String value=""; |
| | | Integer value=0; |
| | | if (condition >= 80) { |
| | | value = "80"; |
| | | value = 80; |
| | | } else if (condition >= 40) { |
| | | value = "40"; |
| | | value = 40; |
| | | } else if (condition >= 0) { |
| | | value = "0"; |
| | | value = 0; |
| | | } |
| | | map.put("condition", value); |
| | | List<Map<String, Object>> tempAndCloudList = realWeatherMapper.getTempAndCloud(map); |
| | |
| | | Double n = Double.valueOf(cmap.get("n").toString()); |
| | | double beam = n * Double.valueOf(nextDayCloud) + m; |
| | | if (beam < 1.0) { |
| | | beam=1.0; |
| | | beam=0.0; |
| | | } |
| | | dataMap.put("beam", String.valueOf(Math.round(beam))); |
| | | } |