校验业务申请身份证号不能重复
This commit is contained in:
parent
9e8ddbe048
commit
1a599ad605
@ -24,6 +24,7 @@
|
||||
doTemp.setDefaultValue("project_id", ProjectId);
|
||||
doTemp.setDefaultValue("flowunid", sFlowUnid);
|
||||
doTemp.setHtmlEvent("MOBILE","onChange","checkMobileRepeat");
|
||||
doTemp.setHtmlEvent("CERTID","onChange","checkCertidRepeat");
|
||||
// doTemp.setDefaultValue("DATA_STATE", "guarantee");//标记该数据是担保人信息
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
@ -152,6 +153,9 @@
|
||||
if(WorkTelResult==false){
|
||||
return;
|
||||
}
|
||||
if(!checkCertidRepeat()){
|
||||
return;
|
||||
}
|
||||
as_save(0,"goBack()");
|
||||
}
|
||||
|
||||
@ -162,5 +166,21 @@
|
||||
AsControl.OpenView(url,sparam,"_self","");
|
||||
}
|
||||
|
||||
function checkCertidRepeat(){
|
||||
var certtype = getItemValue(0,getRow(),"CERTTYPE");
|
||||
if("Ind01"==certtype){
|
||||
var id = getItemValue(0,getRow(),"ID");
|
||||
var certId = getItemValue(0,getRow(),"CERTID");
|
||||
var sParams ="id="+id+",certid="+certId+",flowunid=<%=sFlowUnid%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertidRepeat",sParams);
|
||||
if("success"!=sReturnInfo){
|
||||
setErrorTips("CERTID",sReturnInfo);
|
||||
return false;
|
||||
}
|
||||
setErrorTips("CERTID","");
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -9,6 +9,7 @@
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
String customerType = CurPage.getParameter("CustomerType");
|
||||
String ProjectId = CurPage.getParameter("ProjectId");
|
||||
String flowunid = CurPage.getParameter("FlowUnid");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "CustomerFamilyJoinTempInfo";//--模板号--
|
||||
@ -196,6 +197,9 @@
|
||||
if(!checkSex()){
|
||||
return;
|
||||
}
|
||||
if(!checkCertidRepeat()){
|
||||
return;
|
||||
}
|
||||
/*var ID = getItemValue(0,getRow(0),'ID');
|
||||
if("undefined"==ID||""==ID || null==ID){
|
||||
AsDebug.showMessage("提示","请选中一条数据!","","",true);
|
||||
@ -238,6 +242,20 @@
|
||||
}else{
|
||||
setItemValue(0,getRow(),"SEX","1");
|
||||
}
|
||||
checkCertidRepeat();
|
||||
}
|
||||
|
||||
function checkCertidRepeat(){
|
||||
var id = getItemValue(0,getRow(),"ID");
|
||||
var certId = getItemValue(0,getRow(),"CERTID");
|
||||
var sParams ="id="+id+",certid="+certId+",flowunid=<%=flowunid%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertidRepeat",sParams);
|
||||
if("success"!=sReturnInfo){
|
||||
setErrorTips("CERTID",sReturnInfo);
|
||||
return false;
|
||||
}
|
||||
setErrorTips("CERTID","");
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -233,6 +233,9 @@
|
||||
if(!checkSex()){
|
||||
return;
|
||||
}
|
||||
if(!checkCertidRepeat()){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(name.length > 0){
|
||||
@ -315,6 +318,20 @@
|
||||
}else{
|
||||
setItemValue(0,getRow(),"SEX","1");
|
||||
}
|
||||
checkCertidRepeat();
|
||||
}
|
||||
|
||||
function checkCertidRepeat(){
|
||||
var id = getItemValue(0,getRow(),"ID");
|
||||
var certId = getItemValue(0,getRow(),"CERTID");
|
||||
var sParams ="id="+id+",certid="+certId+",flowunid=<%=flowunid%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertidRepeat",sParams);
|
||||
if("success"!=sReturnInfo){
|
||||
setErrorTips("CERTID",sReturnInfo);
|
||||
return false;
|
||||
}
|
||||
setErrorTips("CERTID","");
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -1,6 +1,7 @@
|
||||
package com.tenwa.flow.comm.handler;
|
||||
|
||||
import jbo.app.tenwa.customer.CUSTOMER_ADDRESS_TEMP;
|
||||
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
|
||||
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -35,6 +36,7 @@ public class BusinessCustomerInfoHandler extends CommonHandler {
|
||||
throws Exception {
|
||||
BizObjectManager bomCAT= JBOFactory.getBizObjectManager(CUSTOMER_ADDRESS_TEMP.CLASS_NAME, tx);
|
||||
BizObjectManager bomLULT= JBOFactory.getBizObjectManager(LB_UNION_LESSEE_TEMP.CLASS_NAME, tx);
|
||||
BizObjectManager cftManage = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME, tx);
|
||||
BizObject boCAT=bomCAT.createQuery("customerid=:customerid and flowunid='"+bo.getAttribute("FLOWUNID").getString()+"'").setParameter("customerid", bo.getAttribute("customerid").getString()).getSingleResult(true);
|
||||
BizObject boLULT=bomLULT.createQuery("customer_id=:customerid and flowunid='"+bo.getAttribute("FLOWUNID").getString()+"'").setParameter("customerid", bo.getAttribute("customerid").getString()).getSingleResult(true);
|
||||
boLULT.setAttributeValue("customer_name", bo.getAttribute("fullname"));
|
||||
@ -54,5 +56,11 @@ public class BusinessCustomerInfoHandler extends CommonHandler {
|
||||
boCAT.setAttributeValue("zipcode", bo.getAttribute("zipcode"));
|
||||
boCAT.setAttributeValue("fulladdress", bo.getAttribute("fulladdress"));
|
||||
bomCAT.saveObject(boCAT);
|
||||
if(!("01".equals(bo.getAttribute("MARRIAGE").getString()))){
|
||||
BizObject cft = cftManage.createQuery("flowunid=:flowunid and Spouse_='Y'").setParameter("flowunid", bo.getAttribute("flowunid").getString()).getSingleResult(true);
|
||||
if(cft!=null){
|
||||
cftManage.deleteObject(cft);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@ public class CustomerInfoCheck {
|
||||
private String custname;
|
||||
private String certtype;
|
||||
private String certid;
|
||||
private String id;
|
||||
|
||||
public String getCerttype() {
|
||||
return certtype;
|
||||
@ -201,7 +202,39 @@ public class CustomerInfoCheck {
|
||||
}
|
||||
return CustomerId;
|
||||
}
|
||||
|
||||
//检车身份证号是否重复
|
||||
public String checkCertidRepeat(JBOTransaction tx) throws Exception{
|
||||
BizObjectManager cptManage = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME, tx);
|
||||
BizObjectManager cftManage = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME, tx);
|
||||
BizObjectManager lgutManage = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME, tx);
|
||||
|
||||
BizObject cpt = cptManage.createQuery("flowunid=:flowunid and CERTID=:certid").setParameter("flowunid", flowunid).setParameter("certid",certid).getSingleResult(false);
|
||||
if(cpt!=null){
|
||||
return "该身份证已跟承租人身份证重复";
|
||||
}
|
||||
BizObject cft = cftManage.createQuery("flowunid=:flowunid and CERTID=:certid").setParameter("flowunid", flowunid).setParameter("certid",certid).getSingleResult(false);
|
||||
if(cft!=null){
|
||||
if(cft.getAttribute("ID").getString().equals(id)){
|
||||
return "success";
|
||||
}else if("Y".equals(cft.getAttribute("Spouse_").getString())){
|
||||
BizObject cptP = cptManage.createQuery("flowunid=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
|
||||
if(cptP.getAttribute("MARRIAGE").getString().equals("01")){
|
||||
return "该身份证已跟配偶身份证重复";
|
||||
}
|
||||
}else{
|
||||
return "该身份证已跟共同申请人身份证重复";
|
||||
}
|
||||
}
|
||||
BizObject lug = lgutManage.createQuery("flowunid=:flowunid and CERTID=:certid and CERTTYPE='Ind01' ").setParameter("flowunid", flowunid).setParameter("certid",certid).getSingleResult(false);
|
||||
if(lug!=null){
|
||||
if(lug.getAttribute("ID").getString().equals(id)){
|
||||
return "success";
|
||||
}else{
|
||||
return "该身份证已跟担保人身份证重复";
|
||||
}
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
|
||||
public String getFlowunid() {
|
||||
return flowunid;
|
||||
@ -274,5 +307,12 @@ public class CustomerInfoCheck {
|
||||
public void setMobileResult(String mobileResult) {
|
||||
this.mobileResult = mobileResult;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user