Commit e1113b91 by zhouhaibao

fix(excel): 修复门店数据合并逻辑并更新测试文件路径

- 调整 mergedCellHandler.fillMergedCellValues 调用顺序,确保数据正确填充
- 在创建新门店前清除合并单元格处理器状态
- 添加数据合并后的日志记录以便调试
- 更新测试用例中的 Excel 文件路径为正确模板文件
- 更换测试用的 sessionId 为有效值以确保测试准确性
1 parent 2cb4d07f
...@@ -195,14 +195,15 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob ...@@ -195,14 +195,15 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
private void processSingleStoreMode(SingleStoreExcelDTO data, Integer rowIndex) { private void processSingleStoreMode(SingleStoreExcelDTO data, Integer rowIndex) {
try { try {
String productCategory = data.getProductCategory(); String productCategory = data.getProductCategory();
mergedCellHandler.fillMergedCellValues(data);
StoreWithProductsDTO storeDTO = storeMap.get(merchantName); StoreWithProductsDTO storeDTO = storeMap.get(merchantName);
if (storeDTO == null) { if (storeDTO == null) {
mergedCellHandler.clear();
storeDTO = createStoreWithProductsDTO(data); storeDTO = createStoreWithProductsDTO(data);
storeMap.put(merchantName, storeDTO); storeMap.put(merchantName, storeDTO);
storeWithProducts.add(storeDTO); storeWithProducts.add(storeDTO);
} }
mergedCellHandler.fillMergedCellValues(data);
if (productCategory != null) { if (productCategory != null) {
StoreWithProductsDTO.ProductCategoryRuleDTO ruleDTO = createProductCategoryRuleDTO( StoreWithProductsDTO.ProductCategoryRuleDTO ruleDTO = createProductCategoryRuleDTO(
data); data);
...@@ -231,7 +232,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob ...@@ -231,7 +232,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
return; return;
} }
mergedCellHandler.fillMergedCellValues(data); mergedCellHandler.fillMergedCellValues(data);
log.info("数据合并后{}", JSONObject.toJSONString(data));
StoreWithProductsDTO storeDTO = storeMap.get(storeName); StoreWithProductsDTO storeDTO = storeMap.get(storeName);
if (storeDTO == null && storeName != null) { if (storeDTO == null && storeName != null) {
storeDTO = createBatchStoreWithProductsDTO(data); storeDTO = createBatchStoreWithProductsDTO(data);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!