From de71d925566922784d315ef86045528a651dd07c Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Mon, 16 Nov 2020 16:35:03 +0800
Subject: [PATCH] 更改报表导出时间段
---
src/main/resources/mapper/ForecastWeatherMapper.xml | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/main/resources/mapper/ForecastWeatherMapper.xml b/src/main/resources/mapper/ForecastWeatherMapper.xml
index a7ecfcc..d9403c5 100644
--- a/src/main/resources/mapper/ForecastWeatherMapper.xml
+++ b/src/main/resources/mapper/ForecastWeatherMapper.xml
@@ -33,13 +33,24 @@
<select id="getPrecip6Hour" resultType="java.util.Map">
- select
- round(sum(json->'$.precip'),2) 'precip6'
- FROM
- forecast_weather
- WHERE
- time >= #{start}
- AND time <![CDATA[<]]> #{end}
- AND city_code = #{cityCode}
+ select
+ round(sum(json->'$.precip'),2) 'precip6'
+ FROM
+ forecast_weather
+ WHERE
+ time >= #{start}
+ AND time <![CDATA[<]]> #{end}
+ AND city_code = #{cityCode}
+ </select>
+
+ <select id="getO38Hours" resultType="java.util.Map">
+ select
+ cast(AVG(json->'$.O3C') as UNSIGNED integer) 'O3_8H'
+ FROM
+ forecast_weather
+ WHERE
+ time >= #{start}
+ AND time <![CDATA[<]]> #{end}
+ AND city_code = #{cityCode}
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0