更新生成合同模板列表
This commit is contained in:
parent
a6cb500eae
commit
da338e348b
@ -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();
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -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("@", ",");
|
||||
List<String>tempFiles=new ArrayList<String>();
|
||||
@ -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<String> message=new ArrayList<String>();
|
||||
String[] tempids=this.getTemplateIds().split("&");
|
||||
@ -156,7 +176,7 @@ public class FileTemplateUtil {
|
||||
BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME);
|
||||
List<BizObject> ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and flow_unid=:flowunid").setParameter("flowunid", flowunid).getResultList(false);
|
||||
for(int i=0;i<bfids.length;i++){
|
||||
BizObject templatename = btManager.createQuery("select templatename from O where id=:id").setParameter("id", bfids[0]).getSingleResult(false);
|
||||
BizObject templatename = btManager.createQuery("select templatename from O where id=:id").setParameter("id", bfids[i]).getSingleResult(false);
|
||||
for(BizObject ldcl:ldcls){
|
||||
if((templatename.getAttribute("templatename").toString()).equals(ldcl.getAttribute("doc_name").getString())){
|
||||
docName=docName+templatename.getAttribute("templatename").toString()+";";
|
||||
@ -169,5 +189,7 @@ public class FileTemplateUtil {
|
||||
|
||||
return docName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1019,7 +1019,7 @@ public class ContractSignAction{
|
||||
if (list == null) {
|
||||
list = new ArrayList<String>();
|
||||
}
|
||||
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<String, String> resultMap = requestService.Sign(map);
|
||||
|
||||
@ -37,6 +37,7 @@ public class FlowBussionAction extends CommonAction {
|
||||
private String FixedFlowParam;
|
||||
public String customertype;
|
||||
public String custname;
|
||||
public String leasform;
|
||||
|
||||
public List<BizObject> FlowMutexConfig;
|
||||
public Map<String, String> FlowParam = new HashMap<String, String>();
|
||||
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user