@Query(value="select * from spc_alarm where query_column =?1 AND current_state in ('未确认未清除','已确认未清除','异常')",nativeQuery=true)
publicList<Alarm>selectbyqueryColumn(Stringtype);
@Query(value="select COUNT(*) value,spc_alarm.alarm_level name from spc_alarm where spc_alarm.org_code like CONCAT(?1,'%' ) and spc_alarm.current_state in ('未确认未清除','已确认未清除','异常') GROUP BY spc_alarm.alarm_level ",nativeQuery=true)
publicList<Object[]>countnum(Stringcode);
@Query(value="select * from spc_alarm where query_column =?1 AND current_state in ('未确认未清除','已确认未清除','异常','告警')",nativeQuery=true)
publicList<Alarm>selectByQueryColumn(Stringtype);
@Query(value="select COUNT(*) value,sa.alarm_level name, sa.org_code orgCode from spc_alarm sa where sa.org_code like CONCAT('%', ?1, '%' ) and sa.current_state in ('未确认未清除','已确认未清除','异常','告警') GROUP BY sa.alarm_level",nativeQuery=true)
"( SELECT id ,state ,text,treeid FROM b_topography_node WHERE text IN ( '1#温湿度', '2#温湿度', '3#温湿度', '4#温湿度', '1温湿度', '5温湿度', '消防监测', '漏水监测' ) ) AS a\n"+
"\tLEFT JOIN b_topography_node_detail b ON a.id = b.nodeid",nativeQuery=true)
@Query(value="SELECT node.id,detail.node_detail FROM b_topography_node node LEFT JOIN b_topography_node_detail detail ON node.id = detail.nodeid WHERE node.source_id =?1",nativeQuery=true)
(select count(1) from p_plan_task_detail where task_no = a.id and status = 0) as noStartNum,
(select count(1) from p_plan_task_detail where task_no = a.id and status = 1) as passNum,
(select count(1) from p_plan_task_detail where task_no = a.id and status = 2) as noPassNum,
(select count(1) from p_plan_task_detail where task_no = a.id and status = 3) as overTimeNum
from
(select l.* from p_plan_task as l where DATE_FORMAT(l.begin_time,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d') and l.org_code like CONCAT(#{deptId},"%"))as a
(select count(1) from p_plan_task_detail where task_no = a.id and status = 0) as noStartNum,
(select count(1) from p_plan_task_detail where task_no = a.id and status = 1) as passNum,
(select count(1) from p_plan_task_detail where task_no = a.id and status = 2) as noPassNum,
(select count(1) from p_plan_task_detail where task_no = a.id and status = 3) as overTimeNum
from
(select l.* from p_plan_task as l where DATE_FORMAT(l.begin_time,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d') and l.org_code like CONCAT(#{deptId},"%"))as a