Commit bdfb3692 by zhouhaibao

fix(excel): 修复Excel导入时门店名称和产品类别同时为空的验证逻辑

- 修改CreateBusinessApproveExcelListener类中的验证条件
- 将单独检查storeName为null改为同时检查storeName和productCategory为null
- 确保当两个字段都为空时正确添加错误信息到上下文
- 保持原有的行号定位和错误消息格式
1 parent 1fb62114
...@@ -224,7 +224,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob ...@@ -224,7 +224,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
try { try {
String storeName = data.getStoreName(); String storeName = data.getStoreName();
String productCategory = data.getProductCategory(); String productCategory = data.getProductCategory();
if (storeName == null){ if (storeName == null && productCategory == null){
String message = String.format("第 %d 行门店商户号为空", rowIndex + 1); String message = String.format("第 %d 行门店商户号为空", rowIndex + 1);
log.warn(message); log.warn(message);
this.context.addErrorInfo(new ImportErrorInfo(rowIndex + 1, message, data)); this.context.addErrorInfo(new ImportErrorInfo(rowIndex + 1, message, data));
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!