| | |
| | | return list;
|
| | | }*/
|
| | | public List serchAlm(Object obj){
|
| | | Batt_Maint_Dealarm bmd=(Batt_Maint_Dealarm) obj;
|
| | | Battalarm_data adata=bmd.getAdata();
|
| | | BattInf binf=bmd.getBinf();
|
| | | User_inf uinf=bmd.getUinf();
|
| | | User_inf uinf=(User_inf) obj;
|
| | | String sql="select count(num) as number,alm_id " +
|
| | | "from db_alarm.tb_battalarm_data " +
|
| | | "where " +
|
| | | "alm_cleared_type=0 " ;
|
| | | //根据城市选取
|
| | | String citySql=" and tb_battalarm_data.BattGroupId in (select distinct db_battinf.tb_battinf.battgroupid " +
|
| | | " from db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf " +
|
| | | " where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId " +
|
| | | " and db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " +
|
| | | " and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
| | | " and db_user.tb_user_inf.uid=? and db_battinf.tb_battinf.stationname like ? and tb_battinf.station_install=1 ) " +
|
| | | String citySql=" and tb_battalarm_data.BattGroupId in ( select distinct db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId " +
|
| | | " from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr " +
|
| | | " where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id " +
|
| | | " and db_user.tb_user_battgroup_baojigroup_usr.uId=? ) " +
|
| | | " and tb_battalarm_data.BattGroupId in (select distinct db_battinf.tb_battinf.BattGroupId from db_battinf.tb_battinf where station_install=1) " +
|
| | | " GROUP BY(alm_id) ";
|
| | | sql+=citySql;
|
| | | //System.out.println(sql);
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{uinf.getUId(),"%"+binf.getStationName()+"%"}, new CallBack() {
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{uinf.getUId()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|