Commit 9f1577f2 by “zcwang”

modify:负责人查询

parent 40deca85
......@@ -8,6 +8,7 @@ package com.netease.mail.yanxuan.change.biz.callback;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
......@@ -154,19 +155,22 @@ public class ChangeFlowExportCallback implements DesCallbackService {
}
}
log.info("[getExportList] allItemList:{}", allItemList);
List<SpuTO> spuTOS = new ArrayList<>();
Map<Long, List<SimplePhyCateGoryResultCo>> categoryChain = new HashMap<>();
Map<Long, ChangeGoodsPrincipalPO> longChangeGoodsPrincipalPOMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(allItemList)) {
allItemList = allItemList.stream().distinct().collect(Collectors.toList());
// 批量查询spu信息
spuTOS = itemService.batchQuerySpuInfo(BatchQuerySpuInfoParam.builder().ids(allItemList)
.commonProps(new ArrayList<>()).spuProps(Arrays.asList("itemSetupType", "businessForm")).build());
// 批量查询物理类目
categoryChain = itemService
.queryBySpuIds(CommonIdsParamQuery.builder().ids(allItemList).build());
// 查询商品对应负责人信息
longChangeGoodsPrincipalPOMap = interiorChangeConfigService
.queryGoodsPrincipalInfo(allItemList);
log.debug("[getExportList] spuTOS:{}", spuTOS.size());
}
// 批量查询spu信息
List<SpuTO> spuTOS = itemService.batchQuerySpuInfo(BatchQuerySpuInfoParam.builder().ids(allItemList)
.commonProps(new ArrayList<>()).spuProps(Arrays.asList("itemSetupType", "businessForm")).build());
// 批量查询物理类目
Map<Long, List<SimplePhyCateGoryResultCo>> categoryChain = itemService
.queryBySpuIds(CommonIdsParamQuery.builder().ids(allItemList).build());
// 查询商品对应负责人信息
Map<Long, ChangeGoodsPrincipalPO> longChangeGoodsPrincipalPOMap = interiorChangeConfigService
.queryGoodsPrincipalInfo(allItemList);
log.debug("[getExportList] spuTOS:{}", spuTOS.size());
List<ChangeFlowExcelDTO> changeFlowExcelDTOList = new ArrayList<>();
// 导出excel,按照商品/供应商和行动项,n*n重复拆分,例2个商品3个行动项,拆分成2*3=6行,其他属性一致
for (ChangeRecord record : changeRecords) {
......
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