Commit 208a961e authored by 高滢's avatar 高滢

指定方案计划 排序

parent d46b8c12
...@@ -31,7 +31,7 @@ public class TestObjectDataController { ...@@ -31,7 +31,7 @@ public class TestObjectDataController {
@RequestMapping(method = RequestMethod.POST, value = "/getList") @RequestMapping(method = RequestMethod.POST, value = "/getList")
public R<List> SelectTestObjectDataList(){ public R<List> SelectTestObjectDataList(){
List<TestObjectData> objectList = testObjectDataService.selectTestObjectDataList(); List<TestObjectData> objectList = testObjectDataService.selectTestObjectDataList();
Map<String, List<TestObjectData>> groupedObject = objectList.stream() .sorted(Comparator.comparingInt(TestObjectData::getSort)).collect(Collectors.groupingBy(TestObjectData::getDescribe)); Map<String, List<TestObjectData>> groupedObject = objectList.stream().collect(Collectors.groupingBy(TestObjectData::getDescribe,LinkedHashMap::new, Collectors.toList()));
List list= new ArrayList<>(); List list= new ArrayList<>();
final int[] sum = {0}; final int[] sum = {0};
groupedObject.forEach((key,value)->{ groupedObject.forEach((key,value)->{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment