feat(oms):入库导入模板饮用日期解析修复,入库单列表联查带出饮用有效日期

1. 入库/执行入库Excel解析监听器:扩充日期格式支持(yyyy年M月d日、d/M/yyyy、M/d/yyyy、dd.MM.yyyy等16种),
   改为严格解析防止宽松解析产生公元1~99年脏数据,新增Excel日期序列号兜底及年份合理性校验,
   解析失败抛出带行号的明确提示而非静默置空
2. parse-excel接口异常时返回具体错误信息(原为空body 500)
3. 入库单列表queryList联查明细表取最早饮用日期(MIN drink_date),PO及resultMap补drinkDate映射
This commit is contained in:
rcx
2026-08-25 15:07:04 +08:00
parent 83f4cce451
commit 735cf9af9f
5 changed files with 105 additions and 15 deletions
@@ -251,11 +251,17 @@ public class ReservationStockInOrderApi extends BaseController {
} catch (IllegalArgumentException e) {
// 参数错误(如文件为空)
// LOGGER.error("Excel解析参数错误:{}", e.getMessage());
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
Map<String, Object> result = new HashMap<>();
result.put("code", 400);
result.put("msg", e.getMessage());
return new ResponseEntity<>(result, HttpStatus.BAD_REQUEST);
} catch (Exception e) {
// 其他解析异常
// 其他解析异常(如日期格式无法识别),返回具体原因便于用户修正文件
// LOGGER.error("Excel解析失败:{}", e.getMessage(), e);
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
Map<String, Object> result = new HashMap<>();
result.put("code", 500);
result.put("msg", e.getMessage());
return new ResponseEntity<>(result, HttpStatus.INTERNAL_SERVER_ERROR);
}
}