| | |
| | | import com.whyc.dto.AlmHis.PwrAlmPar; |
| | | import com.whyc.dto.AnalysisAlm.ResAnalysis; |
| | | import com.whyc.dto.Real.*; |
| | | import com.whyc.dto.Statistic.ComPareChart; |
| | | import com.whyc.dto.Statistic.QuarterPwr7Res; |
| | | import com.whyc.mapper.CallBack; |
| | | import com.whyc.pojo.db_alarm.BattalarmDataHistory; |
| | |
| | | } |
| | | //获取内阻数据 |
| | | public List<QuarterDto> getBattResInfData(Integer battgroupId,Integer testRecordCount) { |
| | | String sql="select distinct mon_num,test_starttime,mon_res, from db_batt_testdata.tb_battresdata_"+battgroupId |
| | | String sql="select distinct mon_num,test_starttime,mon_res from db_batt_testdata.tb_battresdata_"+battgroupId |
| | | +" where test_record_count="+testRecordCount+" order by mon_num asc"; |
| | | List<QuarterDto> list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |
| | |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | //取内阻测试的最大内阻和单体编号 |
| | | public List<QuarterDto> getMaxResInInfData(Integer battgroupId, Integer testRecordCount) { |
| | | String sql="select distinct mon_num,test_starttime,mon_res from db_batt_testdata.tb_battresdata_"+battgroupId |
| | | +" where test_record_count="+testRecordCount+" order by mon_num asc"; |
| | | List<QuarterDto> list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |
| | | public List getResults(ResultSet rs) throws SQLException { |
| | | List<QuarterDto> list=new ArrayList<>(); |
| | | while (rs.next()){ |
| | | QuarterDto data=new QuarterDto(); |
| | | data.setMonNum(rs.getInt("mon_num")); |
| | | data.setNumValue(rs.getFloat("mon_res")); |
| | | data.setRecordTime(rs.getTimestamp("test_starttime")); |
| | | list.add(data); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | //找这次放电的指定一笔数据 |
| | | public List<BatttestdataId> getLastDataByBattgroupId(Integer battgroupId, Integer testRecordCount, Integer recordNum) { |
| | |
| | | } |
| | | |
| | | public List<PwrHisRealDcoutInDto> getHalfHourPwrHisDcoutData(String tableName,Integer granularity,Date recordDatetime,Date recordDatetime1,Integer maxRecordNum,Integer minRecordNum) { |
| | | String sql="select distinct * " + |
| | | " from "+tableName+" where record_datetime>='"+ActionUtil.sdf.format(recordDatetime)+"'" + |
| | | " and record_datetime<='"+ActionUtil.sdf.format(recordDatetime1)+ |
| | | "' and (record_num-"+minRecordNum+")%"+granularity+"=0 or record_num="+minRecordNum+" or record_num="+maxRecordNum; |
| | | sql+=" order by record_datetime asc"; |
| | | List<PwrHisRealDcoutInDto> list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |
| | | public List getResults(ResultSet rs) throws SQLException { |
| | | List<PwrHisRealDcoutInDto> list=new ArrayList<>(); |
| | | while (rs.next()){ |
| | | PwrHisRealDcoutInDto data=new PwrHisRealDcoutInDto(); |
| | | data.setRecordDatetime(rs.getTimestamp("record_datetime")); |
| | | data.setMOutputvol(rs.getFloat("m_outputvol")); |
| | | data.setM1Outcurr(rs.getFloat("m1_outcurr")); |
| | | data.setM2Outcurr(rs.getFloat("m2_outcurr")); |
| | | data.setM3Outcurr(rs.getFloat("m3_outcurr")); |
| | | data.setM4Outcurr(rs.getFloat("m4_outcurr")); |
| | | data.setM5Outcurr(rs.getFloat("m5_outcurr")); |
| | | data.setM6Outcurr(rs.getFloat("m6_outcurr")); |
| | | data.setM7Outcurr(rs.getFloat("m7_outcurr")); |
| | | data.setM8Outcurr(rs.getFloat("m8_outcurr")); |
| | | data.setM9Outcurr(rs.getFloat("m9_outcurr")); |
| | | data.setM10Outcurr(rs.getFloat("m10_outcurr")); |
| | | data.setM11Outcurr(rs.getFloat("m11_outcurr")); |
| | | data.setM12Outcurr(rs.getFloat("m12_outcurr")); |
| | | data.setM13Outcurr(rs.getFloat("m13_outcurr")); |
| | | data.setM14Outcurr(rs.getFloat("m14_outcurr")); |
| | | data.setM15Outcurr(rs.getFloat("m15_outcurr")); |
| | | data.setM16Outcurr(rs.getFloat("m16_outcurr")); |
| | | data.setM1OutVol(rs.getFloat("m1_out_vol")); |
| | | data.setM2OutVol(rs.getFloat("m2_out_vol")); |
| | | data.setM3OutVol(rs.getFloat("m3_out_vol")); |
| | | data.setM4OutVol(rs.getFloat("m4_out_vol")); |
| | | data.setM5OutVol(rs.getFloat("m5_out_vol")); |
| | | data.setM6OutVol(rs.getFloat("m6_out_vol")); |
| | | data.setM7OutVol(rs.getFloat("m7_out_vol")); |
| | | data.setM8OutVol(rs.getFloat("m8_out_vol")); |
| | | data.setM9OutVol(rs.getFloat("m9_out_vol")); |
| | | data.setM10OutVol(rs.getFloat("m10_out_vol")); |
| | | data.setM11OutVol(rs.getFloat("m11_out_vol")); |
| | | data.setM12OutVol(rs.getFloat("m12_out_vol")); |
| | | data.setM13OutVol(rs.getFloat("m13_out_vol")); |
| | | data.setM14OutVol(rs.getFloat("m14_out_vol")); |
| | | data.setM15OutVol(rs.getFloat("m15_out_vol")); |
| | | data.setM16OutVol(rs.getFloat("m16_out_vol")); |
| | | list.add(data); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | //电源历史实时 |
| | | public List<PwrHisRealDcoutInDto> getPwrRealDataHis(String tableName,Integer granularity,Date recordDatetime,Date recordDatetime1,Integer maxRecordNum,Integer minRecordNum) { |
| | | String sql="select distinct * " + |
| | | " from "+tableName+" where record_datetime>='"+ActionUtil.sdf.format(recordDatetime)+"'" + |
| | | " and record_datetime<='"+ActionUtil.sdf.format(recordDatetime1)+ |
| | |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | } |