| | |
| | | }
|
| | | });
|
| | | }
|
| | | //实时监测<-------跨域----------->
|
| | | public List serchByCondition_ky(Object obj) {
|
| | | Batt_rtstate br=(Batt_rtstate)obj;
|
| | | String sql="select num,BattGroupId,batt_count,rec_datetime,group_vol,online_vol,group_curr,batt_state," +
|
| | | "batt_test_type,batt_test_starttime,batt_test_recordtime,batt_test_tlong," +
|
| | | "batt_test_cap,batt_real_cap,batt_rest_cap,batt_rest_power1_time,batt_rest_power2_time" +
|
| | | " from db_ram_db.tb_batt_rtstate where BattGroupId=?";
|
| | | return DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{br.getBattGroupId()}, new CallBack() {
|
| | | |
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()){
|
| | | Batt_rtstate b=new Batt_rtstate();
|
| | | b.setNum(rs.getInt("num"));
|
| | | b.setBattGroupId(rs.getInt("BattGroupId"));
|
| | | b.setBatt_count(rs.getInt("batt_count"));
|
| | | b.setRec_datetime(rs.getTimestamp("rec_datetime"));
|
| | | b.setOnline_vol(rs.getFloat("online_vol"));
|
| | | b.setGroup_vol(rs.getFloat("group_vol"));
|
| | | b.setGroup_curr(rs.getFloat("group_curr"));
|
| | | b.setBatt_state(rs.getInt("batt_state"));
|
| | | b.setBatt_test_type(rs.getInt("batt_test_type"));
|
| | | b.setBatt_test_starttime(rs.getTimestamp("batt_test_starttime"));
|
| | | b.setBatt_test_recordtime(rs.getTimestamp("batt_test_recordtime"));
|
| | | b.setBatt_test_tlong(rs.getInt("batt_test_tlong"));
|
| | | b.setBatt_test_cap(rs.getFloat("batt_test_cap"));
|
| | | b.setBatt_real_cap(rs.getFloat("batt_real_cap"));
|
| | | b.setBatt_rest_cap(rs.getFloat("batt_rest_cap"));
|
| | | b.setBatt_rest_power1_time(rs.getInt("batt_rest_power1_time"));
|
| | | b.setBatt_rest_power2_time(rs.getInt("batt_rest_power2_time"));
|
| | | //System.out.println(b);
|
| | | list.add(b);
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return list;
|
| | | }
|
| | | });
|
| | | }
|
| | | //测试数据——实时查询中左下角的充放电统计(旧)
|
| | | public List serchDisOrChargr(){
|
| | | String sql=" SELECT db_ram_db.tb_batt_rtstate.battgroupid,batt_test_type,stationid " +
|
| | |
| | | /*List<Batt_rtstate> list=bimpl.serchDisOrChargrNew(uinf);
|
| | | for (Batt_rtstate b : list) {
|
| | | System.out.println(b);
|
| | | }*/
|
| | | }
|
| | | }*/
|
| | | Batt_rtstate br=new Batt_rtstate();
|
| | | br.setBattGroupId(1002101);
|
| | | List<Batt_rtstate> list=bimpl.serchByCondition_ky(br);
|
| | | for (Batt_rtstate b : list) {
|
| | | System.out.println(b);
|
| | | }
|
| | | }
|
| | | }
|