Merge branch 'develop' of

http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhouyh2
This commit is contained in:
zhouyahui 2018-06-25 00:45:13 +08:00
commit 0a08efb079
7 changed files with 12 additions and 342 deletions

View File

@ -10,6 +10,6 @@
username="apzl"
password="apzl@2018"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://119.3.11.192:3306/apzl?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=GBK&autoReconnectForPools=true&autoReconnect=true" />
url="jdbc:mysql://localhost:3306/apzl?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=GBK&autoReconnectForPools=true&autoReconnect=true" />
</Context>

View File

@ -1,331 +0,0 @@
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
/*
Author: undefined 2017-09-28
Content:
History Log:
*/
String custtype = CurPage.getParameter("CustomerType");
String projectId = CurPage.getParameter("ProjectId");
// String signStatus = CurPage.getParameter("SignStatus");
String contractNumber = CurPage.getParameter("ContractNumber");
String productId = CurPage.getParameter("ProductId");
String flowunid = CurPage.getParameter("FlowUnid");
String action = CurPage.getParameter("action");
ASObjectModel doTemp = new ASObjectModel("LBContractPrintList");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
dwTemp.setPageSize(20);
String id=projectId;
dwTemp.genHTMLObjectWindow(id+","+flowunid);
String btnflag = "true";
String btnflagcom = "false";
if("01".equals(custtype)){
btnflagcom = "true";
}
if("queryContract".equals(action)){
btnflag = "false";
btnflagcom = "false";
}
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{btnflag,"","Button","发起电子签约","电子签章合同","signOnLine()","","","","btn_icon_sign",""},
{btnflag,"","Button","查询签约结果","查询签约结果","getStatus()","","","","btn_icon_obtain",""},
{btnflag,"","Button","重新发送短信","重新发送短信","sendMessageAgain()","","","","btn_icon_refresh",""},
{btnflagcom,"","Button","下载纸质合同","下载纸质合同","downFile()","","","","btn_icon_down",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<style>
.test>td{
color:red;
}
</style>
<script type="text/javascript">
//测试电子签约
<%-- function signOnLinetest(){
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","signIng","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
} --%>
$(function(){
$("#myiframe0_float_div table").css("width","100%");
$("#myiframe0_cells table").css("width","100%");
})
//完成电子签约
function signOnLine(){
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
var result = results.split("@");
if(eval(result[0])<3){
AsDebug.showMessage("提示","请生成合同,在电子签约","","",true);
return;
};
if(eval(result[0]) > 4 && eval(result[0]) < 7){
AsDebug.showMessage("提示","合同状态为:"+result[1]+"不可以电子签章","","",true,'','','',function(){
reloadSelf();
});
return;
}
if(eval(result[0])==4){
AsDebug.showMessage("提示","电子签约已完成,无需重复发起!","","",true);
return;
};
if(eval(result[0])==8){
AsDebug.showMessage("提示","电子签约已发起,请签署电子合同!","","",true);
return;
};
//查看合同word转换pdf进度
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
if(eval(result)==1){
wordToPdfFalse();
alert("word转换PDF格式部分失败,");
return;
}else if(eval(result)==2){
wordToPdfFalse();
alert("word转换PDF格式失败");
return;
}else if(eval(result)==3){
alert("word转换PDF格式部分失败");
wordToPdfFalse();
return;
}else if(eval(result)==4){
alert("word文件正在转换PDF文件格式");
}else if(eval(result)==5){
wordToPdf();
alert("word文件没有转换PDF文件格式");
return;
}
//自然人电子签约
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","signIng","ProjectId=<%=projectId%>,CurUserID=<%=CurUser.getUserID()%>");
var sReturns = sReturn.split("@");
if("success"==sReturns[0]){
AsDebug.showMessage("提示","电子签约发起成功!","","",true,"","","",function(){
window.location.reload();
});
}else if(sReturns[1].indexOf("用户认证信息与合同签署方信息不匹配")!=-1){
var message="";
if("true"==sReturns[0]){
message = "部分合同发送成功;注意发送失败合同:";
}
AsDebug.showMessage("提示",message+sReturns[1],"","",true,"","","",function(){
window.location.reload();
});
}else{
var message="";
if("true"==sReturns[0]){
message = "部分合同发送成功;注意发送失败合同";
}else{
message = "电子签约发送失败";
}
AsDebug.showMessage("提示",message,"","",true,"","","",function(){
window.location.reload();
});
}
}
//查询电子签约状态
function getStatus(){
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
var result=results.split("@");
if(eval(result[0])<3){
AsDebug.showMessage("提示","请生成合同,在电子签约","","",true);
return;
};
if(eval(result[0])==4){
AsDebug.showMessage("提示","电子签约已完成!","","",true);
return;
}
if(eval(result[0])!=8 && result[2]=="false"){
AsDebug.showMessage("提示","没有发起电子签约,无法获取签约状态!","","",true);
return;
}
var sParams="ProjectId=<%=projectId%>,customerType=<%=custtype%>,CurUserID=<%=CurUser.getUserID()%>";
var sReturn=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","contractSignStatus",sParams);
AsDebug.showMessage("提示",sReturn,"","",true,'','','',function(){
window.location.reload();
});
}
$(function (){
var html="";
if("<%=custtype%>"=="03"){
//(无法完成电子签约,请采用下载纸质合同)
html='<tr id="contractsign" class="test"><td>合同签约操作步骤:<br/>1.制作合同<br/>2.发起电子签约<br/>3.完成电子签约</td></tr>';
}else{
html='<tr id="contractsign" class="test"><td>合同签约操作步骤:<br/>1.制作合同<br/>2.下载纸质合同</td></tr>';
}
$("#ListTable").prepend(html);
$("#myiframe0_static").height($("#myiframe0_static").height()-78);
$("#myiframe0_cells").height($("#myiframe0_cells").height()-78);
// setTimes1();
})
//定时器
function setTimes(){
var a=setInterval(function(){
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
if("success"==result){
clearInterval(a);
AsDebug.showMessage("提示","生成的合同文件转换PDF格式已完成","","",true,"","","",function(){
window.location.reload();
});
}else{
AsDebug.showMessage("提示","生成的合同文件正在转换PDF格式......","","",true,"","","",function(){
window.location.reload();
});
// wordToPdf();
}
},5000);
}
//定时器
function setTimes1(){
var a=setInterval(function(){
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
if("success"==result){
clearInterval(a);
}else{
AsDebug.showMessage("提示","生成的合同文件正在转换PDF格式......","","",true,"","","",function(){
window.location.reload();
});
// wordToPdf();
}
},3000);
}
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
var fileinfo=getObj(0,i,"fileinfo").innerHTML;
var obj=eval('('+fileinfo+')');
var html="";
for(var file in obj){
if(obj[file]['pdf']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showPDF(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
html+='<a onclick="downloadFile(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;';
html+='<font color="blue">'+obj[file]['filename']+'</font></a>';
html+='【操作时间:'+obj[file]['inputtime']+'】';
html+='【操作人:'+obj[file]['inputuser']+'】';
html+='【大小:'+Math.floor(obj[file]['FileSize']/1024*100)/100+'kb】';
html+='</br>';
}
getObj(0,i,"fileinfo").innerHTML=html;
getObj(0,i,"fileinfo").style["white-space"]="pre-wrap";
}
}
function downloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
function downFile(){
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
var result = results.split("@");
if("<%=custtype%>"=="01"){
if(eval(result[0])<3){
AsDebug.showMessage("提示","请生成合同,在下载纸质合同","","",true);
return;
};
//查看合同word转换pdf进度
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","getMakeContractProcess","ProjectId=<%=projectId%>");
if(result=="error"){
AsDebug.showMessage("提示","合同文件正在转换pdf......","","",true,"","","",function(){
window.location.reload();
});
return;
}else{
downloadZipFile();
}
}else{
if(eval(result[0])<3){
AsDebug.showMessage("提示","请生成合同,自然人没有权限下载纸质合同!","","",true);
return;
};
AsDebug.showMessage("提示","自然人没有权限下载纸质合同,请电子签约!","","",true);
}
}
function downloadZipFile(){
var id="<%=projectId%>";
//打包文件名
var fileName="ContractSign<%=contractNumber%>";
//打包类型为合同签约模块
var packageType="contractSign";
var filePath = "<%=CurConfig.getConfigure("FileSavePath")%>";
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/ContractSigndocDownloadServlet?CompClientID=<%=sCompClientID%>&id="+id+"&filePath="+filePath+"&fileName="+fileName+"&packageType="+packageType, "downloadTemplate");
}
function showPDF(id,name){
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
//重新发送短信
function sendMessageAgain(){
var results = RunJavaMethodTrans("com.tenwa.action.channelportal.businesshanding.contractaward.ContractAward","projectStatus","project_id=<%=projectId%>");
var result=results.split("@");
debugger;
if(eval(result[0])<3){
AsDebug.showMessage("提示","请先制作合同!","","",true);
return;
};
if(eval(result[0])==4){
AsDebug.showMessage("提示","电子签约已完成,无法发送短信!","","",true);
return;
}
if(eval(result[0])!=8 && result[2]=="false"){
AsDebug.showMessage("提示","没有发起电子签约,无法发送短信!","","",true);
return;
}
var sReturn = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","sendMessageAgain","ProjectId=<%=projectId%>");
if("success"==sReturn){
AsDebug.showMessage("提示","短信发送成功!","","",true);
}else{
AsDebug.showMessage("提示","短信发送失败!["+sReturn+"]","","",true);
}
}
//当前日期
function getNowFormatDate() {
var date = new Date();
var seperator1 = "-";
var seperator2 = ":";
var month = date.getMonth() + 1;
var strDate = date.getDate();
var strMinutes = date.getMinutes()
var strSeconds = date.getSeconds();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
if (strMinutes >= 0 && strMinutes <= 9) {
strMinutes = "0" + strMinutes;
}
if (strSeconds >= 0 && strSeconds <= 9) {
strSeconds = "0" + strSeconds;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
+ " " + date.getHours() + seperator2 + strMinutes
+ seperator2 + strSeconds;
return currentdate;
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -7,18 +7,18 @@ com.amarsoft.are.log.SimpleLog.handlers=com.amarsoft.are.log.impl.ConsoleHandler
com.amarsoft.are.log.impl.simple.WarnFileHandler.level = error;
com.amarsoft.are.log.impl.simple.WarnFileHandler.pattern = d:/tmp/log/a3web_warn_%g.log
com.amarsoft.are.log.impl.simple.WarnFileHandler.pattern = /tmp/log/a3web_warn_%g.log
com.amarsoft.are.log.impl.simple.WarnFileHandler.limit = 1024000
com.amarsoft.are.log.impl.FileHandler.level = debug
com.amarsoft.are.log.impl.FileHandler.level = info
#com.amarsoft.are.log.impl.FileHandler.pattern = {$ARE.APP_HOME}/log/a3web_%D_%g.log
com.amarsoft.are.log.impl.FileHandler.pattern = d:/tmp/log/a3web_%D_%g.log
com.amarsoft.are.log.impl.FileHandler.pattern = /tmp/log/a3web_%D_%g.log
com.amarsoft.are.log.impl.FileHandler.limit = 10240000
com.amarsoft.are.log.impl.FileHandler.count = 10
com.amarsoft.are.log.impl.FileHandler.append = true
com.amarsoft.are.log.impl.FileHandler.formatter = com.amarsoft.are.log.impl.simple.SimpleFormatter
com.amarsoft.are.log.impl.ConsoleHandler.level = all
com.amarsoft.are.log.impl.ConsoleHandler.level = info

View File

@ -1,12 +1,12 @@
org.quartz.dataSource.zhulhDS.URL=jdbc:mysql://119.3.11.192:3306/apzl?rewriteBatchedStatements=true&useUnicode=true&amp;characterEncoding=GBK&amp;autoReconnect=true
org.quartz.dataSource.zhulhDS.URL=jdbc:mysql://localhost:3306/apzl?rewriteBatchedStatements=true&useUnicode=true&amp;characterEncoding=GBK&amp;autoReconnect=true
#tel6
#org.quartz.dataSource.zhulhDS.user=2sHTLrRv8sRxxaX7RrjfKQ==
#tel6_123
#org.quartz.dataSource.zhulhDS.key=LR8hbgC5Gwc920lYM5vH8g==
#apzl
org.quartz.dataSource.zhulhDS.user=M4pI4TUxX9vC3yTrCAkD1w==
org.quartz.dataSource.zhulhDS.user=338A48E135315FDBC2DF24EB080903D7
#apzl@2018
org.quartz.dataSource.zhulhDS.key=Qx3JdE3vR3ho+XxIQvh6sw==
org.quartz.dataSource.zhulhDS.key=431DC9744DEF477868F97C4842F87AB3
org.quartz.dataSource.zhulhDS.driver=com.mysql.jdbc.Driver
c3p0.minPoolSize=5
c3p0.maxPoolSize=400
@ -24,7 +24,8 @@ c3p0.acquireRetryDelay=1000
c3p0.preferredTestQuery=select 1
org.quartz.scheduler.skipUpdateCheck=true
org.quartz.scheduler.instanceName=QuartzScheduler
#QuartzScheduler
org.quartz.scheduler.instanceName=zhouyh
org.quartz.scheduler.instanceId=AUTO
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount=50

View File

@ -24,7 +24,7 @@ public class WordToPDFUtil {
long start= System.currentTimeMillis();
logger.info("============ת»»pdf¿ªÊ¼============");
try{
String cmd = "D:\\office\\program\\soffice --headless -invisible --convert-to pdf "+srcPath+" --outdir "+desPath;
String cmd = "C:\\Program Files\\LibreOffice 5\\program\\soffice --headless -invisible --convert-to pdf "+srcPath+" --outdir "+desPath;
logger.info("python:"+cmd);
process = Runtime.getRuntime().exec(cmd);
String cmdMsg = "";

View File

@ -146,7 +146,7 @@ public class QuartzJobMsg implements Job{
sn.setAttributeValue("inputuserid", result.getString("proj_manage")!=null?result.getString("proj_manage"):data.getString("userID"));
sn.setAttributeValue("customer_id", result.getString("customer_id"));
//sn.setAttributeValue("phonenumber", phonenumber.toString());
sn.setAttributeValue("phone_number", "13764771906");
//sn.setAttributeValue("phone_number", "13764771906");
sn.setAttributeValue("send_flag", 0);
sn.setAttributeValue("sms_content", resultMsgContent);
sn.setAttributeValue("sms_type", "DELAYED");