diff --git a/src/db.rs b/src/db.rs index 1e7fb1a..2fcfca6 100644 --- a/src/db.rs +++ b/src/db.rs @@ -28,7 +28,7 @@ pub async fn insert_weather_data(pool: &PgPool, weather_data: &WeatherData) -> R user_id, title, date, hour, min, longitude, latitude, daysincejanfirst, theta, solardeclination, sunaltitude, overallcloudiness, lowcloudiness, cloudindex, solarradiationlevel, hasmeasuredwindspeed, measuredwindspeed, - convertedwindspeed, measurementheight, areatype, pointwindspeed, + convertedwindspeed, pointheight, areatype, pointwindspeed, atmosphericstability, suitabilitydegree, winddirection, averagewinddirection, winddirectionstandarddeviation, windspeed, averagewindspeed, windspeedsuitability, winddirectionsuitability, overallsuitability, inspectiontype, assignmentnumber, @@ -59,7 +59,7 @@ pub async fn insert_weather_data(pool: &PgPool, weather_data: &WeatherData) -> R .bind(weather_data.has_measured_wind_speed) .bind(weather_data.measured_wind_speed) // <-- 修改: 直接绑定 Option .bind(weather_data.converted_wind_speed) // <-- 修改: 直接绑定 Option,并移除 `as i32` - .bind(weather_data.measurement_height) // <-- 修改: 直接绑定 Option + .bind(weather_data.point_height) // <-- 修改: 直接绑定 Option .bind(&weather_data.area_type) .bind(weather_data.point_wind_speed) // <-- 修改: 直接绑定 Option .bind(&weather_data.atmospheric_stability) @@ -127,7 +127,7 @@ pub async fn get_weather_details(pool: &PgPool, weather_id: i32) -> Result, // <-- 修改: f64 -> Option + pub measured_wind_speed: Option, - #[serde(rename = "measurementHeight")] - #[sqlx(rename = "measurementheight")] - pub measurement_height: Option, // <-- 修改: f64 -> Option + #[serde(rename = "pointHeight")] + #[sqlx(rename = "pointheight")] + pub point_height: Option, #[serde(rename = "min")] #[sqlx(rename = "min")] diff --git a/static/js/afterbody.js b/static/js/afterbody.js index 3f9c587..ec076a8 100644 --- a/static/js/afterbody.js +++ b/static/js/afterbody.js @@ -305,7 +305,7 @@ ${data.hasSpotCheckWindSpeed ? `
测点高度:
-
${data.measurementHeight} m
+
${data.pointHeight} m
点位风速: