Files
tms-erp-api/blade-service
weicw-dshsa c5e5433dc8 🐛 修复运单管理导入未整批回滚
问题:WaybillServiceImpl.importWaybill 虽有 @Transactional,但循环内吞掉
异常后正常 return,Spring 照常提交——失败行之前的正确行已落库。
本票回滚边界比其它板块宽:submit 虽只写运单主表,但 carrierJson 构造、
多个宽容日期解析都在循环内,失败原因需覆盖;关联表写入在 import-batch
链路,不在本票范围。

改动:
- 服务层:错误收集完后抛 ImportFailureException(org.springblade.common.excel)
  触发整批回滚。catch 里原本就把原因写在原行对象上,无需额外处理。
- 控制器:改 catch 异常导出(exportFailureReasonOnly)+ 补上传文件校验。

验证:mvn install -DskipTests 通过;运单管理回归 19/19
(tests/fixtures/waybill-import/manage-excel/,含 02_一行错误多行正确_应零写入)。
既有 import-batch 链路的 *.json 与 excel/ 用例未改动。
2026-09-25 08:20:06 +08:00
..
2026-07-10 22:08:46 +08:00
2026-08-18 15:18:15 +08:00
2026-09-20 16:36:31 +08:00
2026-08-04 02:49:59 +08:00