| | |
| | | import com.whyc.mapper.CallBack; |
| | | import com.whyc.pojo.db_alarm.BattalarmDataHistory; |
| | | import com.whyc.pojo.db_alarm.DevalarmDataHistory; |
| | | import com.whyc.pojo.db_batt_testdata.BatttestdataId; |
| | | import com.whyc.pojo.db_pwrdev_alarm.PwrdevAlarmHistory; |
| | | import com.whyc.util.ThreadLocalUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | }); |
| | | return list; |
| | | } |
| | | //找这次放电的最后一笔数据 |
| | | public List<BatttestdataId> getLastDataByBattgroupId(Integer battgroupId, Integer testRecordCount, Integer recordNum) { |
| | | String sql="select distinct * from db_batt_testdata.tb_batttestdata_"+battgroupId |
| | | +" where test_record_count="+testRecordCount+" and record_num="+recordNum+ " order by mon_num asc"; |
| | | List<BatttestdataId> list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |
| | | public List getResults(ResultSet rs) throws SQLException { |
| | | List<BatttestdataId> list=new ArrayList<>(); |
| | | while (rs.next()){ |
| | | BatttestdataId data=new BatttestdataId(); |
| | | data.setBattgroupId(rs.getInt("battgroup_id")); |
| | | data.setTestRecordCount(rs.getInt("test_record_count")); |
| | | data.setTestStarttime(rs.getTimestamp("test_starttime")); |
| | | data.setOnlineVol(rs.getFloat("online_vol")); |
| | | data.setGroupVol(rs.getFloat("group_vol")); |
| | | data.setTestCurr(rs.getFloat("test_curr")); |
| | | data.setTestCap(rs.getFloat("test_cap")); |
| | | data.setMonNum(rs.getInt("mon_num")); |
| | | data.setMonVol(rs.getFloat("mon_vol")); |
| | | data.setMonRes(rs.getFloat("mon_res")); |
| | | data.setMonTmp(rs.getFloat("mon_tmp")); |
| | | list.add(data); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | } |