

import com.engine.common.util.DateUtil;
import com.google.common.collect.Lists;

import java.time.ZoneOffset;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class TestMethod {
    public static void main(String[] args) {
//        List<Map<String,Object>> detailTableData = Lists.newArrayList();
//        detailTableData.add(new HashMap(){{
//            put("ksrq","2024-02-18");
//            put("sysc","1");
//        }});
//        detailTableData.add(new HashMap(){{
//            put("ksrq","2024-01-18");
//            put("sysc","1");
//        }});
//
//        detailTableData = detailTableData.stream().sorted(Comparator.comparing(e-> DateUtil.getTime(e.get("ksrq").toString()).toInstant(ZoneOffset.of("+8")).toEpochMilli())).collect(Collectors.toList());
//        System.out.println(detailTableData);

        List<Map<String,Object>> list = Lists.newArrayList();
        double totalUnearnedLeave = list.stream().mapToDouble(e->Double.valueOf(e.get("wxsc").toString())).sum();

        System.out.println(totalUnearnedLeave);
    }
}
