demand: 月结客户新增、修改、批量修改、批量导入支持新增企业名称/企业税号。月结客户支持根据企业名称/企业税号查询。 月结客户查询返回增加企业名称/企业税号。 运单录入选择月结客户自动关联生成月结客户对应的企业名称/企业税号
committer: heyu
This commit is contained in:
parent
7258e7631c
commit
6a70d5498a
@ -245,15 +245,7 @@ public class EmisCustomerUserController extends EmisBaseController
|
|||||||
try {
|
try {
|
||||||
// 验证企业名称和企业税号
|
// 验证企业名称和企业税号
|
||||||
try {
|
try {
|
||||||
// 验证企业名称格式
|
checkEnterprise(emisCustomerUser);
|
||||||
if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
|
|
||||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证企业税号格式
|
|
||||||
if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
|
|
||||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AjaxResult.error(e.getMessage());
|
return AjaxResult.error(e.getMessage());
|
||||||
}
|
}
|
||||||
@ -286,6 +278,21 @@ public class EmisCustomerUserController extends EmisBaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkEnterprise(EmisCustomerUser emisCustomerUser) throws EmisBizError {
|
||||||
|
if (!"0086".equals(emisCustomerUser.getCountry())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 验证企业名称格式
|
||||||
|
if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证企业税号格式
|
||||||
|
if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
|
||||||
|
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void nameToCode(EmisCustomerUser emisCustomerUser) {
|
private void nameToCode(EmisCustomerUser emisCustomerUser) {
|
||||||
// 国家
|
// 国家
|
||||||
if (!StringUtils.isEmpty(emisCustomerUser.getCountry())) {
|
if (!StringUtils.isEmpty(emisCustomerUser.getCountry())) {
|
||||||
@ -363,14 +370,7 @@ public class EmisCustomerUserController extends EmisBaseController
|
|||||||
// 验证企业名称和企业税号
|
// 验证企业名称和企业税号
|
||||||
try {
|
try {
|
||||||
// 验证企业名称格式
|
// 验证企业名称格式
|
||||||
if (!emisBaseService.validateEnterpriseName(emisCustomerUser.getEnterpriseName())) {
|
checkEnterprise(emisCustomerUser);
|
||||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业名称不能包含空格、回车、@、#、$、%、&、数字等特殊符号");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 验证企业税号格式
|
|
||||||
if (!emisBaseService.validateEnterpriseTaxId(emisCustomerUser.getEnterpriseTaxId())) {
|
|
||||||
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR, "企业税号必须为8-18位数字和大写字母组成,不能包含汉字、空格等特殊符号");
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AjaxResult.error(e.getMessage());
|
return AjaxResult.error(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user