| | |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.InterfaceParam; |
| | | import com.whyc.dto.UpsAlarmDTO; |
| | | import com.whyc.dto.paramter.AlarmPar; |
| | | import com.whyc.dto.paramter.DevAlarmPar; |
| | | import com.whyc.dto.result.AlarmRes; |
| | |
| | | param.setAlmStartTime(queryTime.get(0)); |
| | | param.setAlmStartTime1(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | int currentCount = battAlarmDataHistoryMapper.getCount(param); |
| | | //int currentCount = battAlarmDataHistoryMapper.getCount(param); |
| | | int currentCount = subService.getCount(param); |
| | | queryCountMap.put(tableYear,currentCount); |
| | | } |
| | | else if (pojo instanceof DevAlarmPar) { |
| | |
| | | param.setAlmStartTime(queryTime.get(0)); |
| | | param.setAlmStartTime1(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | int currentCount = powerAlarmHistoryMapper.getCountForTX(param); |
| | | //int currentCount = powerAlarmHistoryMapper.getCountForTX(param); |
| | | int currentCount = subService.getCountForTX(param); |
| | | queryCountMap.put(tableYear, currentCount); |
| | | } |
| | | |
| | |
| | | param.setStartTime(queryTime.get(0)); |
| | | param.setEndTime(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | int currentCount = battAlarmDataHistoryMapper.getCountForInterface(param); |
| | | //int currentCount = battAlarmDataHistoryMapper.getCountForInterface(param); |
| | | int currentCount = subService.getCountForInterface_batt(param); |
| | | queryCountMap.put(tableYear,currentCount); |
| | | }else if(tablePrefix.equals("tb_devalarm_data_history")){ |
| | | param.setStartTime(queryTime.get(0)); |
| | | param.setEndTime(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | int currentCount = devAlarmDataHistoryMapper.getCountForInterface(param); |
| | | //int currentCount = devAlarmDataHistoryMapper.getCountForInterface(param); |
| | | int currentCount = subService.getCountForInterface(param); |
| | | queryCountMap.put(tableYear,currentCount); |
| | | } |
| | | } |
| | | else if (pojo instanceof UpsAlarmDTO) { |
| | | //ups不存在初始表,跳过 |
| | | if(tableYear.equals("default")){ |
| | | continue; |
| | | } |
| | | UpsAlarmDTO param = (UpsAlarmDTO) pojo; |
| | | param.setAlmStartTime(queryTime.get(0)); |
| | | param.setAlmEndTime(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | //int currentCount = powerAlarmHistoryMapper.getCount(param); |
| | | int currentCount = subService.getCountForUps(param); |
| | | queryCountMap.put(tableYear, currentCount); |
| | | } |
| | | } |
| | | |
| | |
| | | data.setLimitStart(limitList.get(0)); |
| | | data.setLimitEnd(limitList.get(1)); |
| | | data.setRecordYear(recordYear); |
| | | List<AlarmRes> list = battAlarmDataHistoryMapper.getList2(data); |
| | | //List<AlarmRes> list = battAlarmDataHistoryMapper.getList2(data); |
| | | List<AlarmRes> list = subService.getList2(data); |
| | | dataList.addAll(list); |
| | | } |
| | | else if (pojo instanceof DevAlarmPar) { |
| | |
| | | data.setRecordYear(recordYear); |
| | | //List<DevalarmDataHistory> list = devAlarmDataHistoryMapper.getList2(data); |
| | | List<DevalarmDataHistory> list = subService.getList2(data); |
| | | |
| | | dataList.addAll(list); |
| | | } |
| | | else if (pojo instanceof UpsAlarmDTO) { |
| | | UpsAlarmDTO data = (UpsAlarmDTO) pojo; |
| | | data.setAlmStartTime(queryTime.get(0)); |
| | | data.setAlmEndTime(queryTime.get(1)); |
| | | |
| | | List<Integer> limitList = tableAndLimitMap.get(key); |
| | | data.setLimitStart(limitList.get(0)); |
| | | data.setLimitEnd(limitList.get(1)); |
| | | data.setRecordYear(recordYear); |
| | | //List<DevalarmDataHistory> list = devAlarmDataHistoryMapper.getList2(data); |
| | | List<UpspwrdevAlarmHistory> list = subService.getList2(data); |
| | | |
| | | dataList.addAll(list); |
| | | } |
| | |
| | | data.setLimitStart(limitList.get(0)); |
| | | data.setLimitEnd(limitList.get(1)); |
| | | data.setRecordYear(recordYear); |
| | | List<AlarmRes> list = devAlarmDataHistoryMapper.getListForInterface(data); |
| | | //List<AlarmRes> list = devAlarmDataHistoryMapper.getListForInterface(data); |
| | | List list = subService.getListForInterface_dev(data); |
| | | dataList.addAll(list); |
| | | } |
| | | } |
| | |
| | | param.setAlmStartTime(queryTime.get(0)); |
| | | param.setAlmStartTime1(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | int currentCount = battAlarmDataHistoryMapper.getCount(param); |
| | | //int currentCount = battAlarmDataHistoryMapper.getCount(param); |
| | | int currentCount = subService.getCount(param); |
| | | queryCountMap.put(tableYear, currentCount); |
| | | } else if (pojo instanceof DevAlarmPar) { |
| | | //DevAlarmPar param = (DevAlarmPar) pojo; |
| | |
| | | param.setAlmStartTime1(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | //int currentCount = devAlarmDataHistoryMapper.getCount(param); |
| | | int currentCount = subService.getCount(param); |
| | | //int currentCount = subService.getCount(param); |
| | | int currentCount = subService.getCount_stationId(param); |
| | | queryCountMap.put(tableYear, currentCount); |
| | | |
| | | } else if (pojo instanceof PwrdevAlarmHistory) { |
| | |
| | | param.setAlmStartTime(queryTime.get(0)); |
| | | param.setAlmStartTime1(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | int currentCount = powerAlarmHistoryMapper.getCountForTX(param); |
| | | //int currentCount = powerAlarmHistoryMapper.getCountForTX(param); |
| | | int currentCount = subService.getCountForTX(param); |
| | | queryCountMap.put(tableYear, currentCount); |
| | | } |
| | | |
| | |
| | | param.setStartTime(queryTime.get(0)); |
| | | param.setEndTime(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | int currentCount = battAlarmDataHistoryMapper.getCountForInterface(param); |
| | | //int currentCount = battAlarmDataHistoryMapper.getCountForInterface(param); |
| | | int currentCount = subService.getCountForInterface_batt(param); |
| | | queryCountMap.put(tableYear, currentCount); |
| | | } else if (tablePrefix.equals("tb_devalarm_data_history")) { |
| | | param.setStartTime(queryTime.get(0)); |
| | | param.setEndTime(queryTime.get(1)); |
| | | param.setRecordYear(tableName); |
| | | int currentCount = devAlarmDataHistoryMapper.getCountForInterface(param); |
| | | //int currentCount = devAlarmDataHistoryMapper.getCountForInterface(param); |
| | | int currentCount = subService.getCountForInterface(param); |
| | | queryCountMap.put(tableYear, currentCount); |
| | | } |
| | | } |
| | |
| | | data.setLimitStart(limitList.get(0)); |
| | | data.setLimitEnd(limitList.get(1)); |
| | | data.setRecordYear(recordYear); |
| | | List<AlarmRes> list = battAlarmDataHistoryMapper.getList2(data); |
| | | //List<AlarmRes> list = battAlarmDataHistoryMapper.getList2(data); |
| | | List<AlarmRes> list = subService.getList2(data); |
| | | dataList.addAll(list); |
| | | } |
| | | else if (pojo instanceof DevAlarmPar) { |
| | |
| | | data.setLimitEnd(limitList.get(1)); |
| | | data.setRecordYear(recordYear); |
| | | //List<DevalarmDataHistory> list = devAlarmDataHistoryMapper.getList2(data); |
| | | List<DevalarmDataHistory> list = subService.getList2(data); |
| | | //List<DevalarmDataHistory> list = subService.getList2(data); |
| | | List<DevalarmDataHistory> list = subService.getList2_stationId(data); |
| | | dataList.addAll(list); |
| | | } |
| | | else if (pojo instanceof PwrdevAlarmHistory) { |
| | |
| | | data.setLimitStart(limitList.get(0)); |
| | | data.setLimitEnd(limitList.get(1)); |
| | | data.setRecordYear(recordYear); |
| | | List<AlarmRes> list = devAlarmDataHistoryMapper.getListForInterface(data); |
| | | //List<AlarmRes> list = devAlarmDataHistoryMapper.getListForInterface(data); |
| | | List list = subService.getListForInterface_dev(data); |
| | | dataList.addAll(list); |
| | | } |
| | | } |
| | |
| | | List<BattalarmDataHistory> levelInfoSubList; |
| | | List<Integer> levelSubList; |
| | | if(tableLike.equals("tb_battalarm_data_history")) { |
| | | levelInfoSubList = battAlarmDataHistoryMapper.getLevelSubList(uId, tableName); |
| | | //levelInfoSubList = battAlarmDataHistoryMapper.getLevelSubList(uId, tableName); |
| | | levelInfoSubList = subService.getLevelSubList_batt(uId, tableName); |
| | | } |
| | | else if(tableLike.equals("tb_devalarm_data_history")){ |
| | | levelInfoSubList = devAlarmDataHistoryMapper.getLevelSubList(uId, tableName); |
| | | //levelInfoSubList = devAlarmDataHistoryMapper.getLevelSubList(uId, tableName); |
| | | levelInfoSubList = subService.getLevelSubList_dev(uId, tableName); |
| | | } |
| | | else{ |
| | | levelInfoSubList = powerAlarmHistoryMapper.getLevelSubList(uId, tableName,almTypes); |
| | | //levelInfoSubList = powerAlarmHistoryMapper.getLevelSubList(uId, tableName,almTypes); |
| | | levelInfoSubList = subService.getLevelSubList_pwr(uId, tableName,almTypes); |
| | | } |
| | | levelSubList = levelInfoSubList.stream().map(BattalarmDataHistory::getAlmLevel).collect(Collectors.toList()); |
| | | levelList.addAll(levelSubList); |