From 83f8094cea7367fd76bafd9cb3face56874db8d8 Mon Sep 17 00:00:00 2001 From: tangfutang <3218982385@qq.com> Date: Thu, 9 Dec 2021 15:40:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BE=E6=AC=BE=E5=90=8E=E7=9D=A3=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E6=A0=A1=E9=AA=8C=E6=94=B9=E5=90=88=E5=90=8C=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=8F=91=E8=B5=B7=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MortgageFile/MortgageFileApplyList.jsp | 5 +++ .../businessapply/MortgageFileApplyCheck.java | 35 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src_tenwa/com/tenwa/lease/flow/project/businessapply/MortgageFileApplyCheck.java 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"; + } + } +}