package shuju;

import com.engine.attendance.enums.SchedulingApproachEnum;
import com.engine.common.util.DateUtil;
import com.engine.common.util.Utils;
import com.google.common.collect.Lists;

import java.time.ZoneOffset;
import java.util.*;
import java.util.stream.Collectors;

public class Test {
    public static void main(String[] args) {
        List<Map<String, Object>> dataList = Lists.newArrayList();
        dataList.add(new HashMap(){{
            put("pbrq","2024-04-26");
            put("pbsj","05:55");
        }});
        dataList.add(new HashMap(){{
            put("pbrq","2024-04-26");
            put("pbsj","08:55");
        }});
        dataList.add(new HashMap(){{
            put("pbrq","2024-04-26");
            put("pbsj","06:55");
        }});
        dataList = dataList.stream().sorted(Comparator.comparing(f-> DateUtil.getTime(f.get("pbrq")+" "+f.get("pbsj")).toInstant(ZoneOffset.of("+8")).toEpochMilli())).collect(Collectors.toList());
        System.out.println(dataList);
    }
}
