|
@@ -26,16 +26,16 @@
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="findByWarnTypeAndWarnLevelAndWarnTime" resultMap="BaseResultMap">
|
|
<select id="findByWarnTypeAndWarnLevelAndWarnTime" resultMap="BaseResultMap">
|
|
|
- select wi.warn_id,
|
|
|
|
|
- wi.warn_type,
|
|
|
|
|
- wi.warn_level,
|
|
|
|
|
- wi.center_lng,
|
|
|
|
|
- wi.center_lat,
|
|
|
|
|
|
|
+ select wi.warn_id as warn_id,
|
|
|
|
|
+ wi.warn_type as warn_type,
|
|
|
|
|
+ wi.warn_level as warn_level,
|
|
|
|
|
+ wi.center_lng as center_lng,
|
|
|
|
|
+ wi.center_lat as center_lat,
|
|
|
concat('[', wi.center_lng, ',', wi.center_lat, ']') as center_gis,
|
|
concat('[', wi.center_lng, ',', wi.center_lat, ']') as center_gis,
|
|
|
- wi.center_address,
|
|
|
|
|
- wi.warn_range,
|
|
|
|
|
|
|
+ wi.center_address as center_address,
|
|
|
|
|
+ wi.warn_range as warn_range,
|
|
|
(wi.warn_time at time zone 'utc')::timestamp as warn_time,
|
|
(wi.warn_time at time zone 'utc')::timestamp as warn_time,
|
|
|
- wi.message,
|
|
|
|
|
|
|
+ wi.message as message,
|
|
|
dwt.name as warn_type_name,
|
|
dwt.name as warn_type_name,
|
|
|
wd.warn_id as wd_warn_id,
|
|
wd.warn_id as wd_warn_id,
|
|
|
wd.dev_id as wd_dev_id,
|
|
wd.dev_id as wd_dev_id,
|
|
@@ -43,7 +43,18 @@
|
|
|
wd.dev_name as wd_dev_name,
|
|
wd.dev_name as wd_dev_name,
|
|
|
wd.value as wd_value,
|
|
wd.value as wd_value,
|
|
|
wd.unit as wd_unit
|
|
wd.unit as wd_unit
|
|
|
- from k1_pgn_pb_warning_info wi
|
|
|
|
|
|
|
+ from (select id,
|
|
|
|
|
+ warn_id,
|
|
|
|
|
+ warn_type,
|
|
|
|
|
+ warn_level,
|
|
|
|
|
+ center_lng,
|
|
|
|
|
+ center_lat,
|
|
|
|
|
+ center_address,
|
|
|
|
|
+ warn_range,
|
|
|
|
|
+ warn_time,
|
|
|
|
|
+ message,
|
|
|
|
|
+ deleted
|
|
|
|
|
+ from k1_pgn_pb_warning_info limit #{pageable.pageSize} offset #{pageable.offset}) wi
|
|
|
left join k1_pgn_pb_define_warning_type dwt on wi.warn_type = dwt.code
|
|
left join k1_pgn_pb_define_warning_type dwt on wi.warn_type = dwt.code
|
|
|
left join k1_pgn_pb_warning_data wd on wi.warn_id = wd.warn_id
|
|
left join k1_pgn_pb_warning_data wd on wi.warn_id = wd.warn_id
|
|
|
<where>
|
|
<where>
|
|
@@ -61,7 +72,6 @@
|
|
|
and warn_level = #{warnLevel,jdbcType=SMALLINT}
|
|
and warn_level = #{warnLevel,jdbcType=SMALLINT}
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
- limit #{pageable.pageSize} offset #{pageable.offset}
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="countByWarnTypeAndWarnLevelAndWarnTime" resultType="java.lang.Long">
|
|
<select id="countByWarnTypeAndWarnLevelAndWarnTime" resultType="java.lang.Long">
|