fix: bug-1327 设备的技术参数,导出后的顺序,能否优化为与系统中的顺序一致?

This commit is contained in:
曹鹏飞 2026-02-25 17:21:49 +08:00
parent fd813c61cc
commit d631cdd15f
1 changed files with 2 additions and 1 deletions

View File

@ -558,7 +558,8 @@ public class ProductModelController extends ControllerBase {
if (CollectionUtil.isNotEmpty(paramsItems)) { if (CollectionUtil.isNotEmpty(paramsItems)) {
AtomicInteger rowIndex = new AtomicInteger(4); AtomicInteger rowIndex = new AtomicInteger(4);
List<ProductModelParamsItem> cnItems = paramsItems.stream().filter(item -> StrUtil.equals(item.getLanguageCode(), Constant.DEFAULT_LANGUAGE_CODE)).collect(Collectors.toList()); List<ProductModelParamsItem> cnItems = paramsItems.stream().filter(item -> StrUtil.equals(item.getLanguageCode(), Constant.DEFAULT_LANGUAGE_CODE)).collect(Collectors.toList());
Map<String, List<ProductModelParamsItem>> itemMap = cnItems.stream().collect(Collectors.groupingBy(ProductModelParamsItem::getIndexName)); cnItems.sort(Comparator.comparing(ProductModelParamsItem::getBatchNumber));
Map<String, List<ProductModelParamsItem>> itemMap = cnItems.stream().collect(Collectors.groupingBy(ProductModelParamsItem::getIndexName, LinkedHashMap::new, Collectors.toList()));
AtomicInteger row = new AtomicInteger(rowIndex.get()); AtomicInteger row = new AtomicInteger(rowIndex.get());
itemMap.forEach((indexName, itemData) -> { itemMap.forEach((indexName, itemData) -> {
int itemSize = itemData.size(); int itemSize = itemData.size();