This commit is contained in:
zhouyahui 2018-07-11 11:13:48 +08:00
commit b285b63f93
22 changed files with 532 additions and 30 deletions

View File

@ -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"%>

View File

@ -83,6 +83,13 @@
<script type="text/javascript">
window.onload=function(){
var RowCount = getRowCount(0);
for(var i=0;i<RowCount;i++){
if($("#INPUT_myiframe0_Doc_Nature_"+i+"_2").text()=="±Ø±¸"){
$("#INPUT_myiframe0_Doc_Nature_"+i+"_2").attr("style","color:red");
}
}
heping();
$("#DWTD").width( document.body.offsetWidth - 10);
$("#DWTD").width( document.body.offsetHeight - 20);
@ -107,7 +114,7 @@ function selectFile(){
AsControl.OpenTab("/Tenwa/Comm/Document/LBDocumentList.jsp","ObjectNo=20170427000001",objectinfo);
}
function saveRecord(){
as_save("myiframe0","heping()");
as_save("myiframe0","heping()");
}
//在加载完表格后调用
function afterSearch(){
@ -184,7 +191,8 @@ function upload(id){
var sUrl="/Tenwa/Comm/DocList/DocListInfo.jsp";
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
var str=RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","updateBussinessCheck","library_id="+id+",BussinessCheck=DocCheck_0");
reloadSelf();
// reloadSelf();
location.reload();
heping();
},"上传附件");
}

View File

@ -5,7 +5,7 @@
function newApply()
{
var userid="<%=CurUser.getUserID()%>";
AsDialog.OpenSelector("SelectCarReclaim","userid,"+userid,"dialogWidth=" + parseInt(window.screen.width * 0.5) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
AsDialog.OpenSelector("SelectCarReclaim","userid,"+userid,"dialogWidth=" + parseInt(window.screen.width * 0.6) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"||sReturn=="_NONE_"){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;

View File

@ -198,11 +198,16 @@
alert("请勾选合同模板!");
return;
}
var message = RunJavaMethodTrans("com.tenwa.app.baseFileTemplate.handle.FileTemplateUtil","jiaoyan","templateIds="+tempids+",flowunid="+"<%=flowunid%>");
if(""!=message){
alert(message);
location.reload();
return;
}
var param={};
var tempParam={};
var sparam="";
// param["templateNo"]="0010";
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
tempParam["OBJECTTYPE"]="<%=CurPage.getParameter("FLOW_NO")%>";

View File

@ -33,6 +33,7 @@
<%
String sFlowUnid = CurPage.getParameter("FlowUnid");//Á÷³Ì±àºÅ
String projectId = CurPage.getParameter("ProjectId");
String ApplyType = CurPage.getParameter("ApplyType");
BizObject boLPI= JBOFactory.createBizObjectQuery(LB_PROJECT_INFO.CLASS_NAME,"ID='"+projectId+"'").getSingleResult(false);
//String carType=boLPI.getAttribute("CAR_TYPE").toString();
String carType="new_car";
@ -124,18 +125,27 @@
if(framNum != "0" && checkFrameNumber()==false){
return;
}
debugger;
var ApplyType = "<%=ApplyType%>";
if(plate_number!=null&&plate_number!=""){
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.BusinessApproveManager","saveAreaCode","flowunid="+sFlowUnid+",plate_number="+plate_number);
if(sResult=="SUCCESS"){
if(ApplyType=="BContractApproveApply"){
as_save("myiframe0","");
//as_save(0,"goBack()");
return;
}else{
alert("请填写正确的车牌号码!");
var sResult = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.BusinessApproveManager","saveAreaCode","flowunid="+sFlowUnid+",plate_number="+plate_number);
if(sResult=="SUCCESS"){
as_save("myiframe0","");
//as_save(0,"goBack()");
}else{
alert("请填写正确的车牌号码!");
}
}
}else{
as_save("myiframe0","");
//as_save(0,"goBack()");
as_save("myiframe0","");
//as_save(0,"goBack()");
}
}

View File

@ -150,8 +150,56 @@
_user_validator[0]['messages']['FOUROPINION']['required0'] = "ÇëÊäÈëÉóÅúÒâ¼û";
break;
}
var certResult = checkCertId();
if(certResult=="4"){
//$("#FULLNAME").attr("style","color:red;");
$("#CERTID").css("color","red");
}
var firstchoice = getItemValue(0,0,"firstchoice");
if(firstchoice==""){
setItemRequired(0,"InterOpinion1",false);
setItemRequired(0,"DistriOpinion1",false);
$("#FIRSTOPINION").removeAttr("disabled");
}
if(firstchoice=="0010"){
setItemRequired(0,"A_div_1220",true);
setItemRequired(0,"InterOpinion1",false);
setItemRequired(0,"DistriOpinion1",true);
$("#FIRSTOPINION").removeAttr("disabled");
var obj=document.getElementById('FIRSTOPINION');
for(var i=0;i<7;i++){
obj.options[i].style.display = "block";
}
obj.options[7].style.display = "none";
}
if(firstchoice=="0020"){
setItemRequired(0,"InterOpinion1",true);
setItemRequired(0,"DistriOpinion1",false);
$("#FIRSTOPINION").removeAttr("disabled");
var obj=document.getElementById('FIRSTOPINION');
for(var i=0;i<7;i++){
obj.options[i].style.display = "none";
}
obj.options[7].style.display = "block";
}
if(firstchoice=="0030"){
setItemRequired(0,"InterOpinion1",false);
setItemRequired(0,"DistriOpinion1",true);
setItemValue(0,0,"firstopinion","");
$("#FIRSTOPINION").attr("disabled","disabled");
}
})
function checkCertId(){//УÑéÖ¤¼þºÅ
var customerType = "03";
//var customerName = getItemValue(0,getRow(),"CustomerName");
var certId = getItemValue(0,getRow(),"CERTID");
//var sParams = "CustomerName="+customerName+",certId="+certId+",customerType="+customerType;
var sParams = "certId="+certId+",customerType="+customerType;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertId",sParams);
return sReturnInfo;
}
function changeFirstChoice(){
setItemValue(0,0,"firstopinion","");
var firstchoice = getItemValue(0,0,"firstchoice");

View File

@ -40,6 +40,40 @@
//sButtonPosition = "south";
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
function checkCertId(){
var certId = getItemValue(0,getRow(0),"certid");
if(certId==""){
//setErrorTips("certId","证件号不能为空!");
alert("证件号不能为空!");
return false;
}
if(CheckLicense(certId)){
return true;
}else{
//setErrorTips("certId","身份证格式不正确!");
alert("身份证格式不正确!");
return false;
}
}
function checkTel(){
var tel = getItemValue(0,getRow(0),"tel");
if(tel==""){
//setErrorTips("mobile","手机号不能为空!");
alert("手机号不能为空!");
return false;
}
if(CheckPhoneCode(tel)){
return true;
}else{
//setErrorTips("mobile","手机号格式不正确!");
alert("手机号格式不正确!");
return false;
}
}
function newRecord(){
var name = getItemValue(0,0,"name");
var certid = getItemValue(0,0,"certid");
@ -69,6 +103,14 @@
}
}
function viewAndEdit(){
var CertIdResult = checkCertId();
if(CertIdResult==false){
return;
}
var TelResult = checkTel();
if(TelResult==false){
return;
}
// var ID = getItemValue(0,getRow(0),'ID');
// if("undefined"==ID||""==ID || null==ID){
// AsDebug.showMessage("提示","请选中一条数据!","","",true);

View File

@ -29,8 +29,36 @@
}else{
changeFamilyRequiredFalse();
}
var remarkResult = checkTel();
if(remarkResult=="6"){
//$("#FULLNAME").attr("style","color:red;");
$("#TEL").css("color","red");
}
var certResult = checkCertId();
if(certResult=="4"){
//$("#FULLNAME").attr("style","color:red;");
$("#CERTID").css("color","red");
}
});
function checkCertId(){//校验配偶证件号
var customerType = "03";
//var customerName = getItemValue(0,getRow(),"CustomerName");
var certId = getItemValue(0,getRow(),"certid");
//var sParams = "CustomerName="+customerName+",certId="+certId+",customerType="+customerType;
var sParams = "certId="+certId+",customerType="+customerType;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkCertId",sParams);
return sReturnInfo;
}
function checkTel(){//校验配偶手机号
var customerType = "03";
var tel = getItemValue(0,getRow(),"tel");
var sParams = "mobile="+tel+",customerType="+customerType;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobile",sParams);
return sReturnInfo;
}
function changeFamilyRequiredTrue(){
setItemRequired(0,"name",true);
setItemRequired(0,"certid",true);

View File

@ -93,7 +93,7 @@
setItemValue(0,0,"CERTTYPE","Ind01");
}
function checkName(){
function checkName(){//校验姓名
var customerType = "03";
var customerName = getItemValue(0,getRow(),"FULLNAME");
//var certId = getItemValue(0,getRow(),"certid");
@ -103,7 +103,7 @@
return sReturnInfo;
}
function checkCertId(){
function checkCertId(){//校验证件号
var customerType = "03";
//var customerName = getItemValue(0,getRow(),"CustomerName");
var certId = getItemValue(0,getRow(),"CERTID");
@ -113,7 +113,7 @@
return sReturnInfo;
}
function checkMobile(){
function checkMobile(){//校验手机号
var customerType = "03";
var mobile = getItemValue(0,getRow(),"mobile");
var sParams = "mobile="+mobile+",customerType="+customerType;
@ -121,6 +121,22 @@
return sReturnInfo;
}
function checkEmergencyContactTel(){//校验紧急联系人1电话
var customerType = "03";
var emergencyTel = getItemValue(0,getRow(),"EMERGENCY_CONTACT_TEL");
var sParams = "mobile="+emergencyTel+",customerType="+customerType;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobile",sParams);
return sReturnInfo;
}
function checkRemark(){//校验紧急联系人2电话
var customerType = "03";
var remark = getItemValue(0,getRow(),"REMARK");
var sParams = "mobile="+remark+",customerType="+customerType;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkMobile",sParams);
return sReturnInfo;
}
$(document).ready(function(){
// var nameResult = checkName();
@ -138,6 +154,16 @@
//$("#FULLNAME").attr("style","color:red;");
$("#MOBILE").css("color","red");
}
var EmergencyResult = checkEmergencyContactTel();
if(EmergencyResult=="6"){
//$("#FULLNAME").attr("style","color:red;");
$("#EMERGENCY_CONTACT_TEL").css("color","red");
}
var remarkResult = checkRemark();
if(remarkResult=="6"){
//$("#FULLNAME").attr("style","color:red;");
$("#REMARK").css("color","red");
}
if("0020"!="<%=sPhaseNo%>"){
$("#ButtonTR").attr("style","display:none;");

View File

@ -40,6 +40,8 @@
String sTempletNo = "BusnessApprovalApplyCreationInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setHtmlEvent("Customer_type", "onchange", "setCertType");
doTemp.setHtmlEvent("carAttributes", "onchange", "changeProductName");
doTemp.setHtmlEvent("leasehold", "onchange", "changeProductName");
//doTemp.setHtmlEvent("CustomerName", "onchange", "checkNameAndCertId");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
@ -73,6 +75,10 @@
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件-;]~*/%>
<script type="text/javascript">
function changeProductName(){
setItemValue(0,getRow(0),"productName","");
}
function checkNameAndCertId(){
//var customerName = getItemValue(0,getRow(),"CustomerName");
var certId = getItemValue(0,getRow(),"certid");

View File

@ -23,12 +23,16 @@
dwTemp.genHTMLObjectWindow(CurPage.getParameter("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"%>
<script type="text/javascript">
function save(){
//as_save(0);
as_save("myiframe0","returnList()");
}
function returnList(){
AsControl.OpenView("/Tenwa/Lease/Flow/RentCollection/rentcollection/overdueDunningDirectivesList.jsp", "","_self","");
}

View File

@ -53,7 +53,8 @@
setItemValue(0,0,"over_date",over_date);
setItemValue(0,0,"over_rent",over_rent);
setItemValue(0,0,"over_penalty",over_penalty);
as_save(0);
//as_save(0);
as_save("myiframe0","returnList()");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -20,6 +20,13 @@
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<iframe name="MyAtt" src="<%=com.amarsoft.awe.util.Escape.getBlankJsp(sWebRootPath,"正在下载附件,请稍候...")%>" style="background-color: blue" width=100% height=100% frameborder=0 hspace=0 vspace=0 marginwidth=0 marginheight=0 scrolling="no">
</iframe>
<form name=form1 method=post action="<%=sWebRootPath%>/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>" target=MyAtt>
<div style="display:none">
<input id="sqlString" name=sqlString value="">
</div>
</form>
<script type="text/javascript">
function newRecord(){
var custid="<%=CurPage.getParameter("cust_id")%>";
@ -36,5 +43,87 @@
}
AsControl.OpenView(sUrl,'id=' +sPara+'&cust_id='+custid ,'_self','');
}
//在加载完表格后调用
function afterSearch(){
for(var i=0;i<getRowCount(0);i++){
getObj(0,i,"operation").innerHTML='<a class="box" onclick="upload(\''+getItemValue(0,i,"id")+'\')" style={color:#000;text-decoration:underline;}><font color="blue">上传</font></a>';
var filelist=getObj(0,i,"filelist").innerHTML;
var obj=eval('('+filelist+')');
var html="";
for(var file in obj){
//if(isReview!="true"&&sRightType!="ReadOnly"&&(sObjectType==obj[file]['objecttype'])&&username.replace(/\s+/g,"&nbsp;")==obj[file]['inputuser']){
// html+='<a class="btn_icon btn_icon_close" onclick="deleteFile(\''+obj[file]['id']+'\');">&nbsp;</a>';
//}
if(obj[file]['image']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showImage(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
if(obj[file]['word']=="true"){
html+='<a class="btn_icon btn_icon_search" onclick="showWord(\''+obj[file]['id']+'\',\''+obj[file]['filename']+'\');">&nbsp;</a>';
}
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']+'\')><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,"filelist").innerHTML=html;
getObj(0,i,"filelist").style["white-space"]="pre-wrap";
var height = getObj(0,i,"filelist").offsetHeight+1;
setItemStyle(0,i,"CONTRACT_NUMBER","height="+height+"px");
};
}
function upload(id){
var param="Library_id="+id;
var sUrl="/Tenwa/Comm/DocList/PlateAttachmentUpload.jsp";
AsDialog.PopView(sUrl,param,"dialogWidth=450px;dialogHeight=400px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
reloadSelf();
heping();
},"上传附件");
}
function heping(){
$("#TR_Right_myiframe0_0").attr("class","color_zebra0");
huanhang("Doc_Name");
}
function huanhang(col){
var tab=document.getElementById("myiframe0");
var a= getColIndex(0,col);
for(var i=0;i<tab.rows.length-1;i++){
$("#INPUT_myiframe0_"+col+"_"+i+"_"+a).parent().attr("style","white-space: pre-wrap;");
}
}
function showPDF(id,name){
var sUrl="/Tenwa/Comm/DocList/showPDF.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showWord(id,name){
var sUrl="/Tenwa/Comm/DocList/showWord.jsp";
var param="attrid="+id;
AsControl.OpenPage(sUrl,param,"","");
}
function showImage(id,name){
var sUrl="/Tenwa/Comm/DocList/showImage.jsp";
var param="attrid="+id;
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;",function(message){
},name);
}
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 deleteFile(id){
var sParams="attId="+id;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","deleteAttr",sParams);
reloadSelf();
heping();
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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"%>
<script type="text/javascript">
function save(){
//as_save(0);
as_save("myiframe0","returnList()");
}
function returnList(){
AsControl.OpenView("/Tenwa/Lease/Flow/RentCollection/rentcollection/overdueProjectList.jsp", "","_self","");
}

View File

@ -27,6 +27,7 @@
sButtons=new String[][]{
{"true","All","Button","生成租金通知书","生成租金通知书","generateQuotation()","","","","btn_icon_generate"},
{"true","All","Button","批量下载","批量下载","lotdown()","","","","btn_icon_down"},
{"true","All","Button","公司盖章","公司盖章","stamp()","","","",""},
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
@ -49,8 +50,11 @@
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 generateQuotation()
{
function generateQuotation(){
/* var paymentnumber=getItemValue(0,getRow(0),"PAYMENT_NUMBER");
var planlist=getItemValue(0,getRow(0),"PLAN_LIST");
alert(sss);
return; */
var PAYMENT_NUMBERS=getItemValueArray(0,"PAYMENT_NUMBER");
var PLAN_LISTS=getItemValueArray(0,"PLAN_LIST");
if(typeof(PAYMENT_NUMBERS)=="undefined"||PAYMENT_NUMBERS==null||PAYMENT_NUMBERS==""){alert("请选择");return;}
@ -86,9 +90,8 @@
var plan_list=PLAN_LISTS[i];//期次
var deleteresult=RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentNotinyDeleteAction","deletequtation","plan_number="+plan_number+",plan_list="+plan_list);
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
//word转pdf
var id = RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","wordToPdfAnnex","PAYMENT_NUMBER="+plan_number+",PLAN_LIST="+plan_list);
}
alert("生成成功!");
reloadSelf();
@ -109,5 +112,27 @@
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/DownloadZipServlet?CompClientID=<%=sCompClientID%>&id="+id, "downloadTemplate");
}
function stamp(){
var flie = getItemValue(0,getRow(0),"FILENAME");
if(typeof(flie)=="undefined"||flie==null||flie==""){
alert("请先生成租金通知书!");
return;
}
var PAYMENT_NUMBERS=getItemValueArray(0,"PAYMENT_NUMBER");
var PLAN_LISTS=getItemValueArray(0,"PLAN_LIST");
for(var i=0;i<PAYMENT_NUMBERS.length;i++){
var plan_number=PAYMENT_NUMBERS[i];//投放编号
var plan_list=PLAN_LISTS[i];//期次
var result=RunJavaMethodTrans("com.tenwa.channelportal.action.ContractSignAction","claimSignA","PAYMENT_NUMBER="+plan_number+",PLAN_LIST="+plan_list);
if("success"==result){
alert("盖章成功!!!");
location.reload();
}else{
alert("盖章失败!!!");
}
}
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -469,6 +469,8 @@
<attribute name="BATCH_NO" label="批量交易流水号" type="STRING" length="200"/>
<attribute name="BATCH_STATUS" label="批量处理状态" type="STRING" length="200"/>
<attribute name="BATCH_SN" label="一笔批量交易流水内项数SN" type="STRING" length="200"/>
<attribute name="FAILURE_TIME" label="失败时间" type="STRING" length="200"/>
<attribute name="FAILURE_REASON" label="失败原因" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>
@ -1292,6 +1294,8 @@
<attribute name="BATCH_NO" label="批量交易流水号" type="STRING" length="200"/>
<attribute name="BATCH_STATUS" label="批量处理状态" type="STRING" length="200"/>
<attribute name="BATCH_SN" label="一笔批量交易流水内项数SN" type="STRING" length="200"/>
<attribute name="FAILURE_TIME" label="失败时间" type="STRING" length="200"/>
<attribute name="FAILURE_REASON" label="失败原因" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>
@ -2254,6 +2258,8 @@
<attribute name="BATCH_NO" label="批量交易流水号" type="STRING" length="200"/>
<attribute name="BATCH_STATUS" label="批量处理状态" type="STRING" length="200"/>
<attribute name="BATCH_SN" label="一笔批量交易流水内项数SN" type="STRING" length="200"/>
<attribute name="FAILURE_TIME" label="失败时间" type="STRING" length="200"/>
<attribute name="FAILURE_REASON" label="失败原因" type="STRING" length="200"/>
</attributes>
<manager>
<managerProperties>

View File

@ -177,6 +177,8 @@
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="UUID" label="关联libraryid" type="STRING" length="32"/>
<attribute name="is_charge" label="是否收费" type="STRING" length="32"/>
<attribute name="charge_money" label="停车费" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -2222,6 +2224,8 @@
<attribute name="BATCH_STATUS" label="批量代收处理状态" type="STRING"/>
<attribute name="BATCH_NO" label="批量交易流水号" type="STRING"/>
<attribute name="BATCH_SN" label="一笔批量交易流水内项数SN" type="STRING"/>
<attribute name="FAILURE_TIME" label="失败时间" type="STRING"/>
<attribute name="FAILURE_REASON" label="失败原因" type="STRING"/>
</attributes>
<manager>
<managerProperties>
@ -3037,6 +3041,7 @@
<attribute name="INPUTTIME" label="创建时间" type="STRING" length="32"/>
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="reclaim_type" label="收车类型" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
@ -3087,6 +3092,7 @@
<attribute name="UPDATEUSERID" label="修改人" type="STRING" length="32"/>
<attribute name="UPDATETIME" label="修改时间" type="STRING" length="32"/>
<attribute name="FLOWUNID" label="流程标识" type="STRING" length="32"/>
<attribute name="reclaim_type" label="收车类型" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>

View File

@ -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("@", ",");
List<String>tempFiles=new ArrayList<String>();
@ -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<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);
for(BizObject ldcl:ldcls){
if((templatename.getAttribute("templatename").toString()).equals(ldcl.getAttribute("doc_name").getString())){
docName=docName+templatename.getAttribute("templatename").toString()+";";
}
}
}
if(docName.length()>0){
docName=docName+"已存在,请先删除后再生成!";
}
return docName;
}
}

View File

@ -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<BizObject> 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<BizObject> 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<String,ContractSignInfo> map=new HashMap<String,ContractSignInfo>();
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<String, String> 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<String, String> map1 = new HashMap<String, String>();
map1.put(contract_id, bo.getAttribute("FULLPATH").toString());
Map<String, String> 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

View File

@ -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;
}
}

View File

@ -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<String,String>(), otherProperty, null, tx);
return "SUCCESS";
}

View File

@ -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"); //承租人姓名