业务申请,是否作为共同申请人按钮校验

This commit is contained in:
user 2018-07-01 17:21:46 +08:00
parent 464320f109
commit fa4fd833d9
3 changed files with 62 additions and 4 deletions

View File

@ -26,9 +26,16 @@
var name = getItemValue(0,0,"name");
var certid = getItemValue(0,0,"certid");
var tel = getItemValue(0,0,"tel");
// var suname = getItemValue(0,0,"suname");
// var partner = getItemValue(0,0,"Partner_");
// var partner = getItemValue(0,getRow(0),"Partner_");
var partner = getItemValue(0,getRow(0),"Partner_");
if(partner=="Y"){
var result = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerPartnerCheck","CheckPartnerInfo","flowunid=<%=flowunid%>");
if(result=="1"){
alert("共同申请人已存在!");
return;
}
}
if(name.length > 0){
if(certid.length > 0){
if(CheckLicense(certid)){

View File

@ -0,0 +1,51 @@
package com.tenwa.lease.flow.project.businessapply;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import jbo.app.tenwa.customer.CUSTOMER_FAMILY_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
public class CustomerPartnerCheck {
private String flowunid;
public String CheckPartnerInfo(JBOTransaction tx) throws JBOException{
BizObjectManager bm = JBOFactory.getBizObjectManager(CUSTOMER_FAMILY_TEMP.CLASS_NAME,tx);
List<BizObject> bos = bm.createQuery("flowunid=:flowunid").setParameter("flowunid",this.flowunid).getResultList(false);
if(bos==null){
return "2";
}
Map<String, String> partners = new HashMap<String, String>();
for(BizObject bo:bos){
String partner = bo .getAttribute("Partner_").toString();
partners.put(partner, partner);
}
Set<String> set = partners.keySet();
boolean res = set.contains("Y");
if(res==true){
return "1";
}else{
return "2";
}
}
public String getFlowunid() {
return flowunid;
}
public void setFlowunid(String flowunid) {
this.flowunid = flowunid;
}
}

View File

@ -75,7 +75,7 @@ public class LBProjectIntoTempInitCarBusiness extends BaseBussiness {
bmLEC.setAttributeValue("car_series", this.getAttribute("carSeries"));
bmLEC.setAttributeValue("modelId", this.getAttribute("modelid"));
bmLEC.setAttributeValue("NOW_TOTAL", this.getAttribute("price"));
bmLEC.setAttributeValue("VNDR_NAME", asUser.getUserID());
bmLEC.setAttributeValue("VNDR_NAME", asUser.getUserName());
bmLEC.setAttributeValue("DISPLACEMENT", this.getAttribute("liter"));
bmLEC.setAttributeValue("gears", this.getAttribute("geartype"));