| | |
| | | " left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " +
|
| | | " left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
| | | " where db_user.tb_user_inf.uid=? and tb_battinf.stationname1 like ? and tb_battinf.stationname2 like ? and tb_battinf.stationname3 like ? ) " +
|
| | | " and stationid like ? " +
|
| | | " limit ? ,? ";
|
| | | " and stationid like ? " ;
|
| | | if(binf.getBattGroupNum()>1){
|
| | | sql+=" and ( ";
|
| | | } |
| | | //掉站
|
| | | String diaozhanSql=" ((station_stat&32)>1) ";
|
| | | if((binf.getBattGroupNum()&32)>1){
|
| | | sql+=diaozhanSql;
|
| | | }
|
| | | if(binf.getBattGroupNum()>32){
|
| | | sql+=" or ";
|
| | | }
|
| | | //开门
|
| | | String dooropenSql=" ((station_stat&16)>1) ";
|
| | | if((binf.getBattGroupNum()&16)>1){
|
| | | sql+=dooropenSql;
|
| | | }
|
| | | if(binf.getBattGroupNum()>48){
|
| | | sql+=" or ";
|
| | | }
|
| | | //发电
|
| | | String fadianSql=" ((station_stat&8)>1) ";
|
| | | if((binf.getBattGroupNum()&8)>1){
|
| | | sql+=fadianSql;
|
| | | }
|
| | | if(binf.getBattGroupNum()>56){
|
| | | sql+=" or ";
|
| | | }
|
| | | //续航
|
| | | String xuhangSql=" ((station_stat&4)>1) ";
|
| | | if((binf.getBattGroupNum()&4)>1){
|
| | | sql+=xuhangSql;
|
| | | }
|
| | | if(binf.getBattGroupNum()>60){
|
| | | sql+=" or ";
|
| | | }
|
| | | //停电
|
| | | String poffSql=" ((station_stat&2)>1) ";
|
| | | if((binf.getBattGroupNum()&2)>1){
|
| | | sql+=poffSql;
|
| | | }
|
| | | |
| | | if(binf.getBattGroupNum()>1){
|
| | | sql+=" ) ";
|
| | | }
|
| | | //分页
|
| | | String orderSql=" limit ? ,? ";
|
| | | sql+=orderSql;
|
| | | //System.out.println(sql);
|
| | | List<Bts_station_state> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{binf.getNum(),"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getStationId()+"%",(p.getPageCurr()-1)*p.getPageSize(),p.getPageSize()},new CallBack() {
|
| | |
|
| | |
| | | BattInf binf=new BattInf();
|
| | | binf.setNum(1002);
|
| | | binf.setStationName1("");
|
| | | binf.setStationName2("百色");
|
| | | binf.setStationName2("");
|
| | | binf.setStationName3("");
|
| | | binf.setStationId("");
|
| | | binf.setBattGroupNum(62);
|
| | | User_inf uinf=new User_inf();
|
| | | uinf.setUId(1002);
|
| | | Page p=new Page();
|