whyclxw
6 天以前 9b85345450e2e194a84679bb6612f58a3124aee8
src/main/java/com/whyc/service/BattRealdataIdService.java
@@ -227,13 +227,18 @@
        return new Response().set(1, dataListSorted);
    }
    //电池告警点击具体告警信息查看从告警开始时间到现在的历史实时数据
    public Response getBattHisRealInAlm(Integer battgroupId, String startTime, Integer almId) throws ParseException, InterruptedException {
    public Response getBattHisRealInAlm(Integer battgroupId, String startTime, Integer almId,Integer intervalTime) throws ParseException, InterruptedException {
        //获取告警almId对应的分析配置属性值
        AlmAnalysisParam almAnalysisParam= almAnalysisParamService.getAnalysisParam(almId);
        List<RealDateDTO> dataList = new LinkedList<>();
        Integer cycleTime=0;
        //获取预警分析周期阈值
        AppParam appParam = appParamService.getAlarmAnalysisCycle();
        Integer cycleTime=appParam.getParamValue().intValue();
        if(intervalTime==null){
            AppParam appParam = appParamService.getAlarmAnalysisCycle();
            cycleTime=appParam.getParamValue().intValue();
        }else{
            cycleTime=intervalTime;
        }
        Date cyscleDate=ActionUtil.getDateAdd(ThreadLocalUtil.parse(startTime,1),cycleTime*(-1));
        //获取cyscleDate到现在所有的历史实时数据
        List<List<Date>> monthTimeList = DateUtil.getMonthTime(cyscleDate,new Date());
@@ -262,6 +267,5 @@
        latch.await(10, TimeUnit.MINUTES);
        List dataListSorted = dataList.stream().sorted(Comparator.comparing(RealDateDTO::getRecordTime)).collect(Collectors.toList());
        return new Response().setIII(1,true, dataListSorted,almAnalysisParam,"电池告警点击具体告警信息查看从告警开始时间到现在的历史实时数据");
    }
}