| | |
| | |
|
| | | return list;
|
| | | }
|
| | | //导航上实时查询bts处于放电测试的数据的设备
|
| | | public List seachNuclear_cap(Object obj){
|
| | | User_inf uinf=(User_inf) obj;
|
| | | String sql="select distinct dev_id,dev_alarmstate,dev_workstate,dev_temp,dev_res_test_state,dev_testtype,dev_testgroupnum " +
|
| | | " ,dev_captest_onlinevol,dev_captest_groupvol,dev_captest_curr,dev_captest_cap,dev_captest_timelong" +
|
| | | " ,dev_conresist,dev_concurr,dev_condvoldp,dev_condcurr,dev_61850alarms,dev_last_captest_stop_type " +
|
| | | " ,db_battinf.tb_battinf.StationName,db_battinf.tb_battinf.FbsDeviceName " +
|
| | | " ,db_ram_db.tb_batt_rtstate.batt_test_tlong " +
|
| | | " from db_ram_db.tb_fbs9100_state,db_battinf.tb_battinf,db_ram_db.tb_batt_rtstate " +
|
| | | " where dev_workstate="+FBS9100_ComBase.DISCHARGE+" "+
|
| | | " and db_battinf.tb_battinf.fbsdeviceId=db_ram_db.tb_fbs9100_state.dev_id " +
|
| | | " and db_battinf.tb_battinf.battgroupid=db_ram_db.tb_batt_rtstate.battgroupid " +
|
| | | " and db_battinf.tb_battinf.fbsdeviceId in(select distinct db_battinf.tb_battinf.fbsdeviceId 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=? ) " +
|
| | | " " ;
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{uinf.getUId()}, new CallBack() {
|
| | | |
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()){
|
| | | Fbs9100_state fstate=new Fbs9100_state();
|
| | | int dev_alarmstate=rs.getInt("dev_alarmstate");
|
| | | String ContactorState="开关闭合";
|
| | | if(dev_alarmstate==1 ||
|
| | | dev_alarmstate==2 ||
|
| | | dev_alarmstate==3 ||
|
| | | dev_alarmstate==4 ||
|
| | | dev_alarmstate==6 ){
|
| | | ContactorState="开关断开";
|
| | | }else{
|
| | | ContactorState="开关闭合";
|
| | | }
|
| | | fstate.setDev_testgroupnum(rs.getInt("dev_testgroupnum")); //被测电池组号
|
| | | fstate.setDev_alarmstate(rs.getInt("dev_alarmstate"));
|
| | | fstate.setDev_res_test_state(rs.getInt("dev_res_test_state"));
|
| | | fstate.setDev_testtype(rs.getInt("dev_testtype"));
|
| | | fstate.setNote(ContactorState);
|
| | | fstate.setDev_workstate(rs.getInt("dev_workstate"));
|
| | | fstate.setDev_id(rs.getInt("dev_id"));
|
| | | |
| | | fstate.setDev_captest_onlinevol(rs.getFloat("dev_captest_onlinevol"));
|
| | | fstate.setDev_captest_groupvol(rs.getFloat("dev_captest_groupvol"));
|
| | | fstate.setDev_captest_curr(rs.getFloat("dev_captest_curr"));
|
| | | fstate.setDev_captest_cap(rs.getFloat("dev_captest_cap"));
|
| | | fstate.setDev_captest_timelong(rs.getInt("dev_captest_timelong"));
|
| | | |
| | | fstate.setDev_conresist(rs.getFloat("dev_conresist"));
|
| | | fstate.setDev_concurr(rs.getFloat("dev_concurr"));
|
| | | fstate.setDev_condcurr(rs.getFloat("dev_condcurr"));
|
| | | fstate.setDev_condvoldp(rs.getFloat("dev_condvoldp"));
|
| | | fstate.setDev_61850alarms(rs.getString("dev_61850alarms"));
|
| | | fstate.setDev_last_captest_stop_type(rs.getInt("dev_last_captest_stop_type"));
|
| | | fstate.setDev_temp(rs.getFloat("dev_temp"));
|
| | | fstate.setStationName(rs.getString("stationName"));
|
| | | fstate.setDeviceName(rs.getString("FbsDeviceName"));
|
| | | /*fstate.setOnline_vols(((Float)rs.getFloat("online_vol")).toString());
|
| | | fstate.setGroup_vols(((Float)rs.getFloat("group_vol")).toString());
|
| | | fstate.setGroup_currs(((Float)rs.getFloat("group_curr")).toString());*/
|
| | | fstate.setNum(rs.getInt("batt_test_tlong"));
|
| | | list.add(fstate);
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | // TODO Auto-generated catch block
|
| | | e.printStackTrace();
|
| | | }
|
| | | return list;
|
| | | }
|
| | | });
|
| | | |
| | | return list;
|
| | | }
|
| | | public static void main(String[] args) {
|
| | | Fbs9100_stateImpl fi=new Fbs9100_stateImpl();
|
| | | /*List<Fbs9100_state> list=fi.searchAll();
|
| | |
| | | User_inf uinf=new User_inf();
|
| | | uinf.setUId(1002);
|
| | | //List<Fbs9100_state> list=fi.searchByUid(uinf);
|
| | | List<Fbs9100_state> list=fi.searchDevWorkstate(fs);
|
| | | // List<Fbs9100_state> list=fi.searchDevWorkstate(fs);
|
| | | // List<Fbs9100_state> list=fi.seach6185Nuclear_cap(uinf);
|
| | | List<Fbs9100_state> list=fi.seachNuclear_cap(uinf);
|
| | | System.out.println(list.size());
|
| | | for(Fbs9100_state f:list){
|
| | | System.out.println(f);
|