平台件信息默认按项目名称正序排序

This commit is contained in:
zhn
2023-09-20 15:22:30 +08:00
parent 44c675dbeb
commit 9e960f6fb4
@@ -11901,6 +11901,19 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}
}
}
//平台件信息默认按项目名称正序排序
for (ProjectLawsInventoryEO lawsInventoryEO : result) {
List<ProjectLawsInventoryEO> nventoryEOList = lawsInventoryEO.getProjectLawsInventoryEOS();
if(!nventoryEOList.isEmpty()){
Collator comparator = Collator.getInstance(Locale.CHINESE);
Collections.sort(nventoryEOList,(e1,e2)->{
String e1ProjectName = StringUtils.isNotBlank(e1.getProjectName()) ? e1.getAttestationType() : "";
String e2ProjectName = StringUtils.isNotBlank(e2.getProjectName()) ? e2.getAttestationType() : "";
return comparator.compare(e1ProjectName,e2ProjectName);
});
lawsInventoryEO.setProjectLawsInventoryEOS(nventoryEOList);
}
}
}
}