From 142d30590716c616c8697da7c34911c963c494e8 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Sun, 5 Aug 2018 15:34:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=88=E5=90=8C=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E5=90=8E=E5=90=88=E5=90=8C=E5=88=97=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Comm/LBContractTemplate/contract_template.jsp | 6 +++++- .../Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp | 2 +- .../baseFileTemplate/handle/FileTemplateUtil.java | 13 +++++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp index 8870468c3..2e08809b7 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp @@ -237,8 +237,12 @@ alert("请勾选合同模板!"); return; } - var message = RunJavaMethodTrans("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","CheckCar","templateIds="+tempids+",flowunid="+"<%=flowunid%>"); + var message = RunJavaMethodTrans("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","CheckCar","contractId="+"<%=sContractId%>"+",templateIds="+tempids+",flowunid="+"<%=flowunid%>"); if(""!=message){ + if("01"=="<%=customertype%>"){ + alert("合同已生成,无法再次生成!"); + return; + } alert(message); location.reload(); return; diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp index 203096190..70906dc0b 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp @@ -22,7 +22,7 @@ //doTemp.setHtmlEvent("MOBILE", "onchange", "checkMobile"); ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); dwTemp.Style = "2";//freeform - if(PhaseNo.equals("0020")||PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){ + if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){ dwTemp.ReadOnly = "-2";//只读模式 } if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ diff --git a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java index 7e680bc40..fca4f9180 100644 --- a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java +++ b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java @@ -36,6 +36,7 @@ public class FileTemplateUtil { public String templateIds;//要生成的合同模板 public String flowunid;//用于查询已经生成的合同 public String leasform;//用判断租赁方式 + public String contractId; public String getTemplateCalss() {return templateCalss;} public void setTemplateCalss(String templateCalss) {this.templateCalss = templateCalss;} @@ -69,6 +70,13 @@ public class FileTemplateUtil { public void setLeasform(String leasform) { this.leasform = leasform; } + public String getContractId() { + return contractId; + } + public void setContractId(String contractId) { + this.contractId = contractId; + } + public String getTemplateClass(Transaction Sqlca) throws Exception{ String fileClass=templateCalss.replaceAll("@", ","); ListtempFiles=new ArrayList(); @@ -167,6 +175,7 @@ public class FileTemplateUtil { } } } + tx.commit(); return message.toString(); } @@ -193,7 +202,7 @@ public class FileTemplateUtil { String[] bfids = templateIds.split("&"); BizObjectManager btManager = JBOFactory.getBizObjectManager(BF_TEMPLATE.CLASS_NAME); BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); - List ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and flow_unid=:flowunid").setParameter("flowunid", flowunid).getResultList(false); + List ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and ( flow_unid=:flowunid or contract_id=:contractid ) ").setParameter("flowunid", flowunid).setParameter("contractid", contractId).getResultList(false); for(int i=0;i0){ docName=docName+"已存在,请先删除后再生成!"; } - + tx.commit(); return docName; }