| | |
| | | }
|
| | | return nums;
|
| | | }
|
| | | //查询具体某机房掉站数(根据station_id )
|
| | | public int serchByStationId_diaozhan(Object obj) {
|
| | | BattMap_information binformation=(BattMap_information) obj;
|
| | | String sql="select count(num) as nums from db_ram_db.tb_bts_station_state " +
|
| | | " where station_stat&32>1 " +
|
| | | " and station_id=? " +
|
| | | " limit 1 ";
|
| | | //System.out.println(sql);
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binformation.getStationId()}, new CallBack() {
|
| | | |
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()){
|
| | | int nums=rs.getInt("nums");
|
| | | list.add(nums);
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return list;
|
| | | }
|
| | | });
|
| | | int nums=0;//最后的结果
|
| | | if(list!=null&&list.size()>0){
|
| | | nums=(Integer) list.get(list.size()-1);
|
| | | }
|
| | | return nums;
|
| | | }
|
| | | public List serchByInfo(Object obj) {
|
| | | // TODO Auto-generated method stub
|
| | | return null;
|
| | |
| | | p.setPageCurr(1);
|
| | | p.setPageSize(10);
|
| | | binf.setPage(p);
|
| | | List<Bts_station_state> list=bimpl.serchByCondition(binf);
|
| | | /*List<Bts_station_state> list=bimpl.serchByCondition(binf);
|
| | | for (Bts_station_state bs : list) {
|
| | | //System.out.println(bs.getStation_stat_diaozhan()+" "+bs.getStation_stat_dooropen()+" "+bs.getStation_stat_fadian()+" "+bs.getStation_stat_xuhang()+" "+bs.getStation_stat_poff());
|
| | | System.out.println(bs);
|
| | | }
|
| | | int nums=bimpl.serchByState(uinf);
|
| | | int nums=bimpl.serchByState(uinf);*/
|
| | | /*BattMap_information bm=new BattMap_information();
|
| | | bm.setStationId("42000570");
|
| | | int nums=bimpl.serchByStationId(bm);*/
|
| | | //int nums=bimpl.serchByState_diaozhan(uinf);
|
| | | BattMap_information bm=new BattMap_information();
|
| | | bm.setStationId("42000366");
|
| | | int nums=bimpl.serchByStationId_diaozhan(bm);
|
| | | |
| | | System.out.println(nums);
|
| | | }
|
| | |
|