校验经销商社会信用代码唯一
This commit is contained in:
parent
e6c2cc3dea
commit
69cf93bbca
@ -66,14 +66,17 @@ $(function(){
|
||||
//组织机构验证码的的校验
|
||||
function Checkfield(){
|
||||
var businessLicenseNo = getItemValue(0,getRow(0),"BUSINESS_LICENSE_NO");
|
||||
if(businessLicenseNo==""){
|
||||
//alert("组织机构代码不能为空!");
|
||||
return true;
|
||||
}
|
||||
if(checkORGRight(businessLicenseNo)){
|
||||
return true;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.customer.controller.group.CustomerGroupCompanyController","checkBusinessLicenseNo","businessLicenseNo="+businessLicenseNo+",id="+getItemValue(0,0,'ID'));
|
||||
if("false" ==sReturnInfo){
|
||||
setErrorTips("BUSINESS_LICENSE_NO","统一社会信用代码已存在!");;
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("BUSINESS_LICENSE_NO","");
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
setErrorTips("BUSINESS_LICENSE_NO","组织机构代码格式不正确!");
|
||||
setErrorTips("BUSINESS_LICENSE_NO","统一社会信用代码格式不正确!");
|
||||
//AsDebug.alert("提示","组织机构代码格式不正确!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ public class CustomerGroupCompanyController {
|
||||
private String OLDITEMNO = "";
|
||||
private String inputUserId = "";
|
||||
private String inputOrgId = "";
|
||||
private String businessLicenseNo = "";
|
||||
|
||||
public String getITEMNO() {
|
||||
return ITEMNO;
|
||||
@ -131,6 +132,15 @@ public class CustomerGroupCompanyController {
|
||||
public void setInputOrgId(String inputOrgId) {
|
||||
this.inputOrgId = inputOrgId;
|
||||
}
|
||||
|
||||
|
||||
public String getBusinessLicenseNo() {
|
||||
return businessLicenseNo;
|
||||
}
|
||||
|
||||
public void setBusinessLicenseNo(String businessLicenseNo) {
|
||||
this.businessLicenseNo = businessLicenseNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
@ -364,4 +374,16 @@ public class CustomerGroupCompanyController {
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
//校验经销商审核社会统一信用代码是否已经存在
|
||||
public String checkBusinessLicenseNo(JBOTransaction tx) throws Exception{
|
||||
List<Map<String, String>> dataBySql = DataOperatorUtil.getDataBySql("select id from distributor_info_temp where id<>'"+id+"' and BUSINESS_LICENSE_NO='"+businessLicenseNo+"' ");
|
||||
if(dataBySql!=null && dataBySql.size() > 0) {
|
||||
return "false";
|
||||
}
|
||||
dataBySql = DataOperatorUtil.getDataBySql("select id from distributor_info where BUSINESS_LICENSE_NO='"+businessLicenseNo+"' ");
|
||||
if(dataBySql!=null && dataBySql.size() > 0) {
|
||||
return "false";
|
||||
}
|
||||
return "true";
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user