fix(oms): 入库模板导入优化异常提示信息

This commit is contained in:
rcx
2026-08-25 17:51:54 +08:00
parent c5a2508a36
commit 7a5e124f98
@@ -605,16 +605,14 @@ public class ReservationStockInOrderImpl extends ServiceImpl<ReservationStockInO
private void validateTemplateOrderNo(String orderNo) {
// R + 6位年月日 + 至少3位数字序号
if (!orderNo.matches("R\\d{9,}")) {
throw new ServiceException("入库业务单号格式不正确:" + orderNo
+ ",请按照[代码R+年月日+当日累加]规则填写单号,正确格式为R+年月日+3位序号,如R260717001");
throw new ServiceException("入库业务单号格式不正确:正确格式为R+年月日+3位序号,如R260717001");
}
try {
SimpleDateFormat fmt = new SimpleDateFormat("yyMMdd");
fmt.setLenient(false);
fmt.parse(orderNo.substring(1, 7));
} catch (java.text.ParseException e) {
throw new ServiceException("入库业务单号格式不正确:" + orderNo
+ ",请按照[代码R+年月日+当日累加]规则填写单号,单号中的年月日无效,正确格式为R+年月日+3位序号,如R260717001");
throw new ServiceException("入库业务单号格式不正确:正确格式为R+年月日+3位序号,如R260717001");
}
}