| | |
| | |
|
| | | return list;
|
| | | }
|
| | | //批量设置放电参数时查询出当前放电的电池组(1u/2u分开)
|
| | | public List seachDischarge(Object obj) {
|
| | | BattInf binf=(BattInf) obj;
|
| | | String sql="select distinct dev_id,dev_alarmstate,dev_workstate,dev_temp,dev_version,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.MonVolStd,db_battinf.tb_battinf.BattGroupId,db_battinf.tb_battinf.battgroupname "
|
| | | + " from db_ram_db.tb_fbs9100_state,db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr "
|
| | | + " 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.GroupIndexInFBSDevice+1)=db_ram_db.tb_fbs9100_state.dev_testgroupnum "
|
| | | + " and 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_battgroup_baojigroup_usr.uId=? "
|
| | | + " and db_battinf.tb_battinf.MonVolStd=? ";
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[] {binf.getNum(),binf.getMonVolStd()}, new CallBack() {
|
| | | |
| | | @Override
|
| | | 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");
|
| | | |
| | | 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.setDev_workstate(rs.getInt("dev_workstate"));
|
| | | fstate.setDev_id(rs.getInt("dev_id"));
|
| | | fstate.setDev_version(rs.getString("dev_version"));
|
| | | 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.setBattgroupid(rs.getInt("battgroupid"));
|
| | | fstate.setMonvolstd(rs.getInt("monvolstd"));
|
| | | fstate.setNote(rs.getString("battgroupname"));
|
| | | 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();
|
| | |
| | | p.setPageSize(20);
|
| | | p.setPageCurr(1);
|
| | | fs.setPage(p);
|
| | | BattInf binf=new BattInf();
|
| | | binf.setNum(1002);
|
| | | binf.setMonVolStd(12f);
|
| | | /*List<Fbs9100_state> list=fi.serchByCondition(fs);
|
| | | System.out.println(list.size());
|
| | | for(Fbs9100_state f:list){
|
| | | System.out.println(f);
|
| | | }*/
|
| | | List<Fbs9100_state> list=fi.serchByCondition_ky();
|
| | | /*List<Fbs9100_state> 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);
|
| | |
| | | for(Fbs9100_state f:list){
|
| | | System.out.println(f);
|
| | | }*/
|
| | | List<Fbs9100_state> list=fi.seachDischarge(binf);
|
| | | System.out.println(list.size());
|
| | | for(Fbs9100_state f:list){
|
| | | System.out.println(f);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|