| | |
| | | } |
| | | } |
| | | |
| | | public List<BattRealTimeDataHistory> getFirstRecordList(String tableName) { |
| | | String sql = "select * from db_power_history." + tableName + " limit 104"; |
| | | List<BattRealTimeDataHistory> list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | |
| | | @Override |
| | | public List getResults(ResultSet rs) throws SQLException { |
| | | List<BattRealTimeDataHistory> list = new LinkedList<>(); |
| | | //如果存在记录 |
| | | while (rs.next()) { |
| | | BattRealTimeDataHistory his = new BattRealTimeDataHistory(); |
| | | his.setTestStartTime(rs.getTimestamp("test_start_time")); |
| | | his.setMonNum(rs.getInt("mon_num")); |
| | | his.setMonVol(rs.getFloat("mon_vol")); |
| | | his.setMonRes(rs.getFloat("mon_res")); |
| | | his.setMonTmp(rs.getFloat("mon_tmp")); |
| | | |
| | | list.add(his); |
| | | } |
| | | return list; |
| | | |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | } |