| | |
| | | }
|
| | | });
|
| | | }
|
| | | //历史数据查询<-------跨域----------->
|
| | | public List serchByCondition_ky(Object obj) {
|
| | | final Batttestdata_inf bti=(Batttestdata_inf)obj;
|
| | | String sql="select num,BattGroupId,test_record_count,test_record_count_ex,test_type,record_time_interval,data_new,data_available,record_num,test_starttime,test_starttime_ex,test_starttype,record_time,test_timelong,test_stoptype,group_vol,test_curr,test_cap,max_monnum,max_monvol,min_monnum,min_monvol,mon_num,mon_vol,upload_usr_id " +
|
| | | " from db_batt_testdata.tb_batttestdata_inf where BattGroupId=? " +
|
| | | " and db_batt_testdata.tb_batttestdata_inf.data_available=1 " +
|
| | | " order by test_type asc,test_starttime desc ";
|
| | | return DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{bti.getBattGroupId()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List list=new ArrayList();
|
| | | try {
|
| | | while(rs.next()){
|
| | | Batttestdata_inf b=new Batttestdata_inf();
|
| | | b.setNum(rs.getInt("num"));
|
| | | b.setBattGroupId(rs.getInt("BattGroupId"));
|
| | | b.setTest_record_count(rs.getInt("test_record_count"));
|
| | | b.setTest_record_count_ex(rs.getInt("test_record_count_ex"));
|
| | | b.setTest_type(rs.getInt("test_type"));
|
| | | b.setRecord_time_interval(rs.getInt("record_time_interval"));
|
| | | b.setData_new(rs.getInt("data_new"));
|
| | | b.setData_available(rs.getInt("data_available")); |
| | | b.setRecord_num(rs.getInt("record_num"));
|
| | | b.setTest_starttime(rs.getTimestamp("test_starttime"));
|
| | | b.setTest_starttime_ex(rs.getTimestamp("test_starttime_ex"));
|
| | | b.setTest_starttype(rs.getInt("test_starttype"));
|
| | | b.setRecord_time(rs.getTimestamp("record_time"));
|
| | | b.setTest_timelong(rs.getInt("test_timelong"));
|
| | | b.setTest_stoptype(rs.getInt("test_stoptype"));
|
| | | //放电终止原因
|
| | | |
| | | if(bti.getNum()/100000==6185){
|
| | | b.setTest_stoptype_reason(BattTestData.getStopType_6185(b.getTest_stoptype())); |
| | | }else if(bti.getNum()/100000==4016){
|
| | | b.setTest_stoptype_reason(BattTestData.getStopType_4016(b.getTest_stoptype()));
|
| | | }else{
|
| | | b.setTest_stoptype_reason(BattTestData.getStopType(b.getTest_starttype(), b.getTest_stoptype()));
|
| | | }
|
| | | b.setGroup_vol(rs.getFloat("group_vol"));
|
| | | b.setTest_curr(rs.getFloat("test_curr"));
|
| | | b.setTest_cap(rs.getFloat("test_cap"));
|
| | | b.setMax_monnum(rs.getInt("max_monnum"));
|
| | | b.setMax_monvol(rs.getFloat("max_monvol"));
|
| | | b.setMin_monnum(rs.getInt("min_monnum"));
|
| | | b.setMin_monvol(rs.getFloat("min_monvol"));
|
| | | b.setMon_num(rs.getInt("mon_num"));
|
| | | b.setMon_vol(rs.getFloat("mon_vol"));
|
| | | b.setUpload_usr_id(rs.getInt("upload_usr_id"));
|
| | | list.add(b);
|
| | | }
|
| | | } catch (SQLException e) {
|
| | | e.printStackTrace();
|
| | | } |
| | | return list;
|
| | | }
|
| | | });
|
| | | }
|
| | | //6.2根据battgroupi和test_starttime查test_record_count
|
| | | public List serchTest_record_count(Object obj) {
|
| | | Batttestdata_inf tdata=(Batttestdata_inf)obj;
|
| | |
| | | Batt_Maint_Dealarm bmd=new Batt_Maint_Dealarm();
|
| | | bmd.setTdata(tdata);
|
| | | bmd.setBinf(binf);
|
| | | List<Batt_Maint_Dealarm> list=bimpl.serchByInfo(bmd);
|
| | | /*List<Batt_Maint_Dealarm> list=bimpl.serchByInfo(bmd);
|
| | | for (Batt_Maint_Dealarm b : list) {
|
| | | System.out.println(b);
|
| | | }
|
| | | System.out.println(list.size());
|
| | | */
|
| | | Batttestdata_inf tinf=new Batttestdata_inf();
|
| | | tinf.setBattGroupId(1002095);
|
| | | tinf.setNum(910000577);
|
| | | List<Batttestdata_inf> list=bimpl.serchByCondition_ky(tinf);
|
| | | for (Batttestdata_inf b : list) {
|
| | | System.out.println(b);
|
| | | }
|
| | | System.out.println(list.size());
|
| | |
|
| | | }
|
| | |
|