| | |
| | | @Override |
| | | public List serchByCondition(SQLiteDatabase db, Object obj) { |
| | | Battalram_data adata=(Battalram_data)obj; |
| | | String numsql = "select count(*) from tb_battalarm_data where "; |
| | | String sql=" select * from tb_battalarm_data where "; |
| | | String numsql = "select count(*) from tb_battalarm_data,tb_battinf where tb_battinf.BattGroupId=tb_battalarm_data.BattGroupId "; |
| | | String sql=" select distinct tb_battalarm_data.num,tb_battalarm_data.BattGroupId,tb_battalarm_data.MonNum,alm_id,alm_signal_id,alm_start_time,alm_end_time,alm_value,alm_is_confirmed,alm_confirmed_time,alm_cleared_type" + |
| | | ",tb_battinf.BattGroupName " + |
| | | " from tb_battalarm_data,tb_battinf where tb_battinf.BattGroupId=tb_battalarm_data.BattGroupId "; |
| | | //告警类型 |
| | | String typeSqlT=" alm_cleared_type!=? "; |
| | | String typeSqlF=" alm_cleared_type=? "; |
| | | String typeSqlT=" and alm_cleared_type!=? "; |
| | | String typeSqlF=" and alm_cleared_type=? "; |
| | | if(adata.getAlm_cleared_type()==100){ |
| | | sql+=typeSqlT; |
| | | numsql+=typeSqlT; |
| | |
| | | a.setAlm_is_confirmed(rs.getInt(rs.getColumnIndex("alm_is_confirmed"))); |
| | | a.setAlm_confirmed_time(ActionUtil.sdf.parse(rs.getString(rs.getColumnIndex("alm_confirmed_time")))); |
| | | a.setAlm_cleared_type(rs.getInt(rs.getColumnIndex("alm_cleared_type"))); |
| | | a.setNote(rs.getString(rs.getColumnIndex("BattGroupName"))); |
| | | Page page=new Page(); |
| | | page.setPageAll(count); |
| | | a.setPage(page); |