diff --git a/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp b/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp
index b14fcfd9d..d0f923ace 100644
--- a/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp
+++ b/WebContent/DealerDeposit/DMarginChargeInfo_Temp.jsp
@@ -13,7 +13,7 @@
dwTemp.Style = "2";//freeform
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
String sButtons[][] = {
- {"true","All","Button","保存","保存所有修改","save()","","","",""},
+ /* {"true","All","Button","保存","保存所有修改","save()","","","",""}, */
{"true","All","Button","返回","返回列表","returnList()","","","",""}
};
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
diff --git a/WebContent/Tenwa/Comm/DocList/PayDocList.jsp b/WebContent/Tenwa/Comm/DocList/PayDocList.jsp
index af19ae58c..1bd50b353 100644
--- a/WebContent/Tenwa/Comm/DocList/PayDocList.jsp
+++ b/WebContent/Tenwa/Comm/DocList/PayDocList.jsp
@@ -83,6 +83,13 @@
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/overDuedunningRecordList.jsp b/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/overDuedunningRecordList.jsp
index 2991ff2ff..8231680ae 100644
--- a/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/overDuedunningRecordList.jsp
+++ b/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/overDuedunningRecordList.jsp
@@ -20,6 +20,13 @@
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
+
+
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/overdueProjectInfo.jsp b/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/overdueProjectInfo.jsp
index 8c39fe779..5c5e66a45 100644
--- a/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/overdueProjectInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/RentCollection/rentcollection/overdueProjectInfo.jsp
@@ -20,12 +20,16 @@
dwTemp.genHTMLObjectWindow(id);
String sButtons[][] = {
- {"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
+ {"true","All","Button","保存","保存所有修改","save()","","","",""},
{"true","All","Button","返回","返回列表","returnList()","","","","btn_icon_return"}
};
sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<%@ include file="/Frame/resources/include/include_end.jspf"%>
\ No newline at end of file
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
index 49c96a114..d2d4a2554 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml
@@ -469,6 +469,8 @@
+
+
@@ -1292,6 +1294,8 @@
+
+
@@ -2254,6 +2258,8 @@
+
+
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
index 80dc60100..52c290784 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_lease.xml
@@ -177,6 +177,8 @@
+
+
@@ -2222,6 +2224,8 @@
+
+
@@ -3037,6 +3041,7 @@
+
@@ -3087,6 +3092,7 @@
+
diff --git a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java
index 9a41900d9..2e9ede9a2 100644
--- a/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java
+++ b/src/com/tenwa/app/baseFileTemplate/handle/FileTemplateUtil.java
@@ -6,11 +6,13 @@ import java.util.List;
import java.util.Map;
import jbo.app.tenwa.doc.LB_DOCRELATIVE;
+import jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST;
import jbo.com.tenwa.entity.comm.officetempalte.BF_TEMPLATE;
import jbo.com.tenwa.lease.comm.LB_CONTRACT_TEMPLATE;
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;
import com.amarsoft.are.util.json.JSONDecoder;
@@ -31,6 +33,7 @@ public class FileTemplateUtil {
public String templateNo;//模板编号
public String templateParam; //模板参数
public String templateIds;//要生成的合同模板
+ public String flowunid;//用于查询已经生成的合同
public String getTemplateCalss() {return templateCalss;}
public void setTemplateCalss(String templateCalss) {this.templateCalss = templateCalss;}
@@ -52,6 +55,12 @@ public class FileTemplateUtil {
public void setTemplateIds(String templateIds) {
this.templateIds = templateIds;
}
+ public String getFlowunid() {
+ return flowunid;
+ }
+ public void setFlowunid(String flowunid) {
+ this.flowunid = flowunid;
+ }
public String getTemplateClass(Transaction Sqlca) throws Exception{
String fileClass=templateCalss.replaceAll("@", ",");
ListtempFiles=new ArrayList();
@@ -139,5 +148,26 @@ public class FileTemplateUtil {
}
return message.toString();
}
+
+ public String jiaoyan(JBOTransaction tx) throws Exception{
+ String docName="";
+ 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);
+ for(int i=0;i0){
+ docName=docName+"已存在,请先删除后再生成!";
+ }
+
+ return docName;
+ }
}
diff --git a/src/com/tenwa/channelportal/action/ContractSignAction.java b/src/com/tenwa/channelportal/action/ContractSignAction.java
index 1fca20089..bc41e681c 100644
--- a/src/com/tenwa/channelportal/action/ContractSignAction.java
+++ b/src/com/tenwa/channelportal/action/ContractSignAction.java
@@ -70,6 +70,8 @@ public class ContractSignAction{
public String flagType;
public HessianProxyFactory factory = new HessianProxyFactory();
public HttpRequestAppService requestService;
+ public String PAYMENT_NUMBER;
+ public String PLAN_LIST;
private static Logger logger=Logger.getLogger(ContractSignAction.class);
@SuppressWarnings("deprecation")
public static String getConfigRequestUrl() throws Exception{
@@ -180,8 +182,20 @@ public class ContractSignAction{
public void setAttrId(String attrId) {
this.attrId = attrId;
}
+
-
+ public String getPAYMENT_NUMBER() {
+ return PAYMENT_NUMBER;
+ }
+ public void setPAYMENT_NUMBER(String pAYMENT_NUMBER) {
+ PAYMENT_NUMBER = pAYMENT_NUMBER;
+ }
+ public String getPLAN_LIST() {
+ return PLAN_LIST;
+ }
+ public void setPLAN_LIST(String pLAN_LIST) {
+ PLAN_LIST = pLAN_LIST;
+ }
/**
* 自然人电子签约
*
@@ -334,10 +348,8 @@ public class ContractSignAction{
public StringBuffer manyPeople() throws JBOException{
//获取担保人信息
StringBuffer info = new StringBuffer();
- BizObjectManager cptm = JBOFactory.getBizObjectManager(CUSTOMER_PERSON_TEMP.CLASS_NAME);
- List cpts = cptm.createQuery("select * from O left join jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP lgu on lgu.ASSUROR=O.CUSTOMERID where "
- + "lgu.flowunid=:FlowUnid AND lgu.DATA_STATE='guarantee' AND "
- + "lgu.flowunid=O.flowUnid").setParameter("FlowUnid", FlowUnid).getResultList(false);
+ BizObjectManager cptm = JBOFactory.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME);
+ List cpts = cptm.createQuery("select * from O where flowunid=:flowUnid").setParameter("flowUnid", FlowUnid).getResultList(false);
for(BizObject cpt:cpts){
String name = cpt.getAttribute("FULLNAME").toString();
String mobile = cpt.getAttribute("mobile").toString();
@@ -1323,6 +1335,62 @@ public void wordToPdfJar(JBOTransaction tx){
e.printStackTrace();
}
}
+
+ /**
+ * 租金通知书附件用LibreOffice实现word转换pdf
+ * word转换pdf
+ * @throws JBOException
+ */
+ @SuppressWarnings({ "unchecked", "static-access" })
+ public String wordToPdfAnnex(JBOTransaction tx) throws JBOException {
+
+ PLAN_LIST=PLAN_LIST.split("\\.")[0];
+ BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME);
+ BizObject DOCRELATIVE=bom.createQuery("plan_number=:plan_number and plan_list=:plan_list").setParameter("plan_number",PAYMENT_NUMBER).setParameter("plan_list", PLAN_LIST).getSingleResult(false);
+ BizObjectManager attrBom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCATTRIBUTE.CLASS_NAME);
+ BizObject attrBo=null;
+ WordToPDFUtil wordTopdf = new WordToPDFUtil();
+ File file = null;
+ Boolean result = null;
+ String sql = "";
+ try {
+ if (DOCRELATIVE != null) {
+
+ String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString();
+ BizObjectManager bom1=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME);
+ String DOCLIBRARYid=bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", DOCRELATIVEid).getSingleResult(false).getAttribute("id").toString();
+ attrBo = attrBom.createQuery("library_id=:library_id").setParameter("library_id", DOCLIBRARYid).getSingleResult(true);
+
+ String path = attrBo.getAttribute("FULLPATH").toString();
+ String lastFilePath = path.replace(".docx", ".pdf");
+ File filePath = new File(path);
+ if(!filePath.exists()){
+ logger.info("word转换pdf的源文件不存在");
+ }
+ String lastFilePathpdf = filePath.getParent();
+ try {
+ result = wordTopdf.Word2Pdf(path, lastFilePathpdf);
+ } catch (Exception e) {
+ result = false;
+ e.printStackTrace();
+ }
+ if (result) {
+ file =new File(lastFilePath);
+ attrBo.setAttributeValue("FULLPATH",attrBo.getAttribute("FULLPATH").toString().replace(".docx", ".pdf"));
+ attrBo.setAttributeValue("FILENAME",attrBo.getAttribute("FILENAME").toString().replace(".docx", ".pdf"));
+ attrBo.setAttributeValue("FILEPATH",attrBo.getAttribute("FILEPATH").toString().replace(".docx", ".pdf"));
+ attrBo.setAttributeValue("FileSize",file.length());
+ attrBo.setAttributeValue("CONTENT_TYPE","application/pdf");
+ attrBom.saveObject(attrBo);
+ }else{
+ }
+ }
+
+ } catch (JBOException e) {
+ e.printStackTrace();
+ }
+ return attrBo.getAttribute("ID").toString();
+ }
/**
* 多线程word转换pdf
* @author tenwa518
@@ -1702,6 +1770,101 @@ public String claimSign(JBOTransaction tx) throws Exception {
}
}
+ public String claimSignA(JBOTransaction tx) throws Exception {
+ requestService = (HttpRequestAppService) factory.create(HttpRequestAppService.class, this.getConfigRequestUrl());
+ String libraryid="";
+ PLAN_LIST=PLAN_LIST.split("\\.")[0];
+ BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCRELATIVE.CLASS_NAME);
+ BizObject DOCRELATIVE=bom.createQuery("plan_number=:plan_number and plan_list=:plan_list").setParameter("plan_number",PAYMENT_NUMBER).setParameter("plan_list", PLAN_LIST).getSingleResult(false);
+ if (DOCRELATIVE != null) {
+ String DOCRELATIVEid=DOCRELATIVE.getAttribute("id").toString();
+ BizObjectManager bom1=JBOFactory.getBizObjectManager(jbo.app.tenwa.doc.LB_DOCLIBRARY.CLASS_NAME);
+ libraryid=bom1.createQuery("relative_id=:relative_id").setParameter("relative_id", DOCRELATIVEid).getSingleResult(false).getAttribute("id").toString();
+ }
+ BizObjectManager contBom = JBOFactory.getBizObjectManager(LB_DOCATTRIBUTE.CLASS_NAME, tx);
+ ContractSignInfo con = null;
+ BizObject bo = null;
+ String contract_id="";
+ try{
+ Map map=new HashMap();
+ bo = contBom.createQuery("library_id=:libraryid").setParameter("libraryid", libraryid).getSingleResult(true);
+ if(bo != null){
+ id = bo.getAttribute("id").toString();
+ con = new ContractSignInfo();
+ con.setFileid(id);
+ con.setFilename(bo.getAttribute("FILENAME").toString());
+ String makefullPath = bo.getAttribute("FULLPATH").toString();
+ File file = new File(makefullPath);
+ if (!file.exists()) {
+ throw new RuntimeException("要读取的文件不存在");
+ }
+ con.setInputfile(BASE64.encodeImgageToBase64(file));
+ map.put(id, con);
+ Map resultMap = null;
+ //调代理的接口
+// doc_name = bo.getAttribute("doc_name").toString();
+// if("租金支付表".equals(doc_name)){
+ //租金支付表
+ resultMap = requestService.createPaymentofHireSign(map);
+// }
+ if (!resultMap.containsKey("error")) {
+ for (String key : resultMap.keySet()) {
+ if (key.indexOf("contract_") == -1) {
+// bo.setAttributeValue("SINGCONTRACT_ID",resultMap.get("contract_" + key));
+// bo.setAttributeValue("DOCUMENT_ID", resultMap.get(key));
+ contract_id = resultMap.get(key);
+ }
+ }
+// bo.setAttributeValue("PROCESS", "5");
+// contBom.saveObject(bo);
+// tx.commit();
+ } else {
+ return "error";
+ }
+ }
+// bo = contBom.createQuery("file_flag='yes' and process='5' and flow_unid='" + FlowUnid + "' and attribute_id= '"+attribute_id+"'").getSingleResult(true);
+ if (bo != null) {
+ Map map1 = new HashMap();
+ map1.put(contract_id, bo.getAttribute("FULLPATH").toString());
+ Map result1 = requestService.downloadDoc(map1);
+ if (!result1.containsKey("error")) {
+ for (String contractId : map1.keySet()) {
+ try {
+ if ("success".equals(result1.get(contractId))) {
+ String fileString = result1.get("file_" + contractId);
+ InputStream fileInput = BASE64.encodeFileToBase64(fileString);
+ OutputStream fileOut = new FileOutputStream(map1.get(contractId));// TODO
+ byte[] buffByte = new byte[1024];
+ int size = 0;
+ while ((size = fileInput.read(buffByte)) != -1) {
+ fileOut.write(buffByte, 0, size);
+ }
+ fileInput.close();
+ fileOut.close();
+ } else if ("error".equals(result1.get(contractId))) {
+ return "error";
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+
+ }
+ }
+// bo.setAttributeValue("PROCESS", "6");
+// contBom.saveObject(bo);
+ } else {
+ return "error";
+ }
+ } else {
+ return "error";
+ }
+
+ return "success";
+ } catch (Exception e) {
+ e.printStackTrace();
+ return "error";
+ }
+ }
+
/***
* 已经生成的合同,作废,
* @param tx
diff --git a/src_core/com/tenwa/comm/util/jboutil/DataOperatorUtil.java b/src_core/com/tenwa/comm/util/jboutil/DataOperatorUtil.java
index 145ba9be4..3ee6855b9 100644
--- a/src_core/com/tenwa/comm/util/jboutil/DataOperatorUtil.java
+++ b/src_core/com/tenwa/comm/util/jboutil/DataOperatorUtil.java
@@ -186,6 +186,8 @@ public class DataOperatorUtil {
if(otherPropertyValue.length()>0){otherPropertyValue+=",";}
if(keysw.contains(key)){
otherPropertyValue+=""+otherProperty.get(key)+"";
+ }else if(otherProperty.get(key).indexOf("lh.")==0){//处理联合主键时 需要复制某个主键 已lh.开头
+ otherPropertyValue+=""+key+"";
}else{
otherPropertyValue+="'"+otherProperty.get(key)+"'";
}}
@@ -501,6 +503,4 @@ public class DataOperatorUtil {
}
return data;
}
-
-
}
diff --git a/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java b/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java
index f4ac6738f..171d858dc 100644
--- a/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java
+++ b/src_prd/com/amarsoft/app/als/prd/manager/ProductManager.java
@@ -430,6 +430,7 @@ public class ProductManager{
otherProperty.clear();
fromCondition.put("PRDID", productID);
otherProperty.put("PRDID", id);
+ otherProperty.put("NODEID","lh.NODEID");
DataOperatorUtil.copyJBOSet(PRD_NODECONFIG.CLASS_NAME, fromCondition, PRD_NODECONFIG.CLASS_NAME, new HashMap(), otherProperty, null, tx);
return "SUCCESS";
}
diff --git a/src_tenwa/com/tenwa/lease/flow/carmanage/CarManageAction.java b/src_tenwa/com/tenwa/lease/flow/carmanage/CarManageAction.java
index 8dc324529..d547c66b7 100644
--- a/src_tenwa/com/tenwa/lease/flow/carmanage/CarManageAction.java
+++ b/src_tenwa/com/tenwa/lease/flow/carmanage/CarManageAction.java
@@ -45,7 +45,7 @@ public class CarManageAction {
}
}
String frame_number=m.get("frame_number"); //车架号
- String contractid=m.get("contract_id"); //合同id
+ String contractid=m.get("ContractId"); //合同id contract_id
String contract_number=m.get("FlowKey"); //业务合同编号
String customerid=m.get("customerid"); //承租人id
String customername=m.get("customername"); //承租人姓名