| | |
| | | }
|
| | | return nums;
|
| | | }
|
| | | |
| | | //查询设备SD卡的实时状态
|
| | | public int serchSDCard(Object obj) {
|
| | | BattInf binf=(BattInf) obj;
|
| | | String sql=" select distinct station_stat from db_ram_db.tb_bts_station_state where station_id=? ";
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[] {binf.getStationId()} , new CallBack() {
|
| | | |
| | | @Override
|
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()) {
|
| | | int station_stat=rs.getInt("station_stat");
|
| | | if((station_stat&2048)>1) {
|
| | | list.add(1);
|
| | | }else {
|
| | | list.add(0);
|
| | | }
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | }
|
| | | return list;
|
| | | }
|
| | | });
|
| | | int station_stat=1;
|
| | | if(list!=null&&list.size()>0) {
|
| | | station_stat=(int) list.get(list.size()-1);
|
| | | }
|
| | | return station_stat;
|
| | | }
|
| | | |
| | |
|
| | | public List serchByInfo(Object obj) {
|
| | | // TODO Auto-generated method stub
|
| | | return null;
|
| | |
| | | binf.setStationName2("");
|
| | | binf.setStationName3("");
|
| | | binf.setStationName5("");
|
| | | binf.setStationId("");
|
| | | binf.setStationId("42000408");
|
| | | binf.setBattGroupNum(62);
|
| | | User_inf uinf=new User_inf();
|
| | | uinf.setUId(1002);
|
| | |
| | | /*BattMap_information bm=new BattMap_information();
|
| | | bm.setStationId("42000570");
|
| | | int nums=bimpl.serchByStationId(bm);*/
|
| | | int nums=bimpl.serchByState_diaozhan(uinf);
|
| | | //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);
|
| | | int station_state=bimpl.serchSDCard(binf);
|
| | | System.out.println(station_state);
|
| | | }
|
| | |
|
| | |
|