diff --git a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/MortgageFileApplyList.jsp b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/MortgageFileApplyList.jsp index 6867fdf1a..91b962797 100644 --- a/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/MortgageFileApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/FileManager/MortgageFile/MortgageFileApplyList.jsp @@ -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]; diff --git a/src_tenwa/com/tenwa/lease/flow/project/businessapply/MortgageFileApplyCheck.java b/src_tenwa/com/tenwa/lease/flow/project/businessapply/MortgageFileApplyCheck.java new file mode 100644 index 000000000..d82d72119 --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/project/businessapply/MortgageFileApplyCheck.java @@ -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"; + } + } +}