public static void main(String[] args) {
List<StaticDoctorDataDO> list1 = new ArrayList<>();
List<StaticDoctorDataDO> list2 = new ArrayList<>();
StaticDoctorDataDO staticDoctorDataDO = new StaticDoctorDataDO();
staticDoctorDataDO.setDoctorId("1111");
StaticDoctorDataDO staticDoctorDataDO1 = new StaticDoctorDataDO();
staticDoctorDataDO1.setDoctorId("1112");
StaticDoctorDataDO staticDoctorDataDO2 = new StaticDoctorDataDO();
staticDoctorDataDO2.setDoctorId("1113");
StaticDoctorDataDO staticDoctorDataDO3 = new StaticDoctorDataDO();
staticDoctorDataDO3.setDoctorId("1114");
StaticDoctorDataDO staticDoctorDataDO4 = new StaticDoctorDataDO();
list1.add(staticDoctorDataDO);
list1.add(staticDoctorDataDO1);
list1.add(staticDoctorDataDO2);
list1.add(staticDoctorDataDO3);
list1.add(staticDoctorDataDO4);
StaticDoctorDataDO staticDoctorDataDO5 = new StaticDoctorDataDO();
staticDoctorDataDO5.setDoctorId("1111");
StaticDoctorDataDO staticDoctorDataDO6 = new StaticDoctorDataDO();
staticDoctorDataDO6.setDoctorId("1116");
list2.add(staticDoctorDataDO5);
list2.add(staticDoctorDataDO6);
StaticDoctorDataDO staticDoctorDataDO7 = new StaticDoctorDataDO();
staticDoctorDataDO7.setDoctorId("1112");
list2.add(staticDoctorDataDO7);
list1.addAll(list2);
List<StaticDoctorDataDO> newList = new ArrayList<>(new HashSet<>(list1));
for (StaticDoctorDataDO a : newList) {
System.out.println(a);
}
}