| | |
| | | } |
| | | return resultTableList; |
| | | } |
| | | //实时界面点击查看历史信息 |
| | | public List getLockHisWithReal(Date startTime,Date endTime, |
| | | String dbName,String tablePrefix, |
| | | Object pojo) throws ParseException { |
| | | Map<String, List<Date>> queryTimeForSubTables = DateUtil.getQueryTimeForSubTablesDescWithOutDefault(startTime, endTime); |
| | | Set<String> tableYearKeySet = queryTimeForSubTables.keySet(); |
| | | List<Object> dataList = new LinkedList<>(); |
| | | for (String tableYear : tableYearKeySet) { |
| | | List<Date> queryTime = queryTimeForSubTables.get(tableYear); |
| | | |
| | | //数值 |
| | | String tableName = tablePrefix+"_"+tableYear; |
| | | String existTableName = commonMapper.existTable(dbName, tableName); |
| | | if(existTableName == null){ |
| | | continue; |
| | | } |
| | | //====== 根据不同类型类型对象对应调整 ====== |
| | | if(pojo instanceof LockHis) { |
| | | LockHis his = new LockHis(); |
| | | BeanUtils.copyProperties(pojo, his); |
| | | his.setStartTime(queryTime.get(0)); |
| | | his.setEndTime(queryTime.get(1)); |
| | | his.setRecordYear(tableName); |
| | | List<LockHis> list = service.getLockHisWithReal(his); |
| | | dataList.addAll(list); |
| | | } |
| | | } |
| | | return dataList; |
| | | } |
| | | } |