业务申请校验基本信息
This commit is contained in:
parent
f795078698
commit
7000436b3c
@ -0,0 +1,86 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package com.tenwa.lease.flow.project.commcheck;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.customer.CUSTOMER_COMPANY_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_INFO_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_PERSON_TEMP;
|
||||
|
||||
import org.apache.jasper.tagplugins.jstl.core.When;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
||||
import com.tenwa.template.check.DefaultBussinessCheck;
|
||||
|
||||
/**
|
||||
* 二手车添加校验
|
||||
*
|
||||
*/
|
||||
public class BasicInformationCheck extends DefaultBussinessCheck {
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
StringBuffer Message = new StringBuffer();
|
||||
boolean falg = false;
|
||||
String flowunid=this.getAttribute("ObjectNo").toString();
|
||||
BizObjectManager citManage = JBOFactory.getBizObjectManager(CUSTOMER_INFO_TEMP.CLASS_NAME, Sqlca);
|
||||
BizObjectManager cptManage = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME, Sqlca);
|
||||
BizObjectManager cctManage = JBOFactory.getBizObjectManager(CUSTOMER_COMPANY_TEMP.CLASS_NAME, Sqlca);
|
||||
BizObjectManager cftManage = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME, Sqlca);
|
||||
|
||||
BizObject cit = citManage.createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
|
||||
if(cit!=null){
|
||||
if(cit.getAttribute("customertype").getString().equals("01")){//法人校验
|
||||
BizObject cct = cctManage.createQuery("customerid=:customerid").setParameter("customerid", cit.getAttribute("customerid").getString()).getSingleResult(false);
|
||||
if(cct!=null){
|
||||
if(cct.getAttribute("enterprisename").getString().length()>0){
|
||||
BizObject cft = cftManage.createQuery("flowunid=:flowunid and (Partner_='y' or Partner_='Y') ").setParameter("flowunid", flowunid).getSingleResult(false);
|
||||
if(cft!=null){
|
||||
putMsg("企业信息已填写!!");
|
||||
setPass(true);
|
||||
}else{
|
||||
putMsg("共同申请人信息未填写!!");
|
||||
setPass(false);
|
||||
}
|
||||
}else{
|
||||
putMsg("企业信息未填写!!");
|
||||
setPass(false);
|
||||
}
|
||||
}else{
|
||||
putMsg("企业信息未填写!!");
|
||||
setPass(false);
|
||||
}
|
||||
}else{//校验自然人信息
|
||||
BizObject cpt = cptManage.createQuery("customerid=:customerid ").setParameter("customerid", cit.getAttribute("customerid").getString()).getSingleResult(false);
|
||||
if(cpt!=null){
|
||||
if(cpt.getAttribute("mobile").getString().length()>0){
|
||||
putMsg("个人信息已填写!!");
|
||||
setPass(true);
|
||||
}else{
|
||||
putMsg("个人信息未填写!!");
|
||||
setPass(false);
|
||||
}
|
||||
}else{
|
||||
putMsg("个人信息未填写!!");
|
||||
setPass(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user