import com.google.common.collect.Lists;
import weaver.general.Util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class Test2 {
    public static void main(String[] args) {
        List<Map<String,Object>> schedulingList = Lists.newArrayList();
        schedulingList.add(new HashMap(){{
            put("edsc","9.50");
            put("bdlx","0");
            put("jsdk","1");
            put("tqdkfzs","120");
            put("sfkt","1");
            put("dtjssj","13:00");
            put("zddxfz","30");
            put("bcxx","25");
            put("dxhs","5");
            put("bcsdxx","09:00-13:00|13:00-18:30");
            put("sfdx","1");
            put("dtkssj","09:00");
            put("thdkfzs","120");
            put("ksdk","1");
            put("bcxx","11-办公室白班");
        }});
        schedulingList.add(new HashMap(){{
            put("edsc","9.50");
            put("bdlx","0");
            put("jsdk","1");
            put("tqdkfzs","120");
            put("sfkt","1");
            put("dtjssj","13:00");
            put("zddxfz","30");
            put("bcxx","25");
            put("dxhs","5");
            put("bcsdxx","09:00-13:00|13:00-18:30");
            put("sfdx","1");
            put("dtkssj","09:00");
            put("thdkfzs","120");
            put("ksdk","1");
            put("bcxx","");
        }});
        schedulingList.add(new HashMap(){{
            put("edsc","9.50");
            put("bdlx","0");
            put("jsdk","1");
            put("tqdkfzs","120");
            put("sfkt","1");
            put("dtjssj","13:00");
            put("zddxfz","30");
            put("bcxx","25");
            put("dxhs","5");
            put("bcsdxx","09:00-13:00|13:00-18:30");
            put("sfdx","1");
            put("dtkssj","09:00");
            put("thdkfzs","120");
            put("ksdk","1");
            put("bcxx","");
        }});
        Map<String,List<Map<String,Object>>> schedulingMap = schedulingList.stream().collect(Collectors.groupingBy(e-> Util.null2String(e.get("bcxx")).split("-")[0]));
        String bcxxIds = "";
        for (Map.Entry<String,List<Map<String,Object>>> entry :schedulingMap.entrySet()){
            if (!entry.getKey().equals("")){
                bcxxIds +=entry.getKey() +",";
            }
        }
        System.out.println(bcxxIds);
    }
}
