location_sql="select `location`.`id`, `group`, `item`, `location`.`type`, `threshold` from location left join alarm_setting on location.id=alarm_setting.location_id where location.cid = %s and `enable`=1 and location.type in %s and `alarm_setting`.type in %s"