SELECT case
when var_id=33 then '主轴过载报警'
when var_id=34 then '数字伺服报警'
when var_id=35 then '编码器故障报警'
when var_id=36 then '冷却液未开报警'
when var_id=37 then '停止偏差报警'
else '未知报警'
end as alarms, count(var_id) as times FROM "ol_1001_33" where "value"=TRUE and "time" <= CURRENT_DATE - 5 group by var_id
简单的SQL语句
select * from ol_1001_17 order by time desc limit 20
设备类型选择后控制表格tb_EVes4里面的数据
export function chooseDevType(context,value) {
context.getComponent("tb_EVes4").dispatch("reload", {
values: {type_id:context.getComponent("tree_aXlCC").getSelectData().values.id}
});
}