Compare commits

...

2 Commits

  1. 9
      zc-business/src/main/java/com/zc/business/utils/WeatherTrafficProposeUtil.java

9
zc-business/src/main/java/com/zc/business/utils/WeatherTrafficProposeUtil.java

@ -33,7 +33,8 @@ public class WeatherTrafficProposeUtil {
return condition;
}
}
throw new IllegalArgumentException("No matching WeatherCondition found for level: " + level + " and description: " + description);
return null;
// throw new IllegalArgumentException("No matching WeatherCondition found for level: " + level + " and description: " + description);
}
}
@ -111,8 +112,12 @@ public class WeatherTrafficProposeUtil {
public static String content(int warningLevelStringNumber, String earlyWarningTypeStringNumber){
WeatherCondition condition = WeatherCondition.fromLevelAndDescription(warningLevelStringNumber, earlyWarningTypeStringNumber);
if(condition !=null) {
System.out.println("Weather Condition: " + condition.name() + ", Level: " + condition.getLevel() + ", Description: " + condition.getDescription());
return "建议速度为"+getSpeedLimit(condition) + " km/h ;\n" + getTrafficControlAdvice(condition) + "\n" + getVehicleControlAdvice(condition);
return "建议速度为" + getSpeedLimit(condition) + " km/h ;\n" + getTrafficControlAdvice(condition) + "\n" + getVehicleControlAdvice(condition);
}else{
return "";
}
}
public static void main(String[] args) {

Loading…
Cancel
Save