放款后督发起校验改合同是否发起过

This commit is contained in:
tangfutang 2021-12-09 15:40:14 +08:00
parent 91215c3839
commit 83f8094cea
2 changed files with 40 additions and 0 deletions

View File

@ -22,6 +22,11 @@
return;
}
sReturn = sReturn.split("@");
var message = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.MortgageFileApplyCheck","checkAuthority","contractId="+sReturn[0]);
if(message=='true'){
alert("该合同已发起放款后督流程,无法再次发起!");
return;
}
var contract_id=sReturn[0];
var project_id=sReturn[1];
var product_id=sReturn[2];

View File

@ -0,0 +1,35 @@
package com.tenwa.lease.flow.project.businessapply;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import jbo.com.tenwa.lease.comm.LB_FILE_ARCHIVING_INFO;
/**
* 放款后督流程发起校验该合同是否已发起
* @author Tangfutang
*
*/
public class MortgageFileApplyCheck {
private String contractId;
public String getContractId() {
return contractId;
}
public void setContractId(String contractId) {
this.contractId = contractId;
}
public String checkAuthority(JBOTransaction tx) throws Exception{
BizObjectManager lfabom = JBOFactory.getBizObjectManager(LB_FILE_ARCHIVING_INFO.CLASS_NAME, tx);
BizObject lfa = lfabom.createQuery("contract_id=:contractId").setParameter("contractId", contractId).getSingleResult(false);
if( lfa == null) {
return "false";
}else {
return "true";
}
}
}