demand: TMS系统 - 客户管理 - 月结客户 - 修改月结客户校验账期必须为整数且必须大于等于7天
committer: heyu
This commit is contained in:
parent
f6245b2a3b
commit
231d6adec8
@ -432,6 +432,18 @@ public class EmisCustomerUserController extends EmisBaseController
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
|
||||
// 校验账期
|
||||
if (emisCustomerUser.getCreditPeriod() != null) {
|
||||
// 检查是否为整数
|
||||
if (emisCustomerUser.getCreditPeriod().scale() > 0) {
|
||||
return AjaxResult.error("账期必须为整数");
|
||||
}
|
||||
// 检查是否大于等于7
|
||||
if (emisCustomerUser.getCreditPeriod().compareTo(new BigDecimal("7")) < 0) {
|
||||
return AjaxResult.error("账期必须大于等于7天");
|
||||
}
|
||||
}
|
||||
EmisCustomerUser oldUser=emisBaseService.getCustomerUserByPhone(emisCustomerUser.getPhone());
|
||||
if(oldUser!=null && !oldUser.getCustomerCode().equals(emisCustomerUser.getCustomerCode())){
|
||||
return AjaxResult.error("该客户电话号码已被占用,请使用新号码");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user