liufumingren 58f553586c fix(wms): split_excel 上传拆单接口异常时返回真实原因并加固解析
现象:POST /index/wms/wms/split_excel 返回 {"msg":{}}。
原因:catch(Exception) 里直接 json(["msg"=>\]),Exception 对象序列化为 {};
而 TP5 的 ErrorException 继承 think\Exception,说明 try 内抛的是 PHP
notice/warning(7.4 下 error_reporting 含 E_NOTICE 时全部转异常)。

加固点:
- Excel 行取列改为 (\['E'] ?? '')、B/C/D 同样兜底,避免表格列数不足时
  "Undefined index: E" 中断
- 上传文件为空时返回明确提示(原先是调用 null->validate() 的致命错误)
- unlink 前判断文件存在
- 导出目录不存在时自动创建
- catch 改为 \Throwable,日志记录 message@file:line,响应返回真实错误信息

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-22 21:04:47 +08:00
..
1
2026-09-10 14:16:37 +08:00
2026-08-06 17:04:35 +08:00
2026-08-06 17:04:35 +08:00
2026-08-06 17:04:35 +08:00
2026-08-06 17:04:35 +08:00
2026-08-06 17:04:35 +08:00
2026-08-06 17:04:35 +08:00
2026-08-06 17:04:35 +08:00