From 8f30235944f0607b46efbed6d6b53880e6153963 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Wed, 17 Oct 2018 16:13:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E5=88=B6=E4=BD=9C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E8=BF=9B=E8=A1=8C=E7=AD=BE=E7=BA=A6=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=85=81=E8=AE=B8=E5=8F=91=E8=B5=B7=E5=90=88?= =?UTF-8?q?=E5=90=8C=E5=88=B6=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LoanSimulation_old/LoanBasicInfo.jsp | 5 +++ .../contract/check/ContractInfoCheck.java | 45 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src_tenwa/com/tenwa/lease/flow/contract/check/ContractInfoCheck.java diff --git a/WebContent/Accounting/LoanSimulation_old/LoanBasicInfo.jsp b/WebContent/Accounting/LoanSimulation_old/LoanBasicInfo.jsp index 3f7fa595c..10a630965 100644 --- a/WebContent/Accounting/LoanSimulation_old/LoanBasicInfo.jsp +++ b/WebContent/Accounting/LoanSimulation_old/LoanBasicInfo.jsp @@ -8,6 +8,11 @@ <% String sTempletNo = "LoanSimulationBasicInfo_old";//--模板号-- + String applytype=CurPage.getParameter("ApplyType"); + //如果是汽车的提请结清用汽车的模板 + if("ContractTerminateApply".equals(applytype)){ + sTempletNo = "LoanSimulationBasicInfo_old_Car";//--模板号-- + } ASObjectModel doTemp = new ASObjectModel(sTempletNo); String flowunid = CurPage.getParameter("FlowUnid"); String plannumber=CurPage.getParameter("plannumber"); diff --git a/src_tenwa/com/tenwa/lease/flow/contract/check/ContractInfoCheck.java b/src_tenwa/com/tenwa/lease/flow/contract/check/ContractInfoCheck.java new file mode 100644 index 000000000..8ec9c451f --- /dev/null +++ b/src_tenwa/com/tenwa/lease/flow/contract/check/ContractInfoCheck.java @@ -0,0 +1,45 @@ +package com.tenwa.lease.flow.contract.check; + +import java.util.List; + +import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT; + +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 ContractInfoCheck { + + private String contractid; + private String projectid; + + public String getContractid() { + return contractid; + } + public void setContractid(String contractid) { + this.contractid = contractid; + } + public String getProjectid() { + return projectid; + } + public void setProjectid(String projectid) { + this.projectid = projectid; + } + + //检查该项目是否进行过签约验证 + public String ProjectSignStatus(JBOTransaction tx) throws Exception{ + BizObjectManager caManage = JBOFactory.getBizObjectManager(CUSTOMER_ACCOUNT.CLASS_NAME, tx); + String acc_number = caManage.createQuery("PROJECT_ID=:projectid").setParameter("projectid", projectid).getSingleResult(false).getAttribute("acc_number").getString(); + List cas = caManage.createQuery("acc_number=:accnumber").setParameter("accnumber", acc_number).getResultList(false); + String falg = "error"; + for (BizObject ca : cas) { + if("Y".equals(ca.getAttribute("SIGN_STATUS").getString())){ + return "success"; + } + } + return falg; + } + +}