|
@@ -159,14 +159,14 @@
|
|
w.ednavalue,
|
|
w.ednavalue,
|
|
h.alerttime,
|
|
h.alerttime,
|
|
w.warningtypeid
|
|
w.warningtypeid
|
|
- from alarmhistory_nss_202107 h
|
|
|
|
|
|
+ from ${tbName} h
|
|
left join alarmsnap a on h.snapid = a.id
|
|
left join alarmsnap a on h.snapid = a.id
|
|
left join warning2 w on a.alertvalue = w.ednavalue
|
|
left join warning2 w on a.alertvalue = w.ednavalue
|
|
and a.modelid = w.modelid
|
|
and a.modelid = w.modelid
|
|
<where>
|
|
<where>
|
|
and a.category1 = 'windturbine'
|
|
and a.category1 = 'windturbine'
|
|
and h.messagetype = '1'
|
|
and h.messagetype = '1'
|
|
-
|
|
|
|
|
|
+ and
|
|
<if test="starttime !=null and endtime !=null">
|
|
<if test="starttime !=null and endtime !=null">
|
|
h.alerttime >= #{starttime,jdbcType=DATE} and h.alerttime < #{endtime,jdbcType=DATE}
|
|
h.alerttime >= #{starttime,jdbcType=DATE} and h.alerttime < #{endtime,jdbcType=DATE}
|
|
</if>
|
|
</if>
|