package com.fgkj.dao.impl.ram; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.CallBack; import com.fgkj.dao.DAOHelper; import com.fgkj.dao.FBS9100_ComBase; import com.fgkj.dao.LimitNumberFactory; import com.fgkj.dao.UinfDaoFactory; import com.fgkj.db.DBUtil; import com.fgkj.dto.BattInf; import com.fgkj.dto.Page; import com.fgkj.dto.User_inf; import com.fgkj.dto.User_log; import com.fgkj.dto.ram.FBS9100; import com.fgkj.dto.ram.Fbs9100_state; import com.fgkj.dto.ram.Fbs9600_state; import com.fgkj.services.User_logService; import com.sun.corba.se.spi.orbutil.fsm.FSM; public class Fbs9100_stateImpl implements BaseDAO,CallBack{ public List getResults(ResultSet rs) { List list=new ArrayList(); try { while(rs.next()){ Fbs9100_state fstate=new Fbs9100_state(); fstate.setNum(rs.getInt("num")); fstate.setDev_ip(rs.getString("dev_ip")); fstate.setDev_id(rs.getInt("dev_id")); fstate.setOp_cmd(rs.getInt("op_cmd")); fstate.setDev_datetime(rs.getString("dev_datetime")); fstate.setDev_testtype(rs.getInt("dev_testtype")); fstate.setDev_testgroupnum(rs.getInt("dev_testgroupnum")); fstate.setDev_workstate(rs.getInt("dev_workstate")); fstate.setDev_alarmstate(rs.getInt("dev_alarmstate")); fstate.setDev_onlinevollow(rs.getInt("dev_onlinevollow")); fstate.setDev_eachgroup_battsum(rs.getInt("dev_eachgroup_battsum")); 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_restest_moncount(rs.getInt("dev_restest_moncount")); fstate.setDev_restest_monindex(rs.getInt("dev_restest_monindex")); fstate.setDev_commcount(rs.getInt("dev_commcount")); fstate.setDev_errcommcount(rs.getInt("dev_errcommcount")); list.add(fstate); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } public boolean add(Object obj) { Fbs9100_state fs=(Fbs9100_state) obj; String sql="insert into db_ram_db.tb_Fbs9100_state(dev_ip,dev_id,op_cmd,dev_datetime,dev_testtype,dev_testgroupnum," + "dev_workstate,dev_alarmstate,dev_onlinevollow,dev_eachgroup_battsum,dev_captest_onlinevol,dev_captest_groupvol," + "dev_captest_curr,dev_captest_cap,dev_captest_timelong,dev_restest_moncount,dev_restest_monindex,dev_commcount," + "dev_errcommcount) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; Boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{fs.getDev_ip(),fs.getDev_id(), fs.getOp_cmd(),fs.getDev_datetime(),fs.getDev_testtype(),fs.getDev_testgroupnum(),fs.getDev_workstate(),fs.getDev_alarmstate(), fs.getDev_onlinevollow(),fs.getDev_eachgroup_battsum(),fs.getDev_captest_onlinevol(),fs.getDev_captest_groupvol(),fs.getDev_captest_curr(), fs.getDev_captest_cap(),fs.getDev_captest_timelong(),fs.getDev_restest_moncount(),fs.getDev_restest_monindex(),fs.getDev_commcount(), fs.getDev_errcommcount()}); return bl; } public boolean update(Object obj) { Fbs9100_state fs=(Fbs9100_state) obj; String sql="update db_ram_db.tb_Fbs9100_state set dev_ip=?,dev_id=?,op_cmd=?,dev_datetime=?,dev_testtype=?,dev_testgroupnum=?," + "dev_workstate=?,dev_alarmstate=?,dev_onlinevollow=?,dev_eachgroup_battsum=?,dev_captest_onlinevol=?,dev_captest_groupvol=?," + "dev_captest_curr=?,dev_captest_cap=?,dev_captest_timelong=?,dev_restest_moncount=?,dev_restest_monindex=?,dev_commcount=?," + "dev_errcommcount=? where num=?"; Boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{fs.getDev_ip(),fs.getDev_id(), fs.getOp_cmd(),fs.getDev_datetime(),fs.getDev_testtype(),fs.getDev_testgroupnum(),fs.getDev_workstate(),fs.getDev_alarmstate(), fs.getDev_onlinevollow(),fs.getDev_eachgroup_battsum(),fs.getDev_captest_onlinevol(),fs.getDev_captest_groupvol(),fs.getDev_captest_curr(), fs.getDev_captest_cap(),fs.getDev_captest_timelong(),fs.getDev_restest_moncount(),fs.getDev_restest_monindex(),fs.getDev_commcount(), fs.getDev_errcommcount(),fs.getNum()}); return bl; } //fbs9600设备内阻测试 public boolean updatePro(Object obj) { List list=(List) obj; ArrayList sql_str=new ArrayList(); List listU=new ArrayList();//存放user_log for (Fbs9100_state fstate : list) { if(fstate.getOp_cmd()==FBS9100_ComBase.CMD_9600_Start){ String sql="update db_ram_db.tb_Fbs9100_state set op_cmd="+fstate.getOp_cmd()+" " + " where dev_id="+fstate.getDev_id(); sql_str.add(sql); } { String msg="启动"+fstate.getDev_id()+"的设备内阻测试"; User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Increase, msg); listU.add(ulog); } } boolean bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str); (new User_logService()).addPro(listU);//将用户的操作记录下来 return bl; } public boolean del(Object obj) { Fbs9100_state fs=(Fbs9100_state) obj; String sql="delete from db_ram_db.tb_Fbs9100_state where num=?"; Boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{fs.getNum()}); return bl; } public List searchAll() { String sql="select * from db_ram_db.tb_Fbs9100_state"; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new Fbs9100_stateImpl()); return list; } //11.1FBS9100设备通信状态查询 /* * fbs9100:op_cmd:0:全部;1:fbs9100,2:fbs9600 * dev_errcommcount;0:通讯正常,1:通讯中断,100:全部 public List serchByCondition(Object obj) { Fbs9100_state fs=(Fbs9100_state) obj; Page page=fs.getPage(); Connection conn=DBUtil.getConn(); String numberSql=" SELECT FOUND_ROWS() number"; String sql=""; String baseSql="select SQL_CALC_FOUND_ROWS distinct tb_fbs9100_state.num,tb_fbs9100_state.dev_ip,tb_fbs9100_state.dev_version,record_datetime,tb_fbs9100_state.dev_id,op_cmd,dev_datetime,dev_testtype,dev_testgroupnum," + "dev_workstate,dev_alarmstate,dev_onlinevollow,dev_eachgroup_battsum,dev_captest_onlinevol,dev_captest_groupvol,dev_captest_curr," + "dev_captest_cap,dev_captest_timelong,dev_restest_moncount,dev_restest_monindex,dev_commcount,dev_errcommcount, " + "db_battinf.tb_battinf.StationName,db_battinf.tb_battinf.FbsDeviceName," + "COUNT(DISTINCT db_battinf.tb_battinf.BattGroupId) as cnt," + "group_CONCAT(db_ram_db.tb_batt_rtstate.online_vol ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as online_vols,group_CONCAT(db_ram_db.tb_batt_rtstate.group_vol ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as group_vols,group_CONCAT(db_ram_db.tb_batt_rtstate.group_curr ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as group_currs " + "from db_ram_db.tb_Fbs9100_state " + "left outer join db_battinf.tb_battinf ON tb_fbs9100_state.dev_id=db_battinf.tb_battinf.FBSDeviceId " + "LEFT OUTER JOIN db_ram_db.tb_batt_rtstate ON db_battinf.tb_battinf.battgroupid=db_ram_db.tb_batt_rtstate.battgroupid "; //通讯中断 String comSqlT=" where dev_errcommcount=0 "; String comSqlF=" where dev_errcommcount>0 "; if(fs.getDev_errcommcount()==0){ baseSql+=comSqlT; }else if(fs.getDev_errcommcount()==1){ baseSql+=comSqlF; } //分组 String groupSql=" GROUP BY tb_fbs9100_state.dev_id "; //分页 String limitSql=" limit ?,? "; //最后结果 sql=baseSql+groupSql+limitSql; //System.out.println(sql); List list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() { List list=new ArrayList(); public List getResults(ResultSet rs) { try { while(rs.next()){ Fbs9100_state fstate=new Fbs9100_state(); fstate.setNum(rs.getInt("cnt"));//关联电池组个数 fstate.setDev_ip(rs.getString("dev_ip")); fstate.setDev_version(rs.getString("dev_version")); fstate.setDev_id(rs.getInt("dev_id")); fstate.setOp_cmd(rs.getInt("op_cmd")); fstate.setRecord_datetime(rs.getString("record_datetime")); fstate.setDev_datetime(rs.getString("dev_datetime")); fstate.setDev_testtype(rs.getInt("dev_testtype")); fstate.setDev_testgroupnum(rs.getInt("dev_testgroupnum")); fstate.setDev_workstate(rs.getInt("dev_workstate")); fstate.setDev_alarmstate(rs.getInt("dev_alarmstate")); fstate.setDev_onlinevollow(rs.getInt("dev_onlinevollow")); fstate.setDev_eachgroup_battsum(rs.getInt("dev_eachgroup_battsum")); 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_restest_moncount(rs.getInt("dev_restest_moncount")); fstate.setDev_restest_monindex(rs.getInt("dev_restest_monindex")); fstate.setDev_commcount(rs.getInt("dev_commcount")); fstate.setDev_errcommcount(rs.getInt("dev_errcommcount")); fstate.setStationName(rs.getString("stationName")); fstate.setDeviceName(rs.getString("FbsDeviceName")); fstate.setOnline_vols(rs.getString("online_vols")); fstate.setGroup_vols(rs.getString("group_vols")); fstate.setGroup_currs(rs.getString("group_currs")); //System.out.println(fstate); list.add(fstate); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); //去掉limit条件后的总数 int number=LimitNumberFactory.GetLimtitNumber(conn, numberSql); if(list!=null&&list.size()>0){ page.setPageAll(number); list.get(list.size()-1).setPage(page); } return list; }*/ //11.1FBS9100设备通信状态查询 /* * fbs9100:op_cmd:0:全部;1:fbs9100,2:fbs9600 * dev_errcommcount;0:通讯正常,1:通讯中断,100:全部 * */ public List serchByCondition(Object obj) { Fbs9100_state fs=(Fbs9100_state) obj; Page page=fs.getPage(); Connection conn=DBUtil.getConn(); String numberSql=" SELECT FOUND_ROWS() number"; String sql=""; String baseSql="select SQL_CALC_FOUND_ROWS distinct tb_fbs9100_state.num,tb_fbs9100_state.dev_ip,tb_fbs9100_state.dev_version,record_datetime,tb_fbs9100_state.dev_id,op_cmd,dev_datetime,dev_testtype,dev_testgroupnum," + "dev_workstate,dev_alarmstate,dev_res_test_state,dev_onlinevollow,dev_eachgroup_battsum,dev_captest_onlinevol,dev_captest_groupvol,dev_captest_curr," + "dev_captest_cap,dev_captest_timelong,dev_restest_moncount,dev_restest_monindex,dev_commcount,dev_errcommcount,db_ram_db.tb_fbs9100_state.dev_61850alarms,dev_last_captest_stop_type, " + "db_battinf.tb_battinf.StationName,db_battinf.tb_battinf.FbsDeviceName," + "COUNT(DISTINCT db_battinf.tb_battinf.BattGroupId) as cnt," + "group_CONCAT(db_ram_db.tb_batt_rtstate.online_vol ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as online_vols,group_CONCAT(db_ram_db.tb_batt_rtstate.group_vol ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as group_vols,group_CONCAT(db_ram_db.tb_batt_rtstate.group_curr ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as group_currs " + "from db_ram_db.tb_Fbs9100_state " + "left outer join db_battinf.tb_battinf ON tb_fbs9100_state.dev_id=db_battinf.tb_battinf.FBSDeviceId " + "LEFT OUTER JOIN db_ram_db.tb_batt_rtstate ON db_battinf.tb_battinf.battgroupid=db_ram_db.tb_batt_rtstate.battgroupid "; //通讯中断 String comSqlT=" where dev_errcommcount=0 "; String comSqlF=" where dev_errcommcount>0 "; String comSqlA=" where dev_errcommcount>-1 "; if(fs.getDev_errcommcount()==0){ baseSql+=comSqlT; }else if(fs.getDev_errcommcount()==1){ baseSql+=comSqlF; }else{ baseSql+=comSqlA; } //判断是否为管理的机房 String stationSql=" and db_battinf.tb_battinf.StationId in(select distinct db_battinf.tb_battinf.StationId " + " 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=? ) "; baseSql+=stationSql; //分组 String groupSql=" GROUP BY tb_fbs9100_state.dev_id "; //分页 String limitSql=" limit ?,? "; //最后结果 sql=baseSql+groupSql+limitSql; //System.out.println(sql); List list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{fs.getNum(),(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() { List list=new ArrayList(); public List getResults(ResultSet rs) { try { while(rs.next()){ Fbs9100_state fstate=new Fbs9100_state(); fstate.setNum(rs.getInt("cnt"));//关联电池组个数 fstate.setDev_ip(rs.getString("dev_ip")); fstate.setDev_version(rs.getString("dev_version")); fstate.setDev_id(rs.getInt("dev_id")); fstate.setOp_cmd(rs.getInt("op_cmd")); fstate.setRecord_datetime(rs.getString("record_datetime")); fstate.setDev_datetime(rs.getString("dev_datetime")); fstate.setDev_testtype(rs.getInt("dev_testtype")); fstate.setDev_testgroupnum(rs.getInt("dev_testgroupnum")); fstate.setDev_workstate(rs.getInt("dev_workstate")); fstate.setDev_alarmstate(rs.getInt("dev_alarmstate")); fstate.setDev_res_test_state(rs.getInt("dev_res_test_state")); fstate.setDev_onlinevollow(rs.getInt("dev_onlinevollow")); fstate.setDev_eachgroup_battsum(rs.getInt("dev_eachgroup_battsum")); 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_restest_moncount(rs.getInt("dev_restest_moncount")); fstate.setDev_restest_monindex(rs.getInt("dev_restest_monindex")); fstate.setDev_commcount(rs.getInt("dev_commcount")); fstate.setDev_errcommcount(rs.getInt("dev_errcommcount")); fstate.setStationName(rs.getString("stationName")); fstate.setDeviceName(rs.getString("FbsDeviceName")); fstate.setOnline_vols(rs.getString("online_vols")); fstate.setGroup_vols(rs.getString("group_vols")); fstate.setGroup_currs(rs.getString("group_currs")); fstate.setDev_61850alarms(rs.getString("dev_61850alarms")); fstate.setDev_last_captest_stop_type(rs.getInt("dev_last_captest_stop_type")); //System.out.println(fstate); list.add(fstate); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); //去掉limit条件后的总数 int number=LimitNumberFactory.GetLimtitNumber(conn, numberSql); if(list!=null&&list.size()>0){ page.setPageAll(number); list.get(list.size()-1).setPage(page); } return list; } //11.1FBS9100设备通信状态查询<-------跨域-----------> public List serchByCondition_ky() { String sql=""; String baseSql="select distinct tb_fbs9100_state.num,tb_fbs9100_state.dev_ip,tb_fbs9100_state.dev_version,record_datetime,tb_fbs9100_state.dev_id,op_cmd,dev_datetime,dev_testtype,dev_testgroupnum," + "dev_workstate,dev_alarmstate,dev_res_test_state,dev_onlinevollow,dev_eachgroup_battsum,dev_captest_onlinevol,dev_captest_groupvol,dev_captest_curr," + "dev_captest_cap,dev_captest_timelong,dev_restest_moncount,dev_restest_monindex,dev_commcount,dev_errcommcount,db_ram_db.tb_fbs9100_state.dev_61850alarms,dev_last_captest_stop_type, " + "db_battinf.tb_battinf.StationName,db_battinf.tb_battinf.FbsDeviceName," + "COUNT(DISTINCT db_battinf.tb_battinf.BattGroupId) as cnt," + "group_CONCAT(db_ram_db.tb_batt_rtstate.online_vol ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as online_vols,group_CONCAT(db_ram_db.tb_batt_rtstate.group_vol ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as group_vols,group_CONCAT(db_ram_db.tb_batt_rtstate.group_curr ORDER BY db_ram_db.tb_batt_rtstate.BattGroupId separator '/') as group_currs " + "from db_ram_db.tb_Fbs9100_state " + "left outer join db_battinf.tb_battinf ON tb_fbs9100_state.dev_id=db_battinf.tb_battinf.FBSDeviceId " + "LEFT OUTER JOIN db_ram_db.tb_batt_rtstate ON db_battinf.tb_battinf.battgroupid=db_ram_db.tb_batt_rtstate.battgroupid "; //分组 String groupSql=" GROUP BY tb_fbs9100_state.dev_id "; //最后结果 sql=baseSql+groupSql; //System.out.println(sql); List list=DAOHelper.executeQueryLimit(sql, DBUtil.getConn(), null, new CallBack() { List list=new ArrayList(); public List getResults(ResultSet rs) { try { while(rs.next()){ Fbs9100_state fstate=new Fbs9100_state(); fstate.setNum(rs.getInt("cnt"));//关联电池组个数 fstate.setDev_ip(rs.getString("dev_ip")); fstate.setDev_version(rs.getString("dev_version")); fstate.setDev_id(rs.getInt("dev_id")); fstate.setOp_cmd(rs.getInt("op_cmd")); fstate.setRecord_datetime(rs.getString("record_datetime")); fstate.setDev_datetime(rs.getString("dev_datetime")); fstate.setDev_testtype(rs.getInt("dev_testtype")); fstate.setDev_testgroupnum(rs.getInt("dev_testgroupnum")); fstate.setDev_workstate(rs.getInt("dev_workstate")); fstate.setDev_alarmstate(rs.getInt("dev_alarmstate")); fstate.setDev_res_test_state(rs.getInt("dev_res_test_state")); fstate.setDev_onlinevollow(rs.getInt("dev_onlinevollow")); fstate.setDev_eachgroup_battsum(rs.getInt("dev_eachgroup_battsum")); 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_restest_moncount(rs.getInt("dev_restest_moncount")); fstate.setDev_restest_monindex(rs.getInt("dev_restest_monindex")); fstate.setDev_commcount(rs.getInt("dev_commcount")); fstate.setDev_errcommcount(rs.getInt("dev_errcommcount")); fstate.setStationName(rs.getString("stationName")); fstate.setDeviceName(rs.getString("FbsDeviceName")); fstate.setOnline_vols(rs.getString("online_vols")); fstate.setGroup_vols(rs.getString("group_vols")); fstate.setGroup_currs(rs.getString("group_currs")); fstate.setDev_61850alarms(rs.getString("dev_61850alarms")); fstate.setDev_last_captest_stop_type(rs.getInt("dev_last_captest_stop_type")); //System.out.println(fstate); list.add(fstate); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } //判断机房实时数据中该机房有没有连接到服务器 public int judgeSatationInState(int dev_id) { String sql=" SELECT count(num) as nums from db_ram_db.tb_fbs9100_state where dev_id=? LIMIT 1 "; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{dev_id}, 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) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); int flag=0;//返回的标识符 if(list!=null&&list.size()>0){ int nums=(Integer) list.get(list.size()-1); if(nums>0){ flag=1; }else{ flag=0; } } return flag; } //实时监测界面根据dev_alarmstate状态判断接触器状态 public List serchContactorState(Object obj) { Fbs9100_state fs=(Fbs9100_state) obj; String sql="select dev_id,dev_alarmstate,dev_workstate,record_datetime,dev_temp,dev_res_test_state,dev_testtype,dev_testgroupnum,dev_conresist,dev_concurr,dev_condvoldp,dev_condcurr,dev_61850alarms,dev_last_captest_stop_type,batt_online_state,dev_commcount,dev_errcommcount from db_ram_db.tb_fbs9100_state where dev_id=? limit 1"; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{fs.getDev_id()},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.setRecord_datetime(rs.getString("record_datetime")); 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_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.setBatt_online_state(rs.getInt("batt_online_state")); fstate.setDev_commcount(rs.getInt("dev_commcount")); fstate.setDev_errcommcount(rs.getInt("dev_errcommcount")); list.add(fstate); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } //放电测试界面根据设备id查询网络拓扑图 public List serchByInfo(Object obj) { BattInf binf=(BattInf) obj; String sql="select fbs_rt.BattGroupId,fbs_rt.group_curr,fbs_rt.group_vol,fbs_rt.online_vol,fbs_rt.batt_state,fbs_rt.batt_test_type" + ",dev_id,dev_workstate,dev_alarmstate,dev_temp,dev_res_test_state,dev_testgroupnum,dev_conresist,dev_concurr,dev_condvoldp,dev_condcurr,dev_61850alarms,dev_last_captest_stop_type,batt_online_state " + "from db_ram_db.tb_fbs9100_state," + "(select distinct db_ram_db.tb_batt_rtstate.BattGroupId,group_curr,group_vol,online_vol,batt_state,batt_test_type,db_battinf.tb_battinf.FBSDeviceId from db_ram_db.tb_batt_rtstate,db_battinf.tb_battinf " + "where db_battinf.tb_battinf.BattGroupId=db_ram_db.tb_batt_rtstate.BattGroupId " + "and db_ram_db.tb_batt_rtstate.BattGroupId=?" + ") as fbs_rt " + "where db_ram_db.tb_fbs9100_state.dev_id=fbs_rt.FBSDeviceId "; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(),new Object[]{binf.getBattGroupId()}, 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.setNote(ContactorState); fstate.setDev_workstate(rs.getInt("dev_workstate")); fstate.setDev_res_test_state(rs.getInt("dev_res_test_state")); fstate.setDev_id(rs.getInt("dev_id")); fstate.setDev_eachgroup_battsum(rs.getInt("batt_state"));//电池组状态 fstate.setDev_testtype(rs.getInt("batt_test_type")); fstate.setDev_captest_groupvol(rs.getFloat("group_vol")); fstate.setDev_captest_curr(rs.getFloat("group_curr")); fstate.setDev_captest_onlinevol(rs.getFloat("online_vol")); fstate.setNum(rs.getInt("BattGroupId")); 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.setBatt_online_state(rs.getInt("batt_online_state")); list.add(fstate); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } //实时界面左侧导航实时查询61850设备是否存在4种告警和设备的工作状态 public List serchBy61850Alarms(){ String sql="select dev_id,dev_61850alarms,dev_workstate from db_ram_db.tb_fbs9100_state where dev_id like '%61850%' "; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() { public List getResults(ResultSet rs) { List list=new ArrayList(); try { while(rs.next()){ Fbs9100_state fstate=new Fbs9100_state(); fstate.setDev_id(rs.getInt("dev_id")); fstate.setDev_workstate(rs.getInt("dev_workstate")); fstate.setDev_61850alarms(rs.getString("dev_61850alarms")); list.add(fstate); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } //FBS9600设备内阻测试显示全部9600设备的信息 public List searchByUid(Object obj) { User_inf uinf=(User_inf) obj; String sql=""; String baseSql="select distinct tb_Fbs9100_state.num,dev_ip,dev_id,op_cmd,dev_workstate,dev_alarmstate,dev_commcount,dev_errcommcount, " + " db_battinf.tb_battinf.StationName,db_battinf.tb_battinf.FbsDeviceName " + " from db_ram_db.tb_Fbs9100_state " + " left outer join db_battinf.tb_battinf ON tb_Fbs9100_state.dev_id=db_battinf.tb_battinf.FBSDeviceId " + " where tb_Fbs9100_state.dev_id 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=? ) "; String F9600sql=" and tb_Fbs9100_state.dev_id like '%96%'";//支持9600设备 sql=baseSql+F9600sql; // System.out.println(sql); 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(); fstate.setNum(rs.getInt("num")); fstate.setDev_ip(rs.getString("dev_ip")); fstate.setDev_id(rs.getInt("dev_id")); fstate.setOp_cmd(rs.getInt("op_cmd")); fstate.setDev_workstate(rs.getInt("dev_workstate")); fstate.setDev_alarmstate(rs.getInt("dev_alarmstate")); fstate.setDev_commcount(rs.getInt("dev_commcount")); fstate.setDev_errcommcount(rs.getInt("dev_errcommcount")); fstate.setStationName(rs.getString("stationName")); fstate.setDeviceName("FBS9600"); list.add(fstate); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } //查询61850设备的6种工作状态 public List searchDevWorkstate(Object obj){ Fbs9100_state fs=(Fbs9100_state) obj; String sql="select 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_id like '%6185%'" + " 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 " ; //设备条件的筛选 String devSqlT=" and dev_id!=? "; String devSqlF=" and dev_id=? "; if(fs.getDev_id()==0){ sql+=devSqlT; }else{ sql+=devSqlF; } //判断是否为管理的机房 String stationSql=" 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=? ) "; sql+=stationSql; //6种设备状态查询 String workSqlT=" and dev_workstate!=? "; String workSqlF=" and dev_workstate=? "; if(fs.getDev_workstate()==100){ sql+=workSqlT; }else{ sql+=workSqlF; } //System.out.println(sql); List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{fs.getDev_id(),fs.getNum(),fs.getDev_workstate()}, 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; } //实时查询61850设备的设备状态 public String seachDevNow(Object obj){ BattInf binf=(BattInf) obj; String sql="select dev_id,dev_workstate,dev_61850alarms " + " from db_ram_db.tb_fbs9100_state " + " where dev_id like '%6185%' " + " and dev_id=? limit 1"; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{binf.getFBSDeviceId()}, new CallBack() { public List getResults(ResultSet rs) { List list=new ArrayList(); try { while(rs.next()){ Fbs9100_state fbs=new Fbs9100_state(); fbs.setDev_id(rs.getInt("dev_id")); fbs.setDev_workstate(rs.getInt("dev_workstate")); fbs.setDev_61850alarms(rs.getString("dev_61850alarms")); list.add(fbs); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); String state="item-online_charge"; if(list!=null &&list.size()>0){ Fbs9100_state fbs=(Fbs9100_state) list.get(list.size()-1); if(fbs.getDev_61850alarms().contains("true")){ state="item-dev_alarm"; }else{ switch (fbs.getDev_workstate()) { case 0: state="item-online_charge"; break; case 1: state="item-pre_charge"; break; case 2: state="item-nuclear_cap"; break; case 3: state="item-nuclear_cap"; break; default: break; } } } return state; } //导航上实时查询61850设备的处于核容测试的数据 public List seach6185Nuclear_cap(Object obj){ User_inf uinf=(User_inf) obj; String sql="select 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_id like '%6185%' and dev_workstate="+FBS9100_ComBase.DEV_NUCLEAR_CAP+" "+ " 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; } //导航上实时查询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.StationName1,db_battinf.tb_battinf.StationName2,db_battinf.tb_battinf.StationName3,db_battinf.tb_battinf.StationName5,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=? ) " + " " ; //System.err.println(sql); 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.setStationName1(rs.getString("stationName1")); fstate.setStationName2(rs.getString("stationName2")); fstate.setStationName3(rs.getString("stationName3")); fstate.setStationName5(rs.getString("stationName5")); 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 list=fi.searchAll(); System.out.println(list.size()); for(Fbs9100_state f:list){ System.out.println(f); }*/ Fbs9100_state fs=new Fbs9100_state(); fs.setNum(1002); fs.setDev_id(0); fs.setDev_workstate(100); fs.setDev_errcommcount(2); Page p=new Page(); p.setPageSize(20); p.setPageCurr(1); fs.setPage(p); /*List list=fi.serchByCondition(fs); System.out.println(list.size()); for(Fbs9100_state f:list){ System.out.println(f); }*/ List list=fi.serchByCondition_ky(); System.out.println(list.size()); for(Fbs9100_state f:list){ System.out.println(f); } /*BattInf binf=new BattInf(); binf.setBattGroupId(1005069); List list=fi.serchByInfo(binf); System.out.println(list);*/ User_inf uinf=new User_inf(); uinf.setUId(1002); //List list=fi.searchByUid(uinf); // List list=fi.searchDevWorkstate(fs); // List list=fi.seach6185Nuclear_cap(uinf); /* List list=fi.seachNuclear_cap(uinf); System.out.println(list.size()); for(Fbs9100_state f:list){ System.out.println(f); }*/ } }