Merge branch 'master' of http://git.xdadan.loc/tanex/emis-service into develop
This commit is contained in:
commit
151a43ed4d
@ -11,6 +11,7 @@
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@ -275,6 +276,18 @@ public class EmisCustomerUserController extends EmisBaseController
|
||||
}
|
||||
}
|
||||
|
||||
// 校验账期
|
||||
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.setCustomerType("2");
|
||||
emisCustomerUser.setSettledType("2");
|
||||
emisCustomerUser.setUserType("2");
|
||||
@ -419,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