电子签约校验

This commit is contained in:
tangfutang 2018-08-15 15:17:12 +08:00
parent c797f27c97
commit f67f5dc161
4 changed files with 58 additions and 2 deletions

View File

@ -106,8 +106,8 @@
var workTel = getItemValue(0,getRow(0),"WORKTEL");
if(workTel==""){
//setErrorTips("WORKTEL","单位电话不能为空!");
alert("单位电话不能为空!");
return false;
// alert("单位电话不能为空!");
return true;
}
if(CheckPhoneCode(workTel)){
return true;

View File

@ -0,0 +1,56 @@
/**
*
*/
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_INFO;
import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST;
import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.awe.util.Transaction;
import com.tenwa.template.check.DefaultBussinessCheck;
/**
* 校验是否电子签约
*
*/
public class MakingContractCarCheck extends DefaultBussinessCheck {
@Override
public Object run(Transaction Sqlca) throws Exception {
StringBuffer Message = new StringBuffer();
Message.append("未填写:");
String flowunid=this.getAttribute("ObjectNo").toString();
BizObjectManager lultMange = JBOFactory.getBizObjectManager(LB_UNION_LESSEE_TEMP.CLASS_NAME, Sqlca);
BizObject lul = lultMange.createQuery("FLOWUNID=:flowunid").setParameter("flowunid", flowunid).getSingleResult(false);
BizObjectManager ciMange = JBOFactory.getBizObjectManager(CUSTOMER_INFO.CLASS_NAME, Sqlca);
BizObject ci = ciMange.createQuery("customerid=:customerid").setParameter("customerid", lul.getAttribute("CUSTOMER_ID").getString()).getSingleResult(false);
BizObjectManager ldclMange = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME, Sqlca);
BizObject ldcl = ldclMange.createQuery("flow_unid=:flowunid and file_flag='yes'").setParameter("FLOWUNID", flowunid).getSingleResult(false);
if(ldcl!=null){
if("03".equals(ci.getAttribute("CUSTOMERTYPE").getString())){
if("4".equals(ldcl.getAttribute("PROCESS").getString())){
putMsg("已完成电子签约!");
setPass(true);
}else{
putMsg("请先完成电子签约!");
setPass(false);
}
}else{
putMsg("已完成!");
setPass(true);
}
}else{
putMsg("请先制作合同!");
setPass(false);
}
return null;
}
}