Browse Source

订正:首页查询天气报错

zhongwei
ty 10 months ago
parent
commit
1387e472ae
  1. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java

7
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java

@ -1598,7 +1598,12 @@ public class HydropowerServiceImpl implements HydropowerService {
* @return * @return
*/ */
private String intervalTemp(Map<String, HeWeatherWeatherDailyResponse> week, String code,boolean flag) { private String intervalTemp(Map<String, HeWeatherWeatherDailyResponse> week, String code,boolean flag) {
if(MapUtils.isEmpty(week) || !week.containsKey(code) || ObjectUtil.isEmpty(week.get(code))){ if(MapUtils.isEmpty(week) || !week.containsKey(code)
|| ObjectUtil.isEmpty(week.get(code))
|| CollectionUtil.isEmpty(week.get(code).getDaily())
|| ObjectUtil.isEmpty(week.get(code).getDaily().get(0))
|| ObjectUtil.isEmpty(week.get(code).getDaily().get(0).getTempMax())
|| ObjectUtil.isEmpty(week.get(code).getDaily().get(0).getTempMin())){
return "21"; return "21";
} }
if(flag){ if(flag){

Loading…
Cancel
Save