提交 6d54bd07 authored 作者: 窦馨雨's avatar 窦馨雨

合并分支 'qa' 到 'master'

修改纵数匹配和错误信息返回 查看合并请求 !101
......@@ -42,7 +42,7 @@ public class ExportExcelServiceImpl implements IExportExcelService {
return R.ok(R.SUCCESS, "数据导出成功") ;
} catch (Exception e) {
log.error("常规陈列数据导出异常!具体错误原因:", e);
return R.fail(R.FAIL,"数据导出失败,请联系后台管理员处理!");
return R.fail(R.FAIL,e.getMessage());
}
}
......
......@@ -202,17 +202,23 @@ public class NormalDisplayImportStrategyImpl implements IImportApExcelStrategy<S
log.warn("计划主货架类型格式错误,无法提取数字:{}", plannedType);
}
}
if (plannedType.contains("8")){
plannedNum = 8;
}
// 提取实际值中的数字(如“8纵”→8)
String actualType = dto.getActualMainShelfType().trim();
Integer actualNum = null;
if (actualType.endsWith("纵")) {
if (actualType.endsWith("纵") ) {
try {
actualNum = Integer.parseInt(actualType.replace("纵", ""));
} catch (NumberFormatException e) {
log.warn("实际主货架类型格式错误,无法提取数字:{}", actualType);
}
}
if (actualType.contains("8")){
actualNum = 8;
}
// 仅当数字提取成功时,判断“实际≥计划”+数量充足
if (plannedNum != null) {
......
......@@ -466,7 +466,7 @@ public static <T> List<T> readApExcelWithColumnConfig(InputStream inputStream,
throw new IOException("导出Excel失败:没有配置导出列");
}
if (CollectionUtils.isEmpty(dataList)) {
throw new IOException("导出Excel失败:没有获取到相关数据,请检查条件后重试");
throw new IOException("暂无数据,请检查查询条件");
}
if (sheetName == null || sheetName.trim().isEmpty()) {
throw new IOException("导出Excel失败:没有配置sheetName");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论