Fix variabili in DataSheetServices

This commit is contained in:
2024-07-15 11:43:58 +02:00
parent 493ca43226
commit 32ed6f1188

View File

@@ -111,7 +111,7 @@ public class DataSheetServices {
List<HashMap<String, Object>> descrizioni = UtilityDB.executeSimpleQuery(multiDBTransactionManager.getPrimaryConnection(), sql);
if (descrizioni != null && !descrizioni.isEmpty())
if (!descrizioni.isEmpty())
hashMaps.addAll(descrizioni);
HashMap<String, String> resultMap = new HashMap<>();
@@ -122,7 +122,7 @@ public class DataSheetServices {
}
Optional<HashMap<String, Object>> optionalMap = hashMaps.stream()
.filter(map -> UtilityHashMap.<String>getValueIfExists(map, "cod_var").equalsIgnoreCase(variable))
.filter(map -> UtilityHashMap.<String>getValueIfExists(map, "cod_var").equalsIgnoreCase(variable.endsWith("E") ? variable.substring(0, variable.length() - 1) : variable))
.findFirst();
optionalMap.ifPresent(map -> {