diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp index 9ddda435c..4c2a1c8d2 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBContractTemplate/contract_template.jsp @@ -18,6 +18,8 @@ String sFileSaveMode = CurConfig.getConfigure("FileSaveMode"); String sFileSavePath = CurConfig.getConfigure("FileSavePath"); String sFileNameType = CurConfig.getConfigure("FileNameType"); + //获取租赁方式,用于判断生成的合同类型 + String leasform = CurPage.getParameter("leasform"); if(sPrevUrl == null) sPrevUrl = ""; String sTempletNo = "BaseFileTemplateSelect";//--模板号-- @@ -92,7 +94,10 @@ $('#A_Group_0010').css('display','none'); $('#A_Group_0020').css('display','none'); } - initOneClass(); + var sReturn = RunJavaMethodSqlca("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","getContractClass","leasform="+"<%=leasform%>"); + var jsonData=eval("("+sReturn+")"); + initFileTemplate(eval("("+jsonData[0].fileTemplate+")")); +// initOneClass(); }); diff --git a/WebContent/Tenwa/Lease/Flow/Contract/ContractApproval/ContractApprovalApplyList.jsp b/WebContent/Tenwa/Lease/Flow/Contract/ContractApproval/ContractApprovalApplyList.jsp index 9e8a379fe..a2a5814c6 100644 --- a/WebContent/Tenwa/Lease/Flow/Contract/ContractApproval/ContractApprovalApplyList.jsp +++ b/WebContent/Tenwa/Lease/Flow/Contract/ContractApproval/ContractApprovalApplyList.jsp @@ -27,8 +27,9 @@ var project_id = sReturn[2]; var project_name = sReturn[3]; var customertype = sReturn[4]; + var leasform = sReturn[5]; var sParams = "ApplyType=<%=sApplyType%>,CurUserID=<%=CurUser.getUserID()%>"; - sParams =sParams+",ProductId="+product_id+",ProjectId="+id+",ProjectNo="+project_id+",customertype="+customertype+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>"; + sParams =sParams+",leasform="+leasform+",ProductId="+product_id+",ProjectId="+id+",ProjectNo="+project_id+",customertype="+customertype+",ProjectName="+project_name+",ApplyType=<%=sApplyType%>"; var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.contract.contractapproval.ContractApprovalStartAction","initFLow",sParams); if(typeof(sReturnInfo)=="undefined" || sReturnInfo=="" || sReturnInfo=="_CANCEL_") return; diff --git a/WebContent/fileTemplate/鎶垫娂鍚堝悓.docx b/WebContent/fileTemplate/鎶垫娂鍚堝悓.docx index 06b68e924..cbce3b95b 100644 Binary files a/WebContent/fileTemplate/鎶垫娂鍚堝悓.docx and b/WebContent/fileTemplate/鎶垫娂鍚堝悓.docx differ diff --git a/WebContent/fileTemplate/铻嶈祫绉熻祦鍚堝悓-C绔洿绉.docx b/WebContent/fileTemplate/铻嶈祫绉熻祦鍚堝悓-C绔洿绉.docx index 4f1ccb1b4..e4298a254 100644 Binary files a/WebContent/fileTemplate/铻嶈祫绉熻祦鍚堝悓-C绔洿绉.docx and b/WebContent/fileTemplate/铻嶈祫绉熻祦鍚堝悓-C绔洿绉.docx differ diff --git a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java index 2e9ede9a2..a44b2eda7 100644 --- a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java +++ b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java @@ -34,6 +34,7 @@ public class FileTemplateUtil { public String templateParam; //模板参数 public String templateIds;//要生成的合同模板 public String flowunid;//用于查询已经生成的合同 + public String leasform;//用判断租赁方式 public String getTemplateCalss() {return templateCalss;} public void setTemplateCalss(String templateCalss) {this.templateCalss = templateCalss;} @@ -61,6 +62,12 @@ public class FileTemplateUtil { public void setFlowunid(String flowunid) { this.flowunid = flowunid; } + public String getLeasform() { + return leasform; + } + public void setLeasform(String leasform) { + this.leasform = leasform; + } public String getTemplateClass(Transaction Sqlca) throws Exception{ String fileClass=templateCalss.replaceAll("@", ","); ListtempFiles=new ArrayList(); @@ -92,11 +99,24 @@ public class FileTemplateUtil { while (rs.next()){ tempFiles.add("{'text':'"+rs.getString("templatename")+"','value':'"+rs.getString("id")+"'}"); } -// String sReturn="[{'fileTemplate':\""+tempFiles.toString()+"\"}]"; - String sReturn="[{'fileTemplate':\""+"[{'text':'融资租赁合同-C端回租','value':'641c55a1168f4a488a5028ee68870156'}]"+"\"}]"; + String sReturn="[{'fileTemplate':\""+tempFiles.toString()+"\"}]"; +// String sReturn="[{'fileTemplate':\""+"[{'text':'融资租赁合同-C端回租','value':'641c55a1168f4a488a5028ee68870156'}]"+"\"}]"; return sReturn; } + public String getContractClass(Transaction Sqlca){ + if("01".equals(leasform)){ + /*return "[{'fileTemplate':\""+"[{'text':'融资租赁合同-C端直租','value':'24aba365e2794a018814ae81341486bf'}," + + "{'text':'直租个人授权协议书','value':'3334eed6051248b88cd4f2a22e93ac96'},]"+"\"}]";*/ + return "[{'fileTemplate':\""+"[{'text':'融资租赁合同','value':'24aba365e2794a018814ae81341486bf'}]"+"\"}]"; + }else{ + /*return "[{'fileTemplate':\""+"[{'text':'融资租赁合同-C端回租','value':'641c55a1168f4a488a5028ee68870156'}," + + "{'text':'回租个人授权协议书','value':'e980635a77124d5598be1717c062b877'}," + + "{'text':'抵押合同','value':'ec90c114914d4725b57729107888511c'}]"+"\"}]";*/ + return "[{'fileTemplate':\""+"[{'text':'融资租赁合同(售后回租)','value':'641c55a1168f4a488a5028ee68870156'}]"+"\"}]"; + } + } + public String createContractTemplate(JBOTransaction tx) throws Exception{ List message=new ArrayList(); String[] tempids=this.getTemplateIds().split("&"); @@ -156,7 +176,7 @@ public class FileTemplateUtil { 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); for(int i=0;i(); } - list.add(keys.getAttribute("DOCUMENT_ID").toString()); + list.add(keys.getAttribute("DOCUMENT_ID").toString()+"@"+keys.getAttribute("doc_name").toString()); map.put(keys.getAttribute("singcontract_id").toString(), list); } Map resultMap = requestService.Sign(map); diff --git a/src_sys/com/tenwa/flow/action/comm/FlowBussionAction.java b/src_sys/com/tenwa/flow/action/comm/FlowBussionAction.java index 898e2ae0b..2dd426d48 100644 --- a/src_sys/com/tenwa/flow/action/comm/FlowBussionAction.java +++ b/src_sys/com/tenwa/flow/action/comm/FlowBussionAction.java @@ -37,6 +37,7 @@ public class FlowBussionAction extends CommonAction { private String FixedFlowParam; public String customertype; public String custname; + public String leasform; public List FlowMutexConfig; public Map FlowParam = new HashMap(); @@ -229,4 +230,11 @@ public class FlowBussionAction extends CommonAction { public void setCustname(String custname) { this.custname = custname; } + public String getLeasform() { + return leasform; + } + public void setLeasform(String leasform) { + this.leasform = leasform; + } + } diff --git a/src_tenwa/com/tenwa/lease/flow/contract/contractapproval/ContractApprovalStartAction.java b/src_tenwa/com/tenwa/lease/flow/contract/contractapproval/ContractApprovalStartAction.java index d2d743483..3faa6c88f 100644 --- a/src_tenwa/com/tenwa/lease/flow/contract/contractapproval/ContractApprovalStartAction.java +++ b/src_tenwa/com/tenwa/lease/flow/contract/contractapproval/ContractApprovalStartAction.java @@ -66,5 +66,6 @@ public class ContractApprovalStartAction extends BaseFlowStartAction{ this.FlowParam.put("FlowKey", contractno); this.FlowParam.put("customertype", customertype); this.FlowParam.put("IsMakeContract", "yes"); + this.FlowParam.put("leasform", leasform); } }