修改业务申请新增申请页面校验
This commit is contained in:
parent
70d9b5a9ce
commit
bfaf4ac8c6
@ -74,10 +74,11 @@
|
||||
<script type="text/javascript">
|
||||
|
||||
function checkNameAndCertId(){
|
||||
var customerName = getItemValue(0,getRow(),"CustomerName");
|
||||
//var customerName = getItemValue(0,getRow(),"CustomerName");
|
||||
var certId = getItemValue(0,getRow(),"certid");
|
||||
var customerType = getItemValue(0,getRow(),"Customer_type");
|
||||
var sParams = "CustomerName="+customerName+",certId="+certId+",customerType="+customerType;
|
||||
//var sParams = "CustomerName="+customerName+",certId="+certId+",customerType="+customerType;
|
||||
var sParams = "certId="+certId+",customerType="+customerType;
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkNameAndCertId",sParams);
|
||||
return sReturnInfo;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.tenwa.lease.flow.project.businessapply;
|
||||
|
||||
import jbo.app.tenwa.customer.CUSTOMER_CERT;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -12,24 +13,24 @@ import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
|
||||
public class CustomerInfoCheck {
|
||||
|
||||
private String CustomerName;
|
||||
//private String CustomerName;
|
||||
private String certId;
|
||||
private String customerType;
|
||||
private String result;
|
||||
|
||||
public String checkNameAndCertId(JBOTransaction tx) throws JBOException{
|
||||
if(customerType.equals("03")){//×ÔÈ»ÈË
|
||||
BizObject fullname = JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"FULLNAME=:CustomerName").setParameter("CustomerName", this.CustomerName).getSingleResult(false);
|
||||
//BizObject fullname = JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"FULLNAME=:CustomerName").setParameter("CustomerName", this.CustomerName).getSingleResult(false);
|
||||
BizObject cert=JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"CERTID=:certid").setParameter("certid", this.certId).getSingleResult(false);
|
||||
if(fullname==null&&cert==null){
|
||||
if(cert==null){
|
||||
this.result = "1";
|
||||
}else{
|
||||
this.result = "2";
|
||||
}
|
||||
}else if(customerType.equals("01")){//·¨ÈË
|
||||
BizObject enterprisename = JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"FULLNAME=:CustomerName").setParameter("CustomerName", this.CustomerName).getSingleResult(false);
|
||||
BizObject cert=JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"CERTID=:certid").setParameter("certid", this.certId).getSingleResult(false);
|
||||
if(enterprisename==null&&cert==null){
|
||||
//BizObject enterprisename = JBOFactory.createBizObjectQuery(CUSTOMER_PERSON_TEMP.CLASS_NAME,"FULLNAME=:CustomerName").setParameter("CustomerName", this.CustomerName).getSingleResult(false);
|
||||
BizObject cert=JBOFactory.createBizObjectQuery(CUSTOMER_COMPANY_TEMP.CLASS_NAME,"certid=:certid").setParameter("certid", this.certId).getSingleResult(false);
|
||||
if(cert==null){
|
||||
this.result = "1";
|
||||
}else{
|
||||
this.result = "2";
|
||||
@ -54,13 +55,13 @@ public class CustomerInfoCheck {
|
||||
this.customerType = customerType;
|
||||
}
|
||||
|
||||
public String getCustomerName() {
|
||||
return CustomerName;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName) {
|
||||
CustomerName = customerName;
|
||||
}
|
||||
// public String getCustomerName() {
|
||||
// return CustomerName;
|
||||
// }
|
||||
//
|
||||
// public void setCustomerName(String customerName) {
|
||||
// CustomerName = customerName;
|
||||
// }
|
||||
|
||||
public String getCertId() {
|
||||
return certId;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user