# Conflicts:
#	pom.xml
#	src/main/java/org/ccalm/weather/AirTemperature.java
#	src/main/java/org/ccalm/weather/SoilTmperature.java
This commit is contained in:
2024-07-08 12:38:03 +05:00
3 changed files with 27 additions and 1 deletions

View File

@ -256,6 +256,13 @@ public class Precipitation implements ServletContextAware {
logger.error("N6:"+ex.getMessage(),ex);
}
logger.info("Delete old data 3");
try {
String sql="delete from main.precipitation_dates where date=cast(to_timestamp('"+date+" "+time+"', 'YYYYMMDD HH24') as timestamp without time zone) and hours="+forecast;
st.executeUpdate(sql);
} catch (SQLException ex) {
logger.info(ex.getMessage());
}
System.out.println("Delete old data 3");
try {
String sql="delete from main.precipitation where date<=CURRENT_DATE-'730 days'::INTERVAL";
st.executeUpdate(sql);