From 80904e622148e740e0d09fd6fbf0730776fde1f5 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 14 Mar 2023 23:20:57 +0400 Subject: [PATCH] #91 -- Restore --- .../ulstu/extractor/assessment/service/AssessmentService.java | 3 +-- .../ru/ulstu/extractor/rule/controller/RuleController.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index 2514e6a..d221806 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -71,9 +71,8 @@ public class AssessmentService { Map variableValues = new HashMap<>(); timeSeries .stream() - .filter(ts -> (ts.getTimeSeriesType() == dbRule.getFirstAntecedent() + .filter(ts -> ts.getTimeSeriesType() == dbRule.getFirstAntecedent() || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) - && ts.getValues().size() > 0) .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService .getLastTimeSeriesTendency(ts) .orElse(ts.getValues().get(ts.getValues().size() - 1).getValue()))); diff --git a/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java b/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java index 4e855df..a9a8258 100644 --- a/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java +++ b/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java @@ -54,7 +54,7 @@ public class RuleController { } @GetMapping(DELETE_RULE) - public String deleteRule(Model model, @RequestParam Integer id) { + public String deleteRule(@RequestParam Integer id) { ruleService.deleteById(id); return "redirect:/" + LIST_RULE; }