From 812377add3091d6d94a3787a0ce478d33a447400 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 19 七月 2023 11:12:51 +0800 Subject: [PATCH] 1 --- src/main/java/com/yssh/service/WarningAnalyseService.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/yssh/service/WarningAnalyseService.java b/src/main/java/com/yssh/service/WarningAnalyseService.java index 4e06729..7a9d6d2 100644 --- a/src/main/java/com/yssh/service/WarningAnalyseService.java +++ b/src/main/java/com/yssh/service/WarningAnalyseService.java @@ -372,7 +372,7 @@ //String time = ymdh.format(wd.getCreateTime()); //list.add(new WarningVo(wd.getLocationName(), wd.getSuYuanId(), 0.0, 0.0, wd.getValue(), time)); - DistanceSuYuan suYuan = suYuanMapper.getSuYuanById(wd.getTableName(), wd.getSuYuanId()); + /*DistanceSuYuan suYuan = suYuanMapper.getSuYuanById(wd.getTableName(), wd.getSuYuanId()); Double lastVal = warningDetailMapper.getLastYearVal(wd.getId()); int rows = suYuanMapper.isTableExists(wd.getTableName()); @@ -383,8 +383,20 @@ suMax = suYuanMapper.getSuYuan500Max(wd.getTableName(), ids3d); } else { suMax = suYuan; + }*/ + + int rows = suYuanMapper.isTableExists(wd.getTableName()); + if (rows == 0) { + continue; } + DistanceSuYuan suYuan = suYuanMapper.getSuYuanById(wd.getTableName(), wd.getSuYuanId()); + Double lastVal = warningDetailMapper.getLastYearVal(wd.getId()); + + MonitorPointPosition point = commonService.select3dCheckPointByName(wd.getLocationName()); + List<String> ids3d = CalculateUtils.aloneCrosswiseExtend(point, 50); + DistanceSuYuan suMax = suYuanMapper.getSuYuan500Max(wd.getTableName(), ids3d); + Report report = Report.calcReport(wd, suYuan, suMax); report.setLastVal(lastVal); -- Gitblit v1.9.3