Commit 99099858 authored by chenzhao's avatar chenzhao

修改视图

parent d0f65e16
......@@ -1710,5 +1710,23 @@
</sql>
</changeSet>
<changeSet author="chenzhao" id="2021-10-13">
<preConditions onFail="MARK_RAN">
<viewExists viewName="alert_today"/>
</preConditions>
<dropView viewName="alert_today"/>
<comment>delete alert_today</comment>
</changeSet>
<changeSet author="chenzhao" id="2021-10-13-2">
<createView viewName="alert_today" replaceIfExists="true" >
select '今日接警' AS `title`,count(`jc_alert_called`.`alert_status`) AS `alert_count` from `jc_alert_called` where (to_days(`jc_alert_called`.`call_time`) = to_days(now())) union all
<![CDATA[select '已处警' AS `title`,count(`jc_alert_called`.`alert_status`) AS `alert_count` from `jc_alert_called`,jc_power_transfer where ((to_days(`jc_alert_called`.`call_time`) = to_days(now()) and jc_power_transfer.alert_called_id = jc_alert_called.sequence_nbr ) and (`jc_alert_called`.`alert_stage` <> '警情接报')) union all]]> select '未结案' AS `title`,count(`jc_alert_called`.`alert_status`) AS `alert_count` from `jc_alert_called` where (`jc_alert_called`.`alert_status` = 0) union all
select '已结案' AS `title`,count(`jc_alert_called`.`alert_status`) AS `alert_count` from `jc_alert_called` where ((year(`jc_alert_called`.`call_time`) = year(now())) and (`jc_alert_called`.`alert_status` = 1));
</createView>
</changeSet>
</databaseChangeLog>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment