Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhangbb
This commit is contained in:
commit
b6cf0c13a8
@ -7,5 +7,5 @@
|
||||
<updateXml>true</updateXml>
|
||||
<warLocation></warLocation>
|
||||
<extraInfo></extraInfo>
|
||||
<webPath>/apzl_leasing</webPath>
|
||||
<webPath>/apzl</webPath>
|
||||
</tomcatProjectProperties>
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
String orgid=CurUser.getOrgID();
|
||||
String userid=CurUser.getUserID();
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%
|
||||
String orgid=CurUser.getOrgID();
|
||||
String userid=CurUser.getUserID();
|
||||
ASObjectModel doTemp = new ASObjectModel("LB_CAR_LICENSE_PLATE_LIST");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1";
|
||||
@ -10,14 +11,35 @@ String userid=CurUser.getUserID();
|
||||
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","",""},
|
||||
/* {"true","All","Button","新增","新增","newRecord()","","","",""}, */
|
||||
{"true","All","Button","修改","修改","edit()","","","",""},
|
||||
{"true","All","Button","删除","删除","do_delete()","","","","btn_icon_delete"},
|
||||
{"true","All","Button","牌照管理导入","牌照管理导入","importExcel()","","","","btn_icon_import"}
|
||||
{"true","All","Button","导入Excel","导入Excel","importExcel()","","","","btn_icon_import"},
|
||||
{"true","","Button","牌照模版下载","牌照模版下载","LicensePlateDownload()","","","","btn_icon_down",""},
|
||||
};
|
||||
%><%@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">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
|
||||
function LicensePlateDownload(){
|
||||
var sId="4c559680c16242c497816604aedce292";
|
||||
if (typeof(sId)=="undefined" || sId.length==0){
|
||||
return;
|
||||
}else{
|
||||
$("#sqlString").val("save@"+sId);
|
||||
form1.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function newRecord(){
|
||||
AsDialog.OpenSelector("SelectContractCarPhoto","","dialogWidth=" + parseInt(window.screen.width * 0.8) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
|
||||
@ -76,9 +98,11 @@ String userid=CurUser.getUserID();
|
||||
function edit(){
|
||||
var sUrl = "/Tenwa/ChannelPortal/BusinessHanding/CarPhoto/LBCarPhotoDocumentInfo.jsp";
|
||||
// AsControl.OpenView(sUrl,'','_self','');
|
||||
|
||||
var id=getItemValue(0, getRow(0), "contract_id");
|
||||
var car_id=getItemValue(0, getRow(0), "car_id");
|
||||
var cparam="contract_id="+id+"&car_id="+car_id;
|
||||
//var car_id=getItemValue(0, getRow(0), "car_id");
|
||||
//var cparam="contract_id="+id+"&car_id="+car_id;
|
||||
var cparam="contract_id="+id;
|
||||
AsDialog.PopView(sUrl,cparam,"dialogWidth=800px;dialogHeight=480px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(){
|
||||
reloadSelf();
|
||||
},"修改车牌号");
|
||||
@ -95,7 +119,7 @@ String userid=CurUser.getUserID();
|
||||
{width:"350px",height:"40px",title:"上传牌照管理数据"},function(){reloadSelf();});
|
||||
}
|
||||
|
||||
function exportExcel(){
|
||||
<%-- function exportExcel(){
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
@ -123,7 +147,7 @@ String userid=CurUser.getUserID();
|
||||
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
|
||||
downloadFile(attributeID);
|
||||
}else{
|
||||
alert("导出失败!");
|
||||
alert("导出失败!");sr
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,6 +155,6 @@ String userid=CurUser.getUserID();
|
||||
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
|
||||
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
|
||||
}
|
||||
|
||||
--%>
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -5,12 +5,15 @@
|
||||
//获得组件参数
|
||||
String sObjectType=CurPage.getParameter("ObjectType");//
|
||||
String contract_id=CurPage.getParameter("contract_id");
|
||||
String car_id=CurPage.getParameter("car_id");
|
||||
|
||||
//String contract_id=CurPage.getParameter("contract_id");
|
||||
//String car_id=CurPage.getParameter("car_id");
|
||||
ASObjectModel doTemp = new ASObjectModel("LB_CAR_LICENSE_PLATE_INFO");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="2"; // 设置DW风格 1:Grid 2:Freeform
|
||||
dwTemp.ReadOnly = "0"; // 设置是否只读 1:只读 0:可写
|
||||
dwTemp.genHTMLObjectWindow(car_id);
|
||||
//dwTemp.genHTMLObjectWindow(car_id);
|
||||
dwTemp.genHTMLObjectWindow(contract_id);
|
||||
String[][] sButtons=null;
|
||||
sButtons=new String[][]{
|
||||
{"true","","Button","保存","保存所有修改","importRecord()","","","",""},
|
||||
@ -18,7 +21,7 @@
|
||||
%><%@include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#FILE2").attr("type","file");debugger;
|
||||
$("#FILE2").attr("type","file");
|
||||
$("#FILE3").attr("type","file");
|
||||
$("#myiframe0").attr("enctype","multipart/form-data");
|
||||
var params={};
|
||||
@ -47,12 +50,18 @@
|
||||
}
|
||||
}
|
||||
function saveRecord(){
|
||||
var car_id="<%=car_id%>";
|
||||
<%-- var car_id="<%=car_id%>"; --%>
|
||||
var contract_id="<%=contract_id%>";
|
||||
var plate_number=getItemValue(0,getRow(0),"plate_number");
|
||||
var platetime=getItemValue(0,getRow(0),"platetime");
|
||||
var car_unit=getItemValue(0,getRow(0),"car_unit");
|
||||
var car_location=getItemValue(0,getRow(0),"car_location");
|
||||
var param="id="+car_id+",plate_number="+plate_number+",platetime="+platetime+",car_unit="+car_unit+",car_location="+car_location;
|
||||
var frame_number=getItemValue(0,getRow(0),"frame_number");
|
||||
var plate_status=getItemValue(0,getRow(0),"plate_status");
|
||||
|
||||
/* var car_unit=getItemValue(0,getRow(0),"car_unit"); */
|
||||
/* var car_location=getItemValue(0,getRow(0),"car_location"); */
|
||||
var param="id="+contract_id+",plate_number="+plate_number+",platetime="+platetime+",frame_number="+frame_number+",plate_status="+plate_status;
|
||||
//var param="id="+contract_id+",plate_number="+plate_number+",platetime="+platetime+",car_unit="+car_unit+",car_location="+car_location;
|
||||
|
||||
RunJavaMethodTrans("com.tenwa.channelmanage.SaveCarPhoto", "SaveCarPhoto", param);
|
||||
}
|
||||
//提交
|
||||
|
||||
@ -11,12 +11,33 @@
|
||||
{"true","All","Button","新增","新增","newRecord()","","","",""},
|
||||
{"true","All","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit"},
|
||||
{"true","","Button","删除","删除","do_delete()","","","","btn_icon_delete"},
|
||||
{"true","","Button","GPSµ¼Èë","GPSµ¼Èë","importExcel()","","","","btn_icon_import"}
|
||||
{"true","","Button","导入Excel","导入Excel","importExcel()","","","","btn_icon_import"},
|
||||
{"true","","Button","GPS模版下载","GPS模版下载","GPSDownload()","","","","btn_icon_down",""},
|
||||
};
|
||||
%><%@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">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
|
||||
function GPSDownload(){
|
||||
var sId="52b5c3fc03ec47709f6a972b9d5d5d7a";
|
||||
if (typeof(sId)=="undefined" || sId.length==0){
|
||||
return;
|
||||
}else{
|
||||
$("#sqlString").val("save@"+sId);
|
||||
form1.submit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Gps/GpsRegister/GpsRegister.jsp";
|
||||
AsDialog.PopView(sUrl,"","resizable=yes;dialogWidth=700px;dialogHeight=330px;center:yes;status:no;statusbar:no",function(){
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-04
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/App/Interface/VehicleEvaluation/LBEquipmentCarTempList.jsp";
|
||||
|
||||
String sTempletNo = "LBEquipmentCarTempInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setColTips("", "测试");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -0,0 +1,50 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-04
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("LBEquipmentCarTempList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
|
||||
{"true","","Button","估值","估值"," vehicleAppraisement()","","","","btn_icon_check",""}
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function vehicleAppraisement(){
|
||||
var id = getItemValue(0,getRow(0),'ID');
|
||||
console.log(id);
|
||||
var result = RunJavaMethodTrans("com.tenwa.lease.app.vehicleAssessment.vehicleAssessmentController","vehicleAppraisement","id="+id);
|
||||
if('SUCCESS' == result){
|
||||
alert('评估成功,数据已写入数据库中');
|
||||
}else if('0' == result){
|
||||
alert(result);
|
||||
}else{
|
||||
alert('评估失败');
|
||||
}
|
||||
}
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Lease/App/Interface/VehicleEvaluation/LBEquipmentCarTempInfo.jsp";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/App/Interface/VehicleEvaluation/LBEquipmentCarTempInfo.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -1,30 +1,30 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-03
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "LbEquipmentCarInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setColTips("", "测试");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-04
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "LbEquipmentCarInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setColTips("", "测试");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -1,37 +1,37 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-03
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("LbEquipmentCarList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Lease/App/Interface/VehicleEvaluation/LbEquipmentCarInfo.jsp";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/App/Interface/VehicleEvaluation/LbEquipmentCarInfo.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-04
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
ASObjectModel doTemp = new ASObjectModel("LbEquipmentCarList");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Lease/App/Interface/VehicleEvaluation/LbEquipmentCarInfo.jsp";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "/Tenwa/Lease/App/Interface/VehicleEvaluation/LbEquipmentCarInfo.jsp";
|
||||
var sPara = getItemValue(0,getRow(0),'ID');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'ID=' +sPara ,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -46,8 +46,8 @@
|
||||
{"false","","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
|
||||
{"false","","Button","修改","修改","viewAndEdit()","","","","btn_icon_edit",""},
|
||||
{"true","","Button","删除","删除","deletecontract()","","","","btn_icon_delete",""},
|
||||
{"true","","Button","生成合同","删除","createContractByTemplate()","","","","btn_icon_up",""},
|
||||
{"true","","Button","上传","新增文档信息","uploadContract()","","","","btn_icon_up",""}
|
||||
//{"true","","Button","生成合同","删除","createContractByTemplate()","","","","btn_icon_up",""},
|
||||
//{"true","","Button","上传","新增文档信息","uploadContract()","","","","btn_icon_up",""}
|
||||
};
|
||||
}
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
|
||||
@ -0,0 +1,86 @@
|
||||
<%@page import="java.net.URLDecoder"%>
|
||||
<%@page import="com.amarsoft.are.jbo.impl.BizObjectTableMapper"%>
|
||||
<%@page import="com.amarsoft.awe.util.DBKeyHelp"%>
|
||||
<%@page import="com.amarsoft.awe.common.attachment.*"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/IncludeBegin.jsp"%><%
|
||||
AmarsoftUpload myAmarsoftUpload = new AmarsoftUpload();
|
||||
myAmarsoftUpload.initialize(pageContext);
|
||||
myAmarsoftUpload.upload();
|
||||
String FileSizejs=(String)myAmarsoftUpload.getRequest().getParameter("FileSize2");
|
||||
String docType=(String)myAmarsoftUpload.getRequest().getParameter("DOC_TYPE");
|
||||
String oneClassfiy=(String)myAmarsoftUpload.getRequest().getParameter("ONE_CLASSIFY");
|
||||
String twoClassfiy=(String)myAmarsoftUpload.getRequest().getParameter("TWO_CLASSIFY");
|
||||
String objectType=(String)myAmarsoftUpload.getRequest().getParameter("OBJECTTYPE");
|
||||
// String sFileName =URLDecoder.decode((String)myAmarsoftUpload.getRequest().getParameter("FILENAMEX"),"UTF-8"); //文件名称
|
||||
String sFileName = myAmarsoftUpload.getFiles().getFile(0).getFileName();
|
||||
// System.out.println("文件名==="+ URLDecoder.decode((String)myAmarsoftUpload.getRequest().getParameter("FILENAMEX"),"UTF-8"));
|
||||
// String Remark=URLDecoder.decode((String)myAmarsoftUpload.getRequest().getParameter("REMARK2"),"UTF-8"); //备注InputTime
|
||||
String Remark= (String)myAmarsoftUpload.getRequest().getParameter("REMARK"); //备注InputTime
|
||||
String libraryId= (String)myAmarsoftUpload.getRequest().getParameter("ID"); //附件编号
|
||||
String InputTime= StringFunction.getTodayNow(); //附件编号上传时间
|
||||
|
||||
BizObjectManager libBm=JBOFactory.getBizObjectManager("jbo.app.tenwa.doc.LB_DOCLIBRARY");
|
||||
BizObjectManager attrBm=JBOFactory.getBizObjectManager("jbo.app.tenwa.doc.LB_DOCATTRIBUTE");
|
||||
BizObject lib=libBm.createQuery("id=:id").setParameter("id", libraryId).getSingleResult(true);
|
||||
// lib.setAttributeValue("Remark", Remark);
|
||||
// libBm.saveObject(lib);
|
||||
BizObject attr=attrBm.newObject();
|
||||
attr.setAttributeValue("Library_Id", libraryId);
|
||||
attr.setAttributeValue("FileName", sFileName);
|
||||
attr.setAttributeValue("InputUserId", CurUser.getUserID());
|
||||
attr.setAttributeValue("InputOrgId", CurUser.getOrgID());
|
||||
attr.setAttributeValue("InputTime",InputTime);
|
||||
attr.setAttributeValue("objectType", objectType);
|
||||
|
||||
//得到不带路径的文件名
|
||||
sFileName = StringFunction.getFileName(sFileName);
|
||||
sFileName = URLDecoder.decode(URLDecoder.decode(sFileName,"UTF-8"),"UTF-8");
|
||||
//定义数据库操作变量
|
||||
SqlObject so = null;
|
||||
String sNewSql = "";
|
||||
String sFileSaveMode = CurConfig.getConfigure("FileSaveMode");
|
||||
String sFileSavePath = CurConfig.getConfigure("FileSavePath");
|
||||
String sFileNameType = CurConfig.getConfigure("FileNameType");
|
||||
|
||||
String trueTable = ((BizObjectTableMapper)attrBm).getTable(); //取得真实的表名
|
||||
String sAttachmentNo = DBKeyHelp.getSerialNo(trueTable,"Id");
|
||||
|
||||
if (!myAmarsoftUpload.getFiles().getFile(0).isMissing()){
|
||||
try {
|
||||
//System.out.println("sDocNo="+libraryId+"--sAttachmentNo="+sAttachmentNo+"--sFileName="+sFileName+"--sFileSavePath="+sFileSavePath);
|
||||
//System.out.println("sFileNameType="+sFileNameType+"--application="+application);
|
||||
//String sFullPath = com.amarsoft.awe.common.attachment.FileNameHelper.getFullPath(libraryId, sAttachmentNo,sFileName, sFileSavePath, sFileNameType, application);
|
||||
String uuid=java.util.UUID.randomUUID().toString().replaceAll("-", "");
|
||||
String sFullPath =com.tenwa.officetempalte.util.FileOperatorUtil.getuploadFileDir(sFileSavePath) +uuid+"_"+sFileName;
|
||||
// if(myAmarsoftUpload.getFiles().getFile(0).getSize()!=Integer.parseInt(FileSizejs)){
|
||||
// throw new Exception("上传文件失败,请联系管理员!");
|
||||
// }
|
||||
myAmarsoftUpload.getFiles().getFile(0).saveAs(sFullPath);
|
||||
//得到带相对路径的文件名
|
||||
String sFilePath = sFullPath.replace(sFileSavePath, "");
|
||||
attr.setAttributeValue("FilePath",sFilePath);
|
||||
attr.setAttributeValue("FullPath",sFullPath);
|
||||
attr.setAttributeValue("Content_Type",DataConvert.toString(myAmarsoftUpload.getFiles().getFile(0).getContentType()));
|
||||
attr.setAttributeValue("FileSize",DataConvert.toString(String.valueOf(myAmarsoftUpload.getFiles().getFile(0).getSize())));
|
||||
attrBm.saveObject(attr);
|
||||
myAmarsoftUpload = null;
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
out.println("An error occurs : " + e.toString());
|
||||
attrBm.deleteObject(attr);
|
||||
myAmarsoftUpload = null;
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
alert("上传失败");//上传文件失败!
|
||||
parent.AsDialog.ClosePage();
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<script type="text/javascript">
|
||||
alert("上传成功");//上传文件成功!
|
||||
parent.AsDialog.ClosePage("success");
|
||||
</script>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
@ -0,0 +1,99 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><%
|
||||
/*
|
||||
Author: undefined 2018-06-07
|
||||
Content: 示例详情页面
|
||||
History Log:
|
||||
*/
|
||||
String sPrevUrl = CurPage.getParameter("PrevUrl");
|
||||
if(sPrevUrl == null) sPrevUrl = "";
|
||||
|
||||
String sTempletNo = "LbDoclibraryInfo";//--模板号--
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
doTemp.setColTips("", "");
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
//dwTemp.ReadOnly = "-2";//只读模式
|
||||
dwTemp.genHTMLObjectWindow(CurPage.getParameter("SerialNo"));
|
||||
|
||||
String sButtons[][] = {
|
||||
{"true","All","Button","保存","保存所有修改","as_save(0)","","","",""},
|
||||
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
|
||||
};
|
||||
sButtonPosition = "south";
|
||||
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#FILE2").attr("type","file");
|
||||
$("#myiframe0").attr("enctype","multipart/form-data");
|
||||
// var params={};
|
||||
<%-- params["OBJECTTYPE"]="<%=flowNo%>"; --%>
|
||||
// params["FILENAMEX"]="";
|
||||
// params["REMARK2"]="";
|
||||
// params["FileSize2"]="";
|
||||
// var sparma="";
|
||||
// for(var key in params){
|
||||
// sparma=sparma+"<input type=\"text\" name=\""+key+"\" id=\""+key+"\" value=\""+params[key]+"\">"
|
||||
// }
|
||||
// $("#FILE2").append(sparma);
|
||||
$("#myiframe0").attr("action","<%=sWebRootPath%>/Tenwa/Lease/Flow/FileManager/MortgageFile/FileUpload.jsp?CompClientID=<%=CurComp.getClientID()%>");
|
||||
$("#myiframe0").attr("method","post");
|
||||
});
|
||||
|
||||
function viewAndEdit_attachment(){
|
||||
if(confirm("确认取消上传?")){
|
||||
parent.AsDialog.ClosePage("_CANCEL_");
|
||||
}
|
||||
}
|
||||
|
||||
function importRecord(){
|
||||
var o = document.forms["myiframe0"];
|
||||
var sFileName = o.FILE2.value;
|
||||
var nameArr = sFileName.split("\\");
|
||||
|
||||
setItemValue(0,0,"FileName",encodeURI(nameArr[nameArr.length-1]));
|
||||
$("#FILENAMEX").val(encodeURI(nameArr[nameArr.length-1]));
|
||||
o.REMARK2.value= encodeURI(getItemValue(0,0,"REMARK"));
|
||||
if (typeof(sFileName) == "undefined" || sFileName==""){
|
||||
alert("请选上传的附件!");
|
||||
return false;
|
||||
}
|
||||
if(/[!@'"#$%&\^*]/.test(nameArr[nameArr.length-1])){
|
||||
alert("文件名不合法");
|
||||
return;
|
||||
}
|
||||
var flag=CheckStr(nameArr[nameArr.length-1].toLowerCase());
|
||||
if(flag!="true"){
|
||||
alert("只能上传后缀名为"+flag+"的文件");
|
||||
return ;
|
||||
}
|
||||
var fileSize;
|
||||
if(typeof(ActiveXObject) == "function"){ // IE
|
||||
var fso = new ActiveXObject("Scripting.FileSystemObject");
|
||||
var f1 = fso.GetFile(sFileName);
|
||||
fileSize = f1.size;
|
||||
}else{
|
||||
fileSize = o.FILE2.files[0].size;
|
||||
}
|
||||
if(fileSize > 50*1024*1024){
|
||||
alert("文件大于50MB,不能上传!");
|
||||
return false;
|
||||
}
|
||||
$("#FileSize2").val(fileSize);
|
||||
return o.submit();
|
||||
}
|
||||
function CheckStr(filename){
|
||||
var s="jpg,jpeg,png,bmp,gif,pdf,doc,docx,xls,xlsx";
|
||||
var flag="false";
|
||||
var s2=s.split(",");
|
||||
var filenamelast = filename.lastIndexOf(".");
|
||||
var fileimage = filename.substr(filenamelast+1).toLowerCase();
|
||||
for(var i=0;i<s2.length;i++){
|
||||
if(fileimage==s2[i]){
|
||||
return "true";
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -61,7 +61,6 @@
|
||||
|
||||
//ÉÏ´«
|
||||
function upload(id){
|
||||
debugger;
|
||||
var param="Library_id="+id;
|
||||
var sUrl="/Tenwa/Lease/Flow/FileManager/MortgageFile/LbDoclibraryInfo.jsp";
|
||||
AsDialog.PopView(sUrl,param,"dialogWidth=480px;dialogHeight=400px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;",function(message){
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
|
||||
dwTemp.Style = "2";//freeform
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
%>
|
||||
<%/*~END~*/%>
|
||||
|
||||
@ -85,6 +85,9 @@
|
||||
var certid =getItemValue(0,getRow(),"certid");
|
||||
var carSeries = getItemValue(0,getRow(),"carSeries");
|
||||
var productModel =getItemValue(0,getRow(),"productModel");
|
||||
var brandid = getItemValue(0,getRow(),"brandid");
|
||||
var seriesid = getItemValue(0,getRow(),"seriesid");
|
||||
var modelid = getItemValue(0,getRow(),"modelid");
|
||||
if(certtype==""){
|
||||
alert("请选择证件类型");
|
||||
|
||||
@ -192,10 +195,10 @@
|
||||
}
|
||||
|
||||
|
||||
<%/*~[Describe=选择产品车型;]~*/%>
|
||||
<%/*~[Describe=选择车品牌;]~*/%>
|
||||
function selectProductModel()
|
||||
{
|
||||
AsDialog.OpenSelector("SelectProductModel","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
AsDialog.OpenSelector("SelectCardataBrand","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_")
|
||||
{
|
||||
@ -203,38 +206,19 @@
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
MyOjbect.productModel=sReturn[1];
|
||||
MyOjbect.brandid=sReturn[0];
|
||||
MyOjbect.brandname=sReturn[1];
|
||||
setItemValue(0,getRow(),"productModel",sReturn[1]);
|
||||
},"请选择产品车型",'');
|
||||
},"请选择车品牌",'');
|
||||
}
|
||||
<%/*~[Describe=选择品牌车系;]~*/%>
|
||||
function selectCarSystem()
|
||||
{
|
||||
var carSeries=" ";
|
||||
if(MyOjbect.carSeries){
|
||||
carSeries=MyOjbect.carSeries;
|
||||
AsDialog.OpenSelector("SelectCarSystem","carSeries,"+carSeries,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_")
|
||||
{
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,getRow(),"carSystem",sReturn[1]);
|
||||
},"请选择品牌车系",'');
|
||||
}else{
|
||||
alert("请先选择品牌车型");
|
||||
}
|
||||
}
|
||||
<%/*~[Describe=选择品牌车型;]~*/%>
|
||||
<%/*~[Describe=请选择车系;]~*/%>
|
||||
function selectCarSeries()
|
||||
{
|
||||
var productModel="";
|
||||
if(MyOjbect.productModel){
|
||||
productModel=MyOjbect.productModel;
|
||||
|
||||
AsDialog.OpenSelector("SelectCarSeries","productModel,"+productModel,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
|
||||
var brandid="";
|
||||
if(MyOjbect.brandid){
|
||||
brandid=MyOjbect.brandid;
|
||||
AsDialog.OpenSelector("SelectCardataSeries","brandid,"+brandid,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_")
|
||||
{
|
||||
@ -242,14 +226,37 @@
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
MyOjbect.carSeries=sReturn[1];
|
||||
MyOjbect.seriesid=sReturn[0];
|
||||
MyOjbect.seriesname=sReturn[1];
|
||||
setItemValue(0,getRow(),"carSeries",sReturn[1]);
|
||||
},"请选择品牌车型",'');
|
||||
},"请选择车系",'');
|
||||
}else{
|
||||
alert("请先选择汽车品牌")
|
||||
alert("请先选择车品牌")
|
||||
}
|
||||
|
||||
}
|
||||
<%/*~[Describe=选择车型;]~*/%>
|
||||
function selectCarSystem()
|
||||
{
|
||||
var seriesid="";
|
||||
if(MyOjbect.seriesid){
|
||||
seriesid=MyOjbect.seriesid;
|
||||
AsDialog.OpenSelector("SelectCardataModel","seriesid,"+seriesid,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.5) + "px",
|
||||
function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""||sReturn=="_NONE_")
|
||||
{
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
MyOjbect.modelid=sReturn[0];
|
||||
MyOjbect.modelname=sReturn[1];
|
||||
setItemValue(0,getRow(),"carSystem",sReturn[1]);
|
||||
},"请选择车型",'');
|
||||
}else{
|
||||
alert("请先选择车系");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
@ -266,7 +273,7 @@
|
||||
var sReturn = RunJavaMethodSqlca("com.tenwa.lease.flow.project.projectapproval.BusinessTypeController","getBusinessType","");
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,0,"productId",sReturn[0]);
|
||||
setItemValue(0,0,"productName",sReturn[1]);
|
||||
setItemValue(0,0,"productName",sReturn[1]);
|
||||
}else if(num>1){
|
||||
showItem(0,"productName");//字段显示
|
||||
showItem(0,"product_id");//字段显示
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
<%@page import="com.tenwa.comm.dataRightmanager.DataRightManager"%>
|
||||
<%@page import="java.util.Date"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
@ -12,14 +11,17 @@
|
||||
SimpleDateFormat df=new SimpleDateFormat("yyyy/MM/dd");
|
||||
String now=df.format(new Date(d.getTime()));//yyyy/MM/dd格式
|
||||
ASObjectModel doTemp = new ASObjectModel("GeneratedReminderLetterList");
|
||||
String sCondtion=DataRightManager.getRightCondition(CurUser,"O", "contract");
|
||||
doTemp.appendJboWhere(sCondtion);
|
||||
/* String sCondtion=DataRightManager.getRightCondition(CurUser,"O", "contract");
|
||||
doTemp.appendJboWhere(sCondtion); */
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.MultiSelect=true;
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(10);
|
||||
dwTemp.genHTMLObjectWindow(StringFunction.getToday("yyyy/MM/dd"));
|
||||
//dwTemp.genHTMLObjectWindow(StringFunction.getToday("yyyy/MM/dd"));
|
||||
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
|
||||
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
@ -40,7 +42,7 @@
|
||||
AsDialog.PopView("/Tenwa/Lease/Flow/RentCollection/generatedreminderletter/generatededitshow.jsp","contractlist="+sPara+"&payment_number="+payment_number,
|
||||
{width:"500px",height:"200px",title:"选择发送日期"},function(sReturn){
|
||||
if(sReturn!=null&&sReturn.length>0){
|
||||
exportExcel(sReturn);
|
||||
exportExcel(sReturn);
|
||||
alert("生成催款函成功!");
|
||||
}
|
||||
return;
|
||||
@ -58,8 +60,6 @@
|
||||
|
||||
}
|
||||
function exportExcel(sReturn){
|
||||
|
||||
|
||||
var payment_numbers = getItemValueArray(0,'payment_number');
|
||||
var allPaymentNumbers="";
|
||||
for(var i=0;i<payment_numbers.length;i++){
|
||||
@ -70,10 +70,17 @@
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
//模板号
|
||||
param["templateNo"]="dc51852d44214eda9a4d320a063673d1";
|
||||
debugger;
|
||||
param["templateNo"]="a67d1e799d35435e866010dd1325674c";
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]="打印催款函";
|
||||
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";
|
||||
tempParam["ID"]=getItemValue(0,getRow(0),"ID");
|
||||
/* tempParam["payment_number"]=getItemValue(0,getRow(0),"PAYMENT_NUMBER");
|
||||
tempParam["PLAN_LIST"]=PLAN_LISTS[i];
|
||||
tempParam["PLAN_NUMBER"]=PAYMENT_NUMBERS[i];
|
||||
tempParam["customername"]=getItemValue(0,getRow(0),"customername");
|
||||
tempParam["contract_number"]=getItemValue(0,getRow(0),"contract_number"); */
|
||||
//生成模板固定参数
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
|
||||
@ -85,13 +92,14 @@
|
||||
if(sparam.length>0){sparam+=",";}
|
||||
sparam+=key+"="+param[key];
|
||||
}
|
||||
//RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentCollectDeleteAction","deletequtation","plan_number="+payment_numbers[i]);
|
||||
console.log(getNowFormatDate());
|
||||
RunJavaMethodTrans("com.tenwa.officetempalte.controller.RentCollectDeleteAction","deletequtation","plan_number="+payment_numbers[i]);
|
||||
console.log(sparam);
|
||||
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||||
console.log(getNowFormatDate());
|
||||
|
||||
reloadSelf();
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
@ -24,12 +24,10 @@
|
||||
alert("ÇëÑ¡Ôñ·¢ËÍÈÕÆÚ£¡");
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
var fparams="payment_number="+'<%=CurPage.getParameter("payment_number")%>'+",senddate="+senddate+",contractlist=<%=CurPage.getParameter("contractlist")%>"+",inputuserid=<%=inputuserid%>"+",inputorgid=<%=inputorgid%>,userId=<%=CurUser.getUserID()%>,orgId=<%=CurUser.getOrgID()%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.amarsoft.app.lc.reminder.GeneratedReminderLetterAction","saveGeneratedReminderLetter",fparams);
|
||||
*/
|
||||
AsDialog.ClosePage(senddate);
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/IncludeEnd.jsp"%>
|
||||
@ -59,7 +59,8 @@
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
//模板号
|
||||
param["templateNo"]="7bb0ad99651e42bf969a2a4e18bd20b6";
|
||||
debugger;
|
||||
param["templateNo"]="ceaa18f72b0e4bbaa6e66dcfd7e32c87";
|
||||
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]="租金通知书";
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
<cache name="错误代码信息" loadClass="com.amarsoft.dict.als.cache.loader.ErrMsgLoader"/>
|
||||
<cache name="ObjectWindow缓存" loadClass="com.amarsoft.dict.als.cache.loader.AWEDataWindowLoader" size="50" expireTime="1200"/>
|
||||
<cache name="JBO关联对象缓存" loadClass="com.amarsoft.asquery.JBORelatedObjLoader"/>
|
||||
<!--
|
||||
<cache name="APP_CODE缓存" loadClass="apx.com.amarsoft.als.base.constant.cache.loader.AppCodeLoader"/>
|
||||
<cache name="APP_DO缓存" loadClass="apx.com.amarsoft.als.base.constant.cache.loader.AppAweDoLoader" size="10000" />
|
||||
<!--
|
||||
<cache name="SYSCONF_CLTYPE" loadClass="com.amarsoft.app.creditline.cache.loader.CreditLineTypeDefinitionLoader"/>额度类型信息
|
||||
<cache name="SYSCONF_LIMITATIONTYPE" loadClass="com.amarsoft.app.creditline.cache.loader.LimitationTypeDefinitionLoader"/>额度限制类型信息
|
||||
<cache name="SYSCONF_CL_ERROR_TYPE" loadClass="com.amarsoft.app.creditline.cache.loader.ErrorTypeDefinitionLoader"/>额度异常点类型信息
|
||||
|
||||
@ -4544,6 +4544,106 @@
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="LB_EQUIPMENT_CAR_TEMP" label="汽车租赁物临时表" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="标识" type="STRING" length="32"/>
|
||||
<attribute name="PROJECT_ID" label="项目编号" type="STRING" length="32"/>
|
||||
<attribute name="CONTRACT_ID" label="合同编号" type="STRING" length="32"/>
|
||||
<attribute name="DEVICE_TYPE" label="车辆类型" type="STRING" length="30"/>
|
||||
<attribute name="EQUIP_NAME" label="设备名称" type="STRING" length="200"/>
|
||||
<attribute name="BRAND" label="车辆品牌" type="STRING" length="30"/>
|
||||
<attribute name="MODEL" label="型号" type="STRING" length="30"/>
|
||||
<attribute name="EQUIP_NUM" label="数量" type="STRING" length="30"/>
|
||||
<attribute name="PRICE" label="单价" type="STRING" length="30"/>
|
||||
<attribute name="UNIT" label="单位" type="STRING" length="30"/>
|
||||
<attribute name="EQUIP_PRICE" label="交易价格" type="STRING" length="30"/>
|
||||
<attribute name="TOTAL" label="设备原值" type="STRING" length="30"/>
|
||||
<attribute name="NOW_TOTAL" label="车辆指导价" type="STRING" length="30"/>
|
||||
<attribute name="VNDR" label="供应商id" type="STRING" length="32"/>
|
||||
<attribute name="VNDR_NAME" label="供应商" type="STRING" length="200"/>
|
||||
<attribute name="MANUFACTURER" label="制造商id" type="STRING" length="32"/>
|
||||
<attribute name="MANUFACTURER_NAME" label="生产商" type="STRING" length="200"/>
|
||||
<attribute name="EQUIP_NUMBER" label="设备序列号" type="STRING" length="30"/>
|
||||
<attribute name="EQUIP_DELIVERY_PLACE" label="交付地点" type="STRING" length="100"/>
|
||||
<attribute name="EQUIP_DELIVERY_DATE" label="交付时间" type="STRING" length="30"/>
|
||||
<attribute name="EQUIP_PLACE" label="设备设置地址" type="STRING" length="100"/>
|
||||
<attribute name="MEMO" label="其他配置说明" type="STRING" length="1000"/>
|
||||
<attribute name="DATA_STATE" label="数据状态" type="STRING" length="32"/>
|
||||
<attribute name="IS_FLOW" label="是否在流程中" type="STRING" length="1000"/>
|
||||
<attribute name="STATUS" label="状态" type="STRING" length="1000"/>
|
||||
<attribute name="FLOWUNID" label="流程编号" type="STRING" length="32"/>
|
||||
<attribute name="INPUTUSERID" label="登记人" type="STRING" length="32"/>
|
||||
<attribute name="INPUTORGID" label="登记部门" type="STRING" length="32"/>
|
||||
<attribute name="INPUTTIME" label="登记时间" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEUSERID" label="更新人" type="STRING" length="32"/>
|
||||
<attribute name="UPDATEORGID" label="更新部门" type="STRING" length="32"/>
|
||||
<attribute name="UPDATETIME" label="更新时间" type="STRING" length="32"/>
|
||||
<attribute name="FRAME_NUMBER" label="车架号" type="STRING" length="100"/>
|
||||
<attribute name="ENGINE_NUMBER" label="发动机号" type="STRING" length="100"/>
|
||||
<attribute name="PLATE_NUMBER" label="车牌号" type="STRING" length="100"/>
|
||||
<attribute name="EQUIP_TYPE" label="租赁物类型" type="STRING" length="32"/>
|
||||
<attribute name="CONSIGNEE" label="收货人" type="STRING" length="30"/>
|
||||
<attribute name="CONSIGNEE_TEL" label="收货人联系电话" type="STRING" length="30"/>
|
||||
<attribute name="IS_DELIVERY" label="设备交付情况" type="STRING" length="30"/>
|
||||
<attribute name="REMARK" label="交付说明" type="STRING" length="1000"/>
|
||||
<attribute name="DRIVE_TYPE" label="驱动形式" type="STRING" length="100"/>
|
||||
<attribute name="CAR_COLOUR" label="车辆颜色" type="STRING" length="32"/>
|
||||
<attribute name="DISPLACEMENT" label="排量" type="STRING" length="32"/>
|
||||
<attribute name="LICENSE_PLATE_NUMBER" label="车牌号码" type="STRING" length="32"/>
|
||||
<attribute name="EXPIRYDATE" label="年检有效期" type="STRING" length="32"/>
|
||||
<attribute name="D_NAME" label="驾驶人姓名" type="STRING" length="32"/>
|
||||
<attribute name="D_SEX" label="驾驶人性别" type="STRING" length="32"/>
|
||||
<attribute name="D_CERTID" label="驾驶人身份证号" type="STRING" length="32"/>
|
||||
<attribute name="D_CERT_ADDR" label="驾驶人身份证地址" type="STRING" length="200"/>
|
||||
<attribute name="D_CERT_VALID" label="驾驶人身份证有效期" type="STRING" length="32"/>
|
||||
<attribute name="D_DRIVE" label="驾驶证" type="STRING" length="32"/>
|
||||
<attribute name="D_TEL" label="驾驶人手机号码" type="STRING" length="32"/>
|
||||
<attribute name="D_ADDR" label="驾驶人常住地址" type="STRING" length="200"/>
|
||||
<attribute name="D_EDU_LEVEL" label="驾驶人学历" type="STRING" length="32"/>
|
||||
<attribute name="D_WORK_NAME" label="驾驶人公司名称" type="STRING" length="100"/>
|
||||
<attribute name="D_WORK_ADDR" label="驾驶人公司地址" type="STRING" length="200"/>
|
||||
<attribute name="D_WORK_YEAR" label="驾驶人当前工作工作年限" type="STRING" length="32"/>
|
||||
<attribute name="D_SALARY" label="驾驶人月薪" type="DOUBLE" length="22" scale="2"/>
|
||||
<attribute name="D_ID" label="驾驶人ID" type="STRING" length="32"/>
|
||||
<attribute name="car_series" label="车系" type="STRING" length="80"/>
|
||||
<attribute name="gears" label="档位" type="STRING" length="80"/>
|
||||
<attribute name="evaluated_price" label="评估价格" type="STRING" length="32"/>
|
||||
<attribute name="excellent_dealer_low_buy_price" label="优秀最低车商收购价" type="STRING" length="32"/>
|
||||
<attribute name="excellent_dealer_buy_price" label=" 优秀车商收车价" type="STRING" length="32"/>
|
||||
<attribute name="excellent_individual_low_sold_price" label="优秀最低个人交易价" type="STRING" length="32"/>
|
||||
<attribute name="excellent_individual_price" label="优秀个人交易价" type="STRING" length="32"/>
|
||||
<attribute name="excellent_dealer_low_sold_price" label="优秀最低车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="excellent_dealer_price" label="优秀车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="excellent_dealer_high_sold_price" label="优秀最高车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="good_dealer_low_buy_price" label="良好最低车商收购" type="STRING" length="32"/>
|
||||
<attribute name="good_dealer_buy_price" label=" 良好车商收车价" type="STRING" length="32"/>
|
||||
<attribute name="good_individual_low_sold_price" label="良好最低个人交易价" type="STRING" length="32"/>
|
||||
<attribute name="good_individual_price" label=" 良好个人交易价" type="STRING" length="32"/>
|
||||
<attribute name="good_dealer_low_sold_price" label="良好最低车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="good_dealer_price" label="良好车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="good_dealer_high_sold_price" label="良好最高车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="normal_dealer_low_buy_price" label="普通最低车商收购" type="STRING" length="32"/>
|
||||
<attribute name="normal_dealer_buy_price" label=" 普通车商收车价" type="STRING" length="32"/>
|
||||
<attribute name="normal_individual_low_sold_price" label="普通最低个人交易价" type="STRING" length="32"/>
|
||||
<attribute name="normal_individual_price" label=" 普通个人交易价" type="STRING" length="32"/>
|
||||
<attribute name="normal_dealer_low_sold_price" label="普通最低车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="normal_dealer_price" label="普通车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="normal_dealer_high_sold_price" label="普通最高车商零售价" type="STRING" length="32"/>
|
||||
<attribute name="taken" label="查询编号" type="STRING" length="32"/>
|
||||
<attribute name="modelId" label="车型ID" type="STRING" length="32"/>
|
||||
<attribute name="zone" label="城市标识" type="STRING" length="32"/>
|
||||
<attribute name="regDate" label="车牌上牌日期" type="STRING" length="32"/>
|
||||
<attribute name="mile" label="车辆行驶里程" type="STRING" length="32"/>
|
||||
<attribute name="CITYID" label="CITYID" type="STRING" length="32"/>
|
||||
<attribute name="CITYNAME" label="CITYNAME" type="STRING" length="100"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="lb_equipment_car_temp" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
</package>
|
||||
<package name="jbo.guaranty">
|
||||
<class name="GUARANTY_CONTRACT" label="担保合同信息" keyAttributes="SERIALNO">
|
||||
|
||||
BIN
WebContent/fileTemplate/1、融资租赁合同-C端回租(jl20180603).doc
Normal file
BIN
WebContent/fileTemplate/1、融资租赁合同-C端回租(jl20180603).doc
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/1、融资租赁合同-C端直租(jl20180603).doc
Normal file
BIN
WebContent/fileTemplate/1、融资租赁合同-C端直租(jl20180603).doc
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/1、融资租赁合同-C端直租(jl20180603).docx
Normal file
BIN
WebContent/fileTemplate/1、融资租赁合同-C端直租(jl20180603).docx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/4、抵押合同(jl20180603).docx
Normal file
BIN
WebContent/fileTemplate/4、抵押合同(jl20180603).docx
Normal file
Binary file not shown.
Binary file not shown.
BIN
WebContent/fileTemplate/催收通知书.docx
Normal file
BIN
WebContent/fileTemplate/催收通知书.docx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/回租个人授权协议书.docx
Normal file
BIN
WebContent/fileTemplate/回租个人授权协议书.docx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/抵押合同.docx
Normal file
BIN
WebContent/fileTemplate/抵押合同.docx
Normal file
Binary file not shown.
Binary file not shown.
BIN
WebContent/fileTemplate/直租个人授权协议书.docx
Normal file
BIN
WebContent/fileTemplate/直租个人授权协议书.docx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/租金支付通知书.docx
Normal file
BIN
WebContent/fileTemplate/租金支付通知书.docx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/融资租赁合同-C端回租.docx
Normal file
BIN
WebContent/fileTemplate/融资租赁合同-C端回租.docx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/融资租赁合同-C端直租.docx
Normal file
BIN
WebContent/fileTemplate/融资租赁合同-C端直租.docx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/鹏盛物业租金支付通知书-第六期-2.18日 (1).docx
Normal file
BIN
WebContent/fileTemplate/鹏盛物业租金支付通知书-第六期-2.18日 (1).docx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/鹏盛物业租金支付通知书-第六期-2.18日.docx
Normal file
BIN
WebContent/fileTemplate/鹏盛物业租金支付通知书-第六期-2.18日.docx
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
org.quartz.dataSource.zhulhDS.URL=jdbc:mysql://localhost:3306/apzl?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=GBK&autoReconnect=true
|
||||
org.quartz.dataSource.zhulhDS.URL=jdbc:mysql://119.3.11.192:3306/apzl?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=GBK&autoReconnect=true
|
||||
#tel6
|
||||
#org.quartz.dataSource.zhulhDS.user=2sHTLrRv8sRxxaX7RrjfKQ==
|
||||
#tel6_123
|
||||
|
||||
@ -4,9 +4,11 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.tenwa.calc.VI_LC_RENT_PLAN;
|
||||
import jbo.com.tenwa.lease.comm.LB_CAR_LICENSE_PLATE_INFO;
|
||||
import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
@ -14,17 +16,35 @@ import com.amarsoft.context.ASUser;
|
||||
import com.tenwa.comm.exception.BusinessException;
|
||||
|
||||
public class LBCarLicenseCallback extends BaseImportExcelCallBack{
|
||||
|
||||
|
||||
@Override
|
||||
public void run(ASUser CurUser, BizObject importObject,
|
||||
Map<String, String> model, Integer rowIndex, JBOTransaction tx,
|
||||
Transaction Sqlca) throws Exception {
|
||||
//获取Excel表中的合同编号(excel表中的字段为contract_id,实际输入的内容为合同编号)
|
||||
String contractNumber = importObject.getAttribute("contract_id").getString();
|
||||
|
||||
//jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO
|
||||
BizObject contractInfo=JBOFactory.createBizObjectQuery(jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO.CLASS_NAME,"contract_number=:contractNumber").setParameter("contractNumber", contractNumber).getSingleResult(false);
|
||||
//根据合同编号获取该合同信息
|
||||
BizObject contractInfo=JBOFactory.createBizObjectQuery(LB_CONTRACT_INFO.CLASS_NAME,"contract_number=:contractNumber").setParameter("contractNumber", contractNumber).getSingleResult(false);
|
||||
if(contractInfo != null){
|
||||
//获取该合同信息的合同id
|
||||
String contractId = contractInfo.getAttribute("ID").toString();
|
||||
importObject.setAttributeValue("contract_id", contractId);
|
||||
//判断该车辆信息表中是否已经存在该合同,如果不存在则可以新增
|
||||
BizObject carLicenseInfo=JBOFactory.createBizObjectQuery(LB_CAR_LICENSE_PLATE_INFO.CLASS_NAME,"CONTRACT_ID=:contractId").setParameter("contractId", contractId).getSingleResult(false);
|
||||
if(carLicenseInfo==null){
|
||||
BizObjectManager carLicenseManager =JBOFactory.getBizObjectManager(LB_CAR_LICENSE_PLATE_INFO.CLASS_NAME);
|
||||
BizObject carLicensePlate=carLicenseManager.newObject();
|
||||
carLicensePlate.setAttributeValue("CONTRACT_ID", contractId);
|
||||
carLicensePlate.setAttributeValue("PLATE_STATUS", importObject.getAttribute("plate_status").getString());
|
||||
carLicensePlate.setAttributeValue("FRAME_NUMBER", importObject.getAttribute("frame_number").getString());
|
||||
carLicensePlate.setAttributeValue("PLATE_NUMBER", importObject.getAttribute("plate_number").getString());
|
||||
carLicensePlate.setAttributeValue("PLATETIME", importObject.getAttribute("platetime").getString());
|
||||
carLicenseManager.saveObject(carLicensePlate);
|
||||
}else{
|
||||
throw new BusinessException("该合同编号已拥有车辆");
|
||||
}
|
||||
|
||||
}else{
|
||||
throw new BusinessException("²»´æÔڸúÏͬ±àºÅ");
|
||||
}
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
package com.tenwa.lease.app.vehicleAssessment;
|
||||
/**
|
||||
* 二手车评估
|
||||
* @author 张磊
|
||||
*/
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.apache.log4j.Logger;
|
||||
import jbo.app.LB_EQUIPMENT_CAR_TEMP;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.tenwa.lease.util.VehicleAppraisementUtil;
|
||||
|
||||
public class vehicleAssessmentController {
|
||||
|
||||
private String id;
|
||||
|
||||
private Logger logger = Logger.getLogger(this.getClass());
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String vehicleAppraisement(JBOTransaction tx){
|
||||
String result = null;
|
||||
try {
|
||||
BizObjectManager bomLSNT = JBOFactory.getBizObjectManager(LB_EQUIPMENT_CAR_TEMP.CLASS_NAME,tx);
|
||||
BizObject boLSNT = bomLSNT.createQuery("ID=:ID").setParameter("ID",id).getSingleResult(false);
|
||||
//获取车型ID
|
||||
String modelId = boLSNT.getAttribute("modelId").toString();
|
||||
//获取地区编号
|
||||
String zone = boLSNT.getAttribute("zone").toString();
|
||||
//因为从数据库获取到的上牌日期的格式不满足接口需求,所以要利用SimpleDateFormat进行变换
|
||||
Date date = new SimpleDateFormat("yyyy/MM/dd").parse(boLSNT.getAttribute("regDate").toString());
|
||||
String regDate = new SimpleDateFormat("yyyy-MM-dd").format(date);
|
||||
//获取车辆行驶里程
|
||||
String mile = boLSNT.getAttribute("mile").toString();
|
||||
//得到Car300接口返回的Json数据
|
||||
String responseResult = VehicleAppraisementUtil.getVehicleAppraisementResponse(modelId, zone, regDate, mile);
|
||||
JSONObject object = JSONObject.parseObject(responseResult);
|
||||
boLSNT.setAttributeValue("discharge_standard", object.get("discharge_standard").toString());
|
||||
boLSNT.setAttributeValue("detail_report_url", object.get("detail_report_url").toString());
|
||||
//提取出Json数据中的status属性(1:成功;0:失败)并判断,如果为0,则将出错原因返回到前台
|
||||
String status = object.get("status").toString();
|
||||
if(status == "0"){
|
||||
result = object.getString("error_msg").toString();
|
||||
return result;
|
||||
}
|
||||
//将Json字符串中的数组数据部分转换为Json数组
|
||||
List<ConcurrentHashMap> list = JSONArray.parseArray((String)object.get("eval_prices"),ConcurrentHashMap.class);
|
||||
//遍历Json数组并将对应字段的数据加入到数据库中
|
||||
for(int i=0;i<list.size();i++){
|
||||
String condition = list.get(i).get("condition").toString();
|
||||
boLSNT.setAttributeValue(condition+"_dealer_low_buy_price",list.get(i).get("dealer_low_buy_price"));
|
||||
boLSNT.setAttributeValue(condition+"_dealer_buy_price",list.get(i).get("dealer_low_buy_price"));
|
||||
boLSNT.setAttributeValue(condition+"_individual_low_sold_price",list.get(i).get("individual_low_sold_price"));
|
||||
boLSNT.setAttributeValue(condition+"_individual_price",list.get(i).get("individual_price"));
|
||||
boLSNT.setAttributeValue(condition+"_dealer_low_sold_price", list.get(i).get("dealer_low_sold_price"));
|
||||
boLSNT.setAttributeValue(condition+"_dealer_price",list.get(i).get("dealer_price"));
|
||||
boLSNT.setAttributeValue(condition+"_dealer_high_sold_price", list.get(i).get("dealer_high_sold_price"));
|
||||
}
|
||||
bomLSNT.saveObject(boLSNT);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("执行车辆评估操作失败", e);
|
||||
return "ERROR";
|
||||
}
|
||||
return "SUCCESS";
|
||||
}
|
||||
}
|
||||
56
src_tenwa/com/tenwa/lease/util/VehicleAppraisementUtil.java
Normal file
56
src_tenwa/com/tenwa/lease/util/VehicleAppraisementUtil.java
Normal file
@ -0,0 +1,56 @@
|
||||
package com.tenwa.lease.util;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
public class VehicleAppraisementUtil {
|
||||
|
||||
public static String getVehicleAppraisementResponse(String modelId,String zone,String regDate,String mile){
|
||||
String urlStr = "https://api.che300.com/service/getUsedCarPrice?"
|
||||
+"token=ee450692cbd24e8bacb27b6f46b4d752&modelId="+modelId
|
||||
+"®Date="+regDate+"&mile="+mile+"&zone="+zone+"";
|
||||
String result = VehicleAppraisementUtil.getResponseResult(urlStr);
|
||||
return result;
|
||||
}
|
||||
//通过请求url返回Json数据
|
||||
public static String getResponseResult (String url){
|
||||
String line = "";
|
||||
String httpResponseResult = "";
|
||||
try {
|
||||
HttpURLConnection connection = VehicleAppraisementUtil.getURLConnection(url);
|
||||
connection.setReadTimeout(5000);
|
||||
connection.setConnectTimeout(5000);
|
||||
connection.connect();
|
||||
BufferedReader reader = new BufferedReader(
|
||||
new InputStreamReader(
|
||||
connection.getInputStream(),"utf-8"));
|
||||
while ((line = reader.readLine()) != null) {
|
||||
httpResponseResult += line.toString();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return httpResponseResult;
|
||||
}
|
||||
//获取请求需要的HttpURLConnection连接
|
||||
public static HttpURLConnection getURLConnection(String url){
|
||||
HttpURLConnection connection = null;
|
||||
try {
|
||||
URL newUrl = new URL(url);
|
||||
connection = (HttpURLConnection) newUrl.openConnection();
|
||||
connection.setDoOutput(false);//post请求应改为true
|
||||
connection.setDoInput(true);
|
||||
connection.setRequestMethod("GET");
|
||||
connection.setUseCaches(false);
|
||||
connection.setInstanceFollowRedirects(true);
|
||||
connection.setRequestProperty("Content-Type", "application/json");
|
||||
connection.setRequestProperty("Charset", "utf-8");
|
||||
connection.setRequestProperty("Accept-Charset", "utf-8");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user