// String printSumForPeriod = sumForPeriod.entrySet().stream()
// .sorted{k1, k2-> k1.getKey().compareTo(k2.getKey())}
// .map{e-> e.getValue() as String}
// .collect(Collectors.toMap({Map.Entry::getKey}, {Map.Entry::getValue, (key, val) -> key, LinkedHashMap::new}))
//// .collect(Collectors.joining("|"))
def printSumForPeriod = sumForPeriod.entrySet().stream()
.sorted{k1, k2-> k1.getKey().compareTo(k2.getKey())}
.collect(Collectors.toMap(
{o1 -> (isFact?'факт ':'норматив ')+df.format(o1.getKey())},
{o2 -> o2.getValue()==null?"null":o2.getValue()},
{oldValue, newValue -> oldValue},
{new LinkedHashMap<>()}))
def test = Stream.of(["4"],["1", "2"], ["3"], ["4", "5"]).peek{e->_(e)}.collect({new ArrayList<>()}, {b, a->b.addAll(a)}, {b, a->b.addAll(a)}).toSet()