| | |
| | | |
| | | <select id="selectByTimeForYj" resultMap="WarningDetailResult"> |
| | | with rs as (select jcyj, jcbj from alert_config limit 1) |
| | | select id, table_name, su_yuan_id, location_name, 1 "type", create_time, value |
| | | select id, table_name, su_yuan_id, location_name, 1 "type", create_time, format(value, 2) "value" |
| | | from warning_detail |
| | | where create_time between #{startTime} and #{endTime} |
| | | and value >= (select jcyj from rs) and value < (select jcbj from rs) |
| | |
| | | |
| | | <select id="selectByTimeForBj" resultMap="WarningDetailResult"> |
| | | with rs as (select jcyj, jcbj from alert_config limit 1) |
| | | select id, table_name, su_yuan_id, location_name, 0 "type", create_time, value |
| | | select id, table_name, su_yuan_id, location_name, 0 "type", create_time, format(value, 2) "value" |
| | | from warning_detail |
| | | where create_time between #{startTime} and #{endTime} |
| | | and value >= (select jcbj from rs) |