| | |
| | | Set<String> tableYearKeySet = queryTimeForSubTables.keySet(); |
| | | for (String tableYear : tableYearKeySet) { |
| | | List<Date> queryTime = queryTimeForSubTables.get(tableYear); |
| | | |
| | | String tableName; |
| | | if(!tableYear.equals("default")){ |
| | | //数值 |
| | | tableName = tablePrefix+"_"+tableYear; |
| | | String existTableName = commonMapper.existTable(dbName, tableName); |
| | | if(existTableName == null){ |
| | | continue; |
| | | } |
| | | }else{ |
| | | tableName = tablePrefix; |
| | | String tableName=tablePrefix+"_"+tableYear;; |
| | | String existTableName = commonMapper.existTable(dbName, tableName); |
| | | if(existTableName == null){ |
| | | continue; |
| | | } |
| | | //====== 根据不同类型类型对象对应调整 ====== |
| | | if(pojo instanceof PwrAlmPar) { |
| | |
| | | CountDownLatch latch = new CountDownLatch(tableYearListInDB.size()); |
| | | for (String tableYear : tableYearListInDB) { |
| | | List<Date> queryTime = queryTimeForSubTables.get(tableYear); |
| | | |
| | | String tableName; |
| | | if(!tableYear.equals("default")){ |
| | | //数值 |
| | |
| | | tableName = tablePrefix; |
| | | } |
| | | pool.execute(()-> { |
| | | |
| | | //====== 根据不同类型类型对象对应调整 ====== |
| | | if (pojo instanceof BattAlmPar) { //电池告警历史 |
| | | BattAlmPar param = new BattAlmPar(); |
| | |
| | | param.setRecordYear(tableName); |
| | | int currentCount = subService.getDevAlmHisCount(param); |
| | | queryCountMap.put(tableYear, currentCount); |
| | | |
| | | } |
| | | |
| | | latch.countDown(); |
| | |
| | | data.setLimitStart(limitList.get(0)); |
| | | data.setLimitEnd(limitList.get(1)); |
| | | data.setRecordYear(recordYear); |
| | | List<BattAlarmRes> list = subService.getBattAlmHisList(data); |
| | | List<BattalarmDataHistory> list = subService.getBattAlmHisList(data); |
| | | dataList.addAll(list); |
| | | } |
| | | else if (pojo instanceof DevAlmPar) { |