数据格式:
[SkillDTO(Job=电线工, rankGrade=高级工, r=4),
SkillDTO(Job=监察员, rankGrade=技师, r=5),
SkillDTO(Job=监察员, rankGrade=高级工, r=4),
SkillDTO(skillJob=监察员, rankGrade=中级工, r=3)]
List<SkillDTO> resultList = SkillDTOList.stream().collect(Collectors.toMap(SkillDTO::getJob, Function.identity(),(existing, replacement) -> existing.getR() > replacement.getR() ? existing : replacement)).values().stream().collect(Collectors.toList());
[SkillDTO(Job=11电线工, rankGrade=高级工, r=4),
SkillDTO(Job=监察员, rankGrade=技师, r=5)]