perf: 标准导出性能提升
This commit is contained in:
+4
-5
@@ -602,8 +602,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
**/
|
||||
private List<Map<String, Object>> processResultMapPageList(List<Map<String, Object>> records, List<LawsTag> fieldList) {
|
||||
List<SysDictItem> dictItemList = getDictItemList(fieldList);
|
||||
List<Map<String, Object>> resultMapList = new ArrayList<>();
|
||||
for (Map<String, Object> map : records) {
|
||||
// 使用并行流进行多线程处理
|
||||
return records.parallelStream().map(map -> {
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
String id = (String) map.get("id");
|
||||
String standardNumber = (String) map.get(FieldCommon.STANDARD_NUMBER);
|
||||
@@ -622,9 +622,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
}
|
||||
processSpecificFieldValue(resultMap, key, value, id, standardNumber, fieldList);
|
||||
}
|
||||
resultMapList.add(resultMap);
|
||||
}
|
||||
return resultMapList;
|
||||
return resultMap;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user