#91 -- Restore

This commit is contained in:
Anton Romanov 2023-03-14 23:20:57 +04:00
parent 71652c7b79
commit 80904e6221
2 changed files with 2 additions and 3 deletions

View File

@ -71,9 +71,8 @@ public class AssessmentService {
Map<String, Double> 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())));

View File

@ -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;
}