demand: TMS系统 - 运单批量录入 - 运单号含有特殊符号 不允许导入保存成功
committer: heyu
This commit is contained in:
parent
f51ddc3cf5
commit
b62afa654a
@ -484,11 +484,16 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
public int draftSubmitOrder(EmisWaybill emisWaybillSave) throws EmisBizError {
|
public int draftSubmitOrder(EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||||
|
|
||||||
// 如果没有单号就生成单号,如果有单号需要判断是否重复
|
// 如果没有单号就生成单号,如果有单号需要判断是否重复
|
||||||
if( !StringUtils.isEmpty(emisWaybillSave.getBillCode()) ) {
|
if (!StringUtils.isEmpty(emisWaybillSave.getBillCode())) {
|
||||||
|
|
||||||
String billCode=WaybillHelper.formatQueryValue(emisWaybillSave.getBillCode());
|
String billCode = WaybillHelper.formatQueryValue(emisWaybillSave.getBillCode());
|
||||||
emisWaybillSave.setBillCode(billCode);
|
emisWaybillSave.setBillCode(billCode);
|
||||||
|
|
||||||
|
// 校验运单号不能包含特殊字符
|
||||||
|
if (billCode.matches(".*[^a-zA-Z0-9\\-].*")) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "运单号不能包含特殊字符");
|
||||||
|
}
|
||||||
|
|
||||||
boolean isExists = this.checkWaybillIsExists(emisWaybillSave.getBillCode());
|
boolean isExists = this.checkWaybillIsExists(emisWaybillSave.getBillCode());
|
||||||
if (isExists) {
|
if (isExists) {
|
||||||
throw new EmisBizError(EmisBizErrorType.EXISTS, "运单号重复");
|
throw new EmisBizError(EmisBizErrorType.EXISTS, "运单号重复");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user