Commit cd98ca66 authored by maoying's avatar maoying

修改脚本函数

parent 6cf83759
...@@ -56,24 +56,6 @@ ...@@ -56,24 +56,6 @@
END# END#
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="tianbo" id="1561717770001-1" runAlways="true">
<comment>f_fire_equipment_point_update 触发器创建(修改判断条件为->value等于'true')</comment>
<sql endDelimiter="#">
DROP TRIGGER IF EXISTS `trigger_fire_equipment_point_update`;
CREATE TRIGGER `trigger_fire_equipment_point_update` AFTER UPDATE ON `f_fire_equipment_point` FOR EACH ROW
BEGIN
DECLARE num1 INT (4) default 0;
select count(1) into num1 from f_fire_equipment_point where fire_equipment_id = new.fire_equipment_id and type='SWITCH' and 0x4000>=CAST(code AS SIGNED) and value = 'true';
if num1 > 0 then
update f_fire_equipment set equip_status = 1 where id = new.fire_equipment_id;
else
update f_fire_equipment set equip_status = 0 where id = new.fire_equipment_id;
end if;
END#
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1588901126339-1" runAlways="true"> <changeSet author="shanqiyun" id="1588901126339-1" runAlways="true">
<comment>f_risk_source 查询所有子节点id</comment> <comment>f_risk_source 查询所有子节点id</comment>
<sql endDelimiter="#"> <sql endDelimiter="#">
......
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