Merge branch 'develop' of http://git2.tenwa.com.cn/ApzlDev/apzl_leasing.git into zhangbb_apzl
This commit is contained in:
commit
49af921f09
@ -112,6 +112,9 @@
|
||||
<script type="text/javascript" src="<%=sWebRootPath %>/Frame/page/js/as_debug_message.js"></script>
|
||||
<script type="text/javascript">
|
||||
AsDebug.alert("提示","获取数据失败");
|
||||
$(function(){
|
||||
AsControl.OpenView("/Tenwa/Lease/Flow/Comm/BigdataPengyuan/query_report/pengyuandataList.jsp", "FlowUnid=<%=flowunid%>","_self","");
|
||||
})
|
||||
</script>
|
||||
<%
|
||||
} finally {
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
}else if(roleList.contains("800R00000048")){
|
||||
String userid_kj="";
|
||||
BizObjectManager userInfoBOM = JBOFactory.getBizObjectManager("jbo.awe.USER_INFO");
|
||||
List<BizObject> userListObject = userInfoBOM.createQuery("belongorg=:belongorg").setParameter("belongorg", "8006014").getResultList(false);
|
||||
List<BizObject> userListObject = userInfoBOM.createQuery("belongorg=:belongorg").setParameter("belongorg", "8006002").getResultList(false);
|
||||
List<String> useridList_kj = new ArrayList<String>();
|
||||
for(BizObject bo : userListObject){
|
||||
userid_kj = bo.getAttribute("userid").toString();
|
||||
@ -52,10 +52,15 @@
|
||||
doTemp.appendJboWhere(" and O.project_manage in (" + useridStr + ")");
|
||||
}
|
||||
//登录人属于经销商角色 401:经销商roleid
|
||||
if(roleList.contains("401")){
|
||||
if(roleList.contains("401") && !roleList.contains("800R00000051")){
|
||||
doTemp.appendJboWhere(" and O.project_manage='"+userid+"'");
|
||||
}
|
||||
|
||||
String belongorg = Sqlca.getString("select belongorg from user_info where userid='"+userid+"'");
|
||||
String distributor_no = Sqlca.getString("select distributor_no from distributor_info where orgid='"+belongorg+"'");
|
||||
|
||||
if(roleList.contains("800R00000051")){
|
||||
doTemp.appendJboWhere(" and O.distributor_id='"+distributor_no+"'");
|
||||
}
|
||||
|
||||
|
||||
/* String sCondtion=DataRightManager.getRightCondition(CurUser,"O", "contract");
|
||||
|
||||
@ -28,13 +28,15 @@
|
||||
doTemp.appendJboWhere(" and lci.project_manage='"+userid+"'");
|
||||
//导出有权限
|
||||
template = "cff950db664c4faeb1f4656629176004";
|
||||
}else{
|
||||
template = "cff950db664c4faeb1f4656629176004";
|
||||
}
|
||||
String belongorg = Sqlca.getString("select belongorg from user_info where userid='"+userid+"'");
|
||||
String distributor_no = Sqlca.getString("select distributor_no from distributor_info where orgid='"+belongorg+"'");
|
||||
|
||||
if(roleList.contains("800R00000051")){
|
||||
doTemp.appendJboWhere(" and lci.distributor_id='"+distributor_no+"'");
|
||||
template = "cff950db664c4faeb1f4656629176004";
|
||||
doTemp.appendJboWhere(" and O.distributor_no='"+distributor_no+"'");
|
||||
template = "5addef5e8b56470688949d554cad4b24";
|
||||
}
|
||||
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
@ -69,6 +71,7 @@
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]="经销商租金计划报表";
|
||||
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";
|
||||
tempParam["distributor_no"]="<%=distributor_no%>";
|
||||
|
||||
//生成模板固定参数
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||
|
||||
@ -28,13 +28,15 @@
|
||||
doTemp.appendJboWhere(" and lci.project_manage='"+userid+"'");
|
||||
//导出有权限
|
||||
template = "6d2b46cb97c84867b38e1f39d4e9a092";
|
||||
}else{
|
||||
template = "6d2b46cb97c84867b38e1f39d4e9a092";
|
||||
}
|
||||
String belongorg = Sqlca.getString("select belongorg from user_info where userid='"+userid+"'");
|
||||
String distributor_no = Sqlca.getString("select distributor_no from distributor_info where orgid='"+belongorg+"'");
|
||||
|
||||
if(roleList.contains("800R00000051")){
|
||||
doTemp.appendJboWhere(" and lci.distributor_id='"+distributor_no+"'");
|
||||
template = "6d2b46cb97c84867b38e1f39d4e9a092";
|
||||
doTemp.appendJboWhere(" and O.distributor_no='"+distributor_no+"'");
|
||||
template = "6a3c4a11c86048928d8823f796ee9423";
|
||||
}
|
||||
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
@ -67,6 +69,7 @@
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]="经销商结清数据报表";
|
||||
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";
|
||||
tempParam["distributor_no"]="<%=distributor_no%>";
|
||||
|
||||
//生成模板固定参数
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||
|
||||
@ -0,0 +1,102 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@ page import="org.apache.commons.lang.StringUtils" %>
|
||||
<%
|
||||
/*
|
||||
Author: undefined 2018-10-30
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
String userid=CurUser.getUserID();
|
||||
ASObjectModel doTemp = new ASObjectModel("dealer_collection");
|
||||
|
||||
//加权限
|
||||
BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.awe.USER_ROLE");
|
||||
List<BizObject> roleListObject = manager.createQuery("userid=:userid").setParameter("userid", userid).getResultList(false);
|
||||
List<String> roleList = new ArrayList<String>();
|
||||
String roleid = "";
|
||||
for(BizObject bo : roleListObject){
|
||||
roleid = bo.getAttribute("roleid").toString();
|
||||
roleList.add(roleid);
|
||||
}
|
||||
|
||||
//导出模板编号
|
||||
String template = "";
|
||||
|
||||
//登录人属于经销商角色 401:经销商roleid
|
||||
if(roleList.contains("401") && !roleList.contains("800R00000051")){
|
||||
doTemp.appendJboWhere(" and lci.project_manage='"+userid+"'");
|
||||
//导出有权限
|
||||
template = "05d55e01017a4d80945d5b6c8a8c5faf";
|
||||
}else{
|
||||
template = "05d55e01017a4d80945d5b6c8a8c5faf";
|
||||
}
|
||||
String belongorg = Sqlca.getString("select belongorg from user_info where userid='"+userid+"'");
|
||||
String distributor_no = Sqlca.getString("select distributor_no from distributor_info where orgid='"+belongorg+"'");
|
||||
|
||||
if(roleList.contains("800R00000051")){
|
||||
doTemp.appendJboWhere(" and O.distributor_no='"+distributor_no+"'");
|
||||
template = "c5af519f27ec4b62bacde30b0014f101";
|
||||
}
|
||||
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.ShowSummary="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","导出excel","导出excel","exportExcel()","","","","btn_icon_up",""},
|
||||
//{"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 exportExcel(){
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
|
||||
var templa = "<%=template%>";
|
||||
|
||||
//param["templateNo"]="a87e9bea25694013b9cc39216cac831e";
|
||||
|
||||
//模板号
|
||||
//param["templateNo"]="2cd25a9b1c6248c8abacaeeaf7cda303";//权限
|
||||
param["templateNo"]=templa;//权限
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]="经销商催收报表";
|
||||
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";
|
||||
tempParam["distributor_no"]="<%=distributor_no%>";
|
||||
|
||||
//生成模板固定参数
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
|
||||
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||
|
||||
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
|
||||
for(var key in param){
|
||||
if(sparam.length>0){sparam+=",";}
|
||||
sparam+=key+"="+param[key];
|
||||
}
|
||||
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||||
if(result == "success"){
|
||||
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/BatchIncome/GetLBDocAttributeID.jsp",
|
||||
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
|
||||
downloadFile(attributeID);
|
||||
}else{
|
||||
alert("导出失败!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -1,125 +1,135 @@
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@ page import="org.apache.commons.lang.StringUtils" %>
|
||||
<%
|
||||
/*
|
||||
Author: undefined 2018-10-30
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
String userid=CurUser.getUserID();
|
||||
ASObjectModel doTemp = new ASObjectModel("FundIncomeReport");
|
||||
|
||||
//加权限
|
||||
BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.awe.USER_ROLE");
|
||||
List<BizObject> roleListObject = manager.createQuery("userid=:userid").setParameter("userid", userid).getResultList(false);
|
||||
List<String> roleList = new ArrayList<String>();
|
||||
String roleid = "";
|
||||
for(BizObject bo : roleListObject){
|
||||
roleid = bo.getAttribute("roleid").toString();
|
||||
roleList.add(roleid);
|
||||
}
|
||||
//roleid:800R00000044 北财合作方
|
||||
//String roleId = "800R00000044";
|
||||
|
||||
//roleid:800R00000045 rolename: bccuishou
|
||||
//如果登录人属于bccuishou角色,可以看到北财下的所有的合同
|
||||
/* if(roleList.contains("800R00000045")){
|
||||
List<BizObject> userObjectList = manager.createQuery("roleid=:roleid").setParameter("roleid", roleId).getResultList(false);
|
||||
String userId = "";
|
||||
List<String> useridList = new ArrayList<String>();
|
||||
for(BizObject bo : userObjectList){
|
||||
userId = bo.getAttribute("userid").toString();
|
||||
useridList.add("'"+userId+"'");
|
||||
}
|
||||
String useridStr = StringUtils.join(useridList.toArray(), ",");
|
||||
doTemp.appendJboWhere(" and O.project_manage in (" + useridStr + ")");
|
||||
} */
|
||||
|
||||
//导出模板编号
|
||||
String template = "";
|
||||
|
||||
//登录人属于经销商角色 401:经销商roleid
|
||||
if(roleList.contains("401")){
|
||||
doTemp.appendJboWhere(" and lci.project_manage='"+userid+"'");
|
||||
//导出有权限
|
||||
template = "2cd25a9b1c6248c8abacaeeaf7cda303";
|
||||
}else{
|
||||
//导出无权限
|
||||
template = "a87e9bea25694013b9cc39216cac831e";
|
||||
}
|
||||
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.ShowSummary="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","导出excel","导出excel","exportExcel()","","","","btn_icon_up",""},
|
||||
//{"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 exportExcel(){
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
|
||||
var templa = "<%=template%>";
|
||||
|
||||
//param["templateNo"]="a87e9bea25694013b9cc39216cac831e";
|
||||
|
||||
//模板号
|
||||
//param["templateNo"]="2cd25a9b1c6248c8abacaeeaf7cda303";//权限
|
||||
param["templateNo"]=templa;//权限
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]="资金实收报表导出";
|
||||
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";
|
||||
|
||||
//生成模板固定参数
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
|
||||
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||
|
||||
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
|
||||
for(var key in param){
|
||||
if(sparam.length>0){sparam+=",";}
|
||||
sparam+=key+"="+param[key];
|
||||
}
|
||||
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||||
if(result == "success"){
|
||||
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/BatchIncome/GetLBDocAttributeID.jsp",
|
||||
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
|
||||
downloadFile(attributeID);
|
||||
}else{
|
||||
alert("导出失败!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
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 newRecord(){
|
||||
var sUrl = "";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "";
|
||||
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@ page import="org.apache.commons.lang.StringUtils" %>
|
||||
<%
|
||||
/*
|
||||
Author: undefined 2018-10-30
|
||||
Content:
|
||||
History Log:
|
||||
*/
|
||||
String userid=CurUser.getUserID();
|
||||
ASObjectModel doTemp = new ASObjectModel("FundIncomeReport");
|
||||
|
||||
//加权限
|
||||
BizObjectManager manager = JBOFactory.getBizObjectManager("jbo.awe.USER_ROLE");
|
||||
List<BizObject> roleListObject = manager.createQuery("userid=:userid").setParameter("userid", userid).getResultList(false);
|
||||
List<String> roleList = new ArrayList<String>();
|
||||
String roleid = "";
|
||||
for(BizObject bo : roleListObject){
|
||||
roleid = bo.getAttribute("roleid").toString();
|
||||
roleList.add(roleid);
|
||||
}
|
||||
//roleid:800R00000044 北财合作方
|
||||
//String roleId = "800R00000044";
|
||||
|
||||
//roleid:800R00000045 rolename: bccuishou
|
||||
//如果登录人属于bccuishou角色,可以看到北财下的所有的合同
|
||||
/* if(roleList.contains("800R00000045")){
|
||||
List<BizObject> userObjectList = manager.createQuery("roleid=:roleid").setParameter("roleid", roleId).getResultList(false);
|
||||
String userId = "";
|
||||
List<String> useridList = new ArrayList<String>();
|
||||
for(BizObject bo : userObjectList){
|
||||
userId = bo.getAttribute("userid").toString();
|
||||
useridList.add("'"+userId+"'");
|
||||
}
|
||||
String useridStr = StringUtils.join(useridList.toArray(), ",");
|
||||
doTemp.appendJboWhere(" and O.project_manage in (" + useridStr + ")");
|
||||
} */
|
||||
|
||||
//导出模板编号
|
||||
String template = "";
|
||||
|
||||
|
||||
String belongorg = Sqlca.getString("select belongorg from user_info where userid='"+userid+"'");
|
||||
String distributor_no = Sqlca.getString("select distributor_no from distributor_info where orgid='"+belongorg+"'");
|
||||
|
||||
// if("DSTB20190516003654".equals(distributor_no)){//测试环境18
|
||||
if("DSTB20190510003636".equals(distributor_no)){//正式环境
|
||||
doTemp.appendJboWhere(" and lci.distributor_id ='"+distributor_no+"'");
|
||||
template = "56c237b623a54732b61196c0b64b8238";
|
||||
|
||||
}else if(roleList.contains("401")){
|
||||
doTemp.appendJboWhere(" and lci.project_manage='"+userid+"'");
|
||||
//导出有权限
|
||||
template = "2cd25a9b1c6248c8abacaeeaf7cda303";
|
||||
}else{
|
||||
//导出无权限
|
||||
template = "a87e9bea25694013b9cc39216cac831e";
|
||||
}
|
||||
|
||||
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.ShowSummary="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","导出excel","导出excel","exportExcel()","","","","btn_icon_up",""},
|
||||
//{"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 exportExcel(){
|
||||
var param={};
|
||||
var tempParam={};
|
||||
var sparam="";
|
||||
|
||||
var templa = "<%=template%>";
|
||||
|
||||
//param["templateNo"]="a87e9bea25694013b9cc39216cac831e";
|
||||
|
||||
//模板号
|
||||
//param["templateNo"]="2cd25a9b1c6248c8abacaeeaf7cda303";//权限
|
||||
param["templateNo"]=templa;//权限
|
||||
//生成文件关联关系
|
||||
tempParam["OBJECTTYPE"]="资金实收报表导出";
|
||||
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";
|
||||
tempParam["distributor_no"]="<%=distributor_no%>";
|
||||
|
||||
|
||||
//生成模板固定参数
|
||||
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
|
||||
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
|
||||
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
|
||||
|
||||
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
|
||||
for(var key in param){
|
||||
if(sparam.length>0){sparam+=",";}
|
||||
sparam+=key+"="+param[key];
|
||||
}
|
||||
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
|
||||
if(result == "success"){
|
||||
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/BatchIncome/GetLBDocAttributeID.jsp",
|
||||
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
|
||||
downloadFile(attributeID);
|
||||
}else{
|
||||
alert("导出失败!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
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 newRecord(){
|
||||
var sUrl = "";
|
||||
AsControl.OpenView(sUrl,'','_self','');
|
||||
}
|
||||
function viewAndEdit(){
|
||||
var sUrl = "";
|
||||
var sPara = getItemValue(0,getRow(0),'SerialNo');
|
||||
if(typeof(sPara)=="undefined" || sPara.length==0 ){
|
||||
alert("参数不能为空!");
|
||||
return ;
|
||||
}
|
||||
AsControl.OpenView(sUrl,'SerialNo=' +sPara ,'_self','');
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -36,7 +36,7 @@
|
||||
}
|
||||
String useridStr = StringUtils.join(useridList.toArray(), ",");
|
||||
doTemp.appendJboWhere(" and O.project_manage in (" + useridStr + ")");
|
||||
}else if(roleList.contains("800R00000045")){
|
||||
}/* else if(roleList.contains("800R00000045")){
|
||||
String userid_kj="";
|
||||
BizObjectManager userInfoBOM = JBOFactory.getBizObjectManager("jbo.awe.USER_INFO");
|
||||
List<BizObject> userListObject = userInfoBOM.createQuery("belongorg=:belongorg").setParameter("belongorg", "8006014").getResultList(false);
|
||||
@ -47,11 +47,17 @@
|
||||
}
|
||||
String useridStr = StringUtils.join(useridList_kj.toArray(), ",");
|
||||
doTemp.appendJboWhere(" and O.project_manage in (" + useridStr + ")");
|
||||
}
|
||||
} */
|
||||
//登录人属于经销商角色 401:经销商roleid
|
||||
if(roleList.contains("401")){
|
||||
if(roleList.contains("401") && !roleList.contains("800R00000051")){
|
||||
doTemp.appendJboWhere(" and O.project_manage='"+userid+"'");
|
||||
}
|
||||
String belongorg = Sqlca.getString("select belongorg from user_info where userid='"+userid+"'");
|
||||
String distributor_no = Sqlca.getString("select distributor_no from distributor_info where orgid='"+belongorg+"'");
|
||||
|
||||
if(roleList.contains("800R00000051")){
|
||||
doTemp.appendJboWhere(" and O.distributor_id='"+distributor_no+"'");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -3180,43 +3180,44 @@
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
<class name="vi_the_rent_plan" label="公共租金计划报表" keyAttributes="">
|
||||
<class name="vi_the_rent_plan" label="经销商租金计划报表" keyAttributes="">
|
||||
<attributes>
|
||||
<attribute name="contract_number" label="业务合同号" type="STRING"/>
|
||||
<attribute name="payment_number" label="投入编号" type="STRING"/>
|
||||
<attribute name="customer_name" label="客户名称" type="STRING"/>
|
||||
<attribute name="mobile" label="客户手机" type="STRING"/>
|
||||
<attribute name="project_manage" label="" type="STRING"/>
|
||||
<attribute name="project_manage_name" label="业务员" type="STRING"/>
|
||||
<attribute name="distributor_name" label="经销商sp" type="STRING"/>
|
||||
<attribute name="plan_list" label="计划期次" type="STRING"/>
|
||||
<attribute name="plan_date" label="计划日期" type="STRING"/>
|
||||
<attribute name="rent" label="租金" type="STRING"/>
|
||||
<attribute name="year_rate" label="年利率" type="STRING"/>
|
||||
<attribute name="corpus" label="本金" type="STRING"/>
|
||||
<attribute name="interest" label="利息" type="STRING"/>
|
||||
<attribute name="all_remain_corpus" label="剩余本金" type="STRING"/>
|
||||
<attribute name="collect_status" label="收付状态" type="STRING"/>
|
||||
<attribute name="collect_msg" label="备注" type="STRING"/>
|
||||
<attribute name="batch_no" label="扣款号" type="STRING"/>
|
||||
<attribute name="year_rate" label="年利率" type="STRING"/>
|
||||
<attribute name="batch_status" label="扣款状态" type="STRING"/>
|
||||
<attribute name="batch_sn" label="流水号" type="STRING"/>
|
||||
<attribute name="penalty" label="应收罚息" type="STRING"/>
|
||||
<attribute name="penalty_adjust" label="调整罚息" type="STRING"/>
|
||||
<attribute name="fact_rent" label="实收租金" type="STRING"/>
|
||||
<attribute name="fact_corpus" label="实收本金" type="STRING"/>
|
||||
<attribute name="fact_interest" label="实收利息" type="STRING"/>
|
||||
<attribute name="rent_over" label="本期剩余租金" type="STRING"/>
|
||||
<attribute name="corpus_over" label="本期剩余本金" type="STRING"/>
|
||||
<attribute name="interest_adjust" label="调整利息" type="STRING"/>
|
||||
<attribute name="interest_over" label="本期剩余利息" type="STRING"/>
|
||||
<attribute name="fact_penalty" label="实收罚息" type="STRING"/>
|
||||
<attribute name="penalty_adjust" label="调整罚息" type="STRING"/>
|
||||
<attribute name="penalty" label="应收罚息" type="STRING"/>
|
||||
<attribute name="distributor_name" label="经销商sp" type="STRING"/>
|
||||
<attribute name="interest_adjust" label="调整利息" type="STRING"/>
|
||||
<attribute name="corpus_over" label="本期剩余本金" type="STRING"/>
|
||||
<attribute name="interest_over" label="本期剩余利息" type="STRING"/>
|
||||
<attribute name="rent_over" label="本期剩余租金" type="STRING"/>
|
||||
<attribute name="remaininterest" label="剩余利息总金额" type="STRING"/>
|
||||
<attribute name="collect_status" label="收付状态" type="STRING"/>
|
||||
<attribute name="collect_msg" label="备注" type="STRING"/>
|
||||
<attribute name="batch_no" label="扣款号" type="STRING"/>
|
||||
<attribute name="batch_status" label="扣款状态" type="STRING"/>
|
||||
<attribute name="batch_sn" label="流水号" type="STRING"/>
|
||||
<attribute name="over_days" label="逾期天数" type="STRING"/>
|
||||
<attribute name="own_bank" label="收款银行" type="STRING"/>
|
||||
<attribute name="hire_date" label="扣款成功日期" type="STRING"/>
|
||||
<attribute name="remaininterest" label="剩余利息总金额" type="STRING"/>
|
||||
<attribute name="num" label="催收次数" type="STRING"/>
|
||||
<attribute name="achieved_date" label="银行到账日期" type="STRING"/>
|
||||
<attribute name="num" label="催收次数" type="STRING"/>
|
||||
<attribute name="project_manage_name" label="业务员" type="STRING"/>
|
||||
<attribute name="distributor_no" label="经销商sp编码" type="STRING"/>
|
||||
<attribute name="payment_number" label="投入编号" type="STRING"/>
|
||||
<attribute name="project_manage" label="" type="STRING"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
@ -3225,7 +3226,7 @@
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
<class name="VI_SETTLEMENT_OF_DATA" label="" keyAttributes="">
|
||||
<class name="VI_SETTLEMENT_OF_DATA" label="经销商结清数据报表" keyAttributes="">
|
||||
<attributes>
|
||||
<attribute name="hire_date" label="合同到期日" type="STRING"/>
|
||||
<attribute name="contract_no" label="合同号码" type="STRING"/>
|
||||
@ -3235,6 +3236,7 @@
|
||||
<attribute name="ENGINE_NUMBER" label="发动机号码" type="STRING"/>
|
||||
<attribute name="LICENSE_PLATE_NUMBER" label="车牌号码" type="STRING"/>
|
||||
<attribute name="distributor_name" label="经销商名称" type="STRING"/>
|
||||
<attribute name="distributor_no" label="经销商编码" type="STRING"/>
|
||||
<attribute name="CITY" label="城市" type="STRING"/>
|
||||
<attribute name="LOCATION" label="地址" type="STRING"/>
|
||||
<attribute name="inputName" label="金融专员" type="STRING"/>
|
||||
@ -3247,5 +3249,38 @@
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
</package>
|
||||
<class name="VI_DEALER_COLLECTION" label="经销商催收报表" keyAttributes="">
|
||||
<attributes>
|
||||
<attribute name="project_no" label="申请号码" type="STRING"/>
|
||||
<attribute name="CONTRACT_NO" label="合同号" type="STRING"/>
|
||||
<attribute name="FULLNAME" label="主借人姓名" type="STRING"/>
|
||||
<attribute name="mobile" label="主借人手机号" type="STRING"/>
|
||||
<attribute name="NAME" label="共借人姓名" type="STRING"/>
|
||||
<attribute name="tel" label="共借人手机号" type="STRING"/>
|
||||
<attribute name="over_Principal" label="逾期本金" type="STRING"/>
|
||||
<attribute name="over_interest" label="逾期利息" type="STRING"/>
|
||||
<attribute name="over_penalty" label="逾期罚息" type="STRING"/>
|
||||
<attribute name="over_money" label="逾期金额合计" type="STRING"/>
|
||||
<attribute name="corpus_overs" label="未还本金" type="STRING"/>
|
||||
<attribute name="interest_overs" label="未还所有利息" type="STRING"/>
|
||||
<attribute name="rent_overs" label="总应收" type="STRING"/>
|
||||
<attribute name="distributor_name" label="经销商名称" type="STRING"/>
|
||||
<attribute name="LICENSE_PLATE_NUMBER" label="车牌号" type="STRING"/>
|
||||
<attribute name="over_days" label="逾期天数" type="STRING"/>
|
||||
<attribute name="return_period" label="已还期数" type="STRING"/>
|
||||
<attribute name="over_list" label="未还期数" type="STRING"/>
|
||||
<attribute name="over_num" label="历史逾期情况" type="STRING"/>
|
||||
<attribute name="CERTID" label="主借款人身份证号" type="STRING"/>
|
||||
<attribute name="certid1" label="主借人身份证号" type="STRING"/>
|
||||
<attribute name="distributor_no" label="经销商编码" type="STRING"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="vi_dealer_collection" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
|
||||
|
||||
</package>
|
||||
</jbo>
|
||||
|
||||
BIN
WebContent/fileTemplate/渠道商催收报表.xlsx
Normal file
BIN
WebContent/fileTemplate/渠道商催收报表.xlsx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/渠道商租金计划报表.xlsx
Normal file
BIN
WebContent/fileTemplate/渠道商租金计划报表.xlsx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/渠道商结清数据报表.xlsx
Normal file
BIN
WebContent/fileTemplate/渠道商结清数据报表.xlsx
Normal file
Binary file not shown.
BIN
WebContent/fileTemplate/资金实收报表导出3.xlsx
Normal file
BIN
WebContent/fileTemplate/资金实收报表导出3.xlsx
Normal file
Binary file not shown.
@ -632,10 +632,11 @@ public class FlowAction {
|
||||
if(!"".equals(role)) {
|
||||
String now = StringFunction.getTodayNow().replaceAll(":", "¡÷");
|
||||
SqlObject sql = null;
|
||||
ArrayList<String> ss = user.getRoleTable();
|
||||
if(user.getRoleTable().contains(role)) {
|
||||
sql = new SqlObject(("insert into user_task_data "
|
||||
+ "select sys_guid() ,'" + AssignmentId + "', roleid, flowno, flowunid, project_id, contract_id, '" + now + "', endtime,"
|
||||
+ " 'approve_status03', taskno"
|
||||
+ "select REPLACE(UUID(), '-', '') ,'" + AssignmentId + "', roleid, flowno, flowunid, project_id, contract_id, '" + now + "', endtime,"
|
||||
+ " 'approve_status01', taskno"
|
||||
+ " from user_task_data where userid = '" + userID + "' and taskno = '" + taskNo + "' and (status = 'approve_status01' or status = 'approve_status03')"));
|
||||
sql.setDebugSql(sql.getDebugSql().replaceAll("¡÷", ":"));
|
||||
sql.setOriginalSql(sql.getOriginalSql().replaceAll("¡÷", ":"));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -133,7 +133,7 @@ public class VoucherToNCforCustomer implements Job{
|
||||
String year_month_days = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
||||
|
||||
// 查询为传输或之前传输失败的数据
|
||||
String sql="SELECT max(cif.customerid) id,cif.customer_num,MAX(cif.customername)customername,MAX(cif.customertype)customertype,MAX(cif.customerid) customerid,MAX(cif.certid) as certid FROM CUSTOMER_INFO cif LEFT JOIN lb_union_lessee lul ON lul.customer_id=cif.customerid LEFT JOIN lb_contract_info lci ON lci.id=lul.contract_id WHERE lci.contract_status >='31' AND cif.customer_num NOT IN (SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE = '"+type+"') GROUP BY CIF.CUSTOMER_NUM ";
|
||||
String sql="SELECT MAX(cif.customerid) id,cif.customer_num,MAX(cif.customername) customername,MAX(cif.customertype) customertype,MAX(cif.customerid) customerid, MAX(cif.certid) AS certid FROM CUSTOMER_INFO cif LEFT JOIN lb_union_lessee lul ON lul.customer_id = cif.customerid LEFT JOIN lb_contract_info lci ON lci.id = lul.contract_id WHERE lci.contract_status >= '31' AND cif.customer_num NOT IN (SELECT TABLE_NUM FROM NCXML_DETAIL_RECORDS WHERE FLAG = '1' AND XML_TYPE = 'customer') AND cif.customer_num NOT IN (SELECT cust_id FROM CUSTOMER_LIST WHERE CUST_STATUS = '2' ) GROUP BY CIF.CUSTOMER_NUM ";
|
||||
List<Map<String, String>> rs = DataOperatorUtil.getDataBySql(Sqlca,sql,null);
|
||||
if(rs != null && rs.size()>0) {
|
||||
// 批次号
|
||||
|
||||
@ -1,209 +1,218 @@
|
||||
package com.tenwa.collectaudit.cache;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.commons.httpclient.HttpClient;
|
||||
import org.apache.commons.httpclient.HttpException;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.params.HttpMethodParams;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import com.amarsoft.app.awe.config.InitCollectConfig;
|
||||
import com.gnete.security.crypt.Crypt;
|
||||
import com.gnete.security.crypt.CryptException;
|
||||
|
||||
/**
|
||||
* 新签名包测试用例(依赖新签名包gnete-bc-139.jar与gnete-security.jar)
|
||||
*/
|
||||
public class CollectAuditProcess {
|
||||
|
||||
private static Log log = LogFactory.getLog(CollectAuditProcess.class);
|
||||
|
||||
/**
|
||||
*代收付代收、代付交易测试URL
|
||||
*/
|
||||
//private static final String SERVER_URL = "http://59.41.103.98:333/gzdsf/ProcessServlet";
|
||||
|
||||
//代收付签约、银行卡验证交易测试URL
|
||||
//private static final String SERVER_URL = "http://59.41.103.98:9110/gzdsf/ProcessServlet";
|
||||
|
||||
|
||||
/* public static void main(String[] args) throws CryptException {
|
||||
CollectAuditProcess tp = new CollectAuditProcess( );
|
||||
tp.CollectAuditPayReq();
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* 验证签名信息
|
||||
* @throws CryptException
|
||||
*/
|
||||
private boolean verifySign(String strXML) throws CryptException {
|
||||
//签名(代收付系统JDK环境使用GBK编码,商户使用签名包时需传送GBK编码集)
|
||||
Crypt crypt = new Crypt("gbk" );
|
||||
String pathCer = InitCollectConfig.PUBLICKEYURL;
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\gzdsf.cer";
|
||||
int iStart = strXML.indexOf("<SIGNED_MSG>");
|
||||
if (iStart != -1) {
|
||||
int end = strXML.indexOf("</SIGNED_MSG>");
|
||||
String signedMsg = strXML.substring(iStart+12, end);
|
||||
log.info(signedMsg);
|
||||
String strMsg = strXML.substring(0, iStart) + strXML.substring(end+13);
|
||||
//调用签名包验签接口(原文,签名,公钥路径)
|
||||
if (crypt.verify(strMsg,signedMsg, pathCer)){
|
||||
log.info("verify ok");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
log.error("verify error");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据签名
|
||||
* comment here
|
||||
* @param strData
|
||||
* @return
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
private String signMsg(String strData) throws CryptException {
|
||||
String strRnt = "";
|
||||
//签名(代收付系统JDK环境使用GBK编码,商户使用签名包时需传送GBK编码集)
|
||||
Crypt crypt = new Crypt("gbk");
|
||||
String pathPfx = InitCollectConfig.PRIVATEKEYURL;
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\cps@00019140020764901.p12";
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\ORA@TEST1.p12";
|
||||
String strMsg = strData.replaceAll("<SIGNED_MSG></SIGNED_MSG>", "");
|
||||
//调用签名包签名接口(原文,私钥路径,密码)
|
||||
String signedMsg = crypt.sign(strMsg, pathPfx, "123456");
|
||||
return strData.replaceAll("<SIGNED_MSG></SIGNED_MSG>", "<SIGNED_MSG>"+signedMsg+"</SIGNED_MSG>");
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试请求
|
||||
* comment here
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
protected String CollectAuditPayReq(StringBuffer sendXml,String fileSavePath,String fileName) throws CryptException {
|
||||
String strSendData = sendXml.toString();
|
||||
HttpClient httpClient = new HttpClient( );
|
||||
PostMethod postMethod =
|
||||
new PostMethod(InitCollectConfig.C_SERVERURL);
|
||||
//设置编码
|
||||
httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"GBK");
|
||||
strSendData = this.signMsg(strSendData);
|
||||
log.info(strSendData);
|
||||
System.out.println("发送报文:"+strSendData);
|
||||
InterFaceFileCreate.sendDiscFileCreate(strSendData, fileSavePath, fileName);
|
||||
postMethod.setRequestBody(strSendData);
|
||||
try {
|
||||
long start = System.currentTimeMillis();
|
||||
//执行getMethod
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
System.out.println("cost:"+(System.currentTimeMillis()-start));
|
||||
//失败
|
||||
if (statusCode != HttpStatus.SC_OK) {
|
||||
log.error(
|
||||
"Method failed: " + postMethod.getStatusLine());
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
//处理内容
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.error(strResp);
|
||||
return strResp;
|
||||
}
|
||||
else {
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.info("服务器返回:" + strResp);
|
||||
InterFaceFileCreate.replyDiscFileCreate(strResp, fileSavePath, fileName);
|
||||
System.out.println("服务器返回:" + strResp);
|
||||
//验签
|
||||
if (this.verifySign(strResp)) {
|
||||
log.info("验签正确,处理服务器返回的报文");
|
||||
}
|
||||
return strResp;
|
||||
}
|
||||
} catch (HttpException e) {
|
||||
//发生致命的异常,可能是协议不对或者返回的内容有问题
|
||||
log.error("Please check your provided http address!", e);
|
||||
e.printStackTrace( );
|
||||
} catch (IOException e) {
|
||||
//发生网络异常
|
||||
log.error(e);
|
||||
} catch (Exception e) {
|
||||
log.error(null, e);
|
||||
} finally {
|
||||
//释放连接
|
||||
postMethod.releaseConnection();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
* 测试验证银行卡二、三、四要素请求
|
||||
* comment here
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
protected String CollectAuditVerifyReq(StringBuffer sendXml) throws CryptException {
|
||||
String strSendData = sendXml.toString();
|
||||
HttpClient httpClient = new HttpClient();
|
||||
PostMethod postMethod =
|
||||
new PostMethod(InitCollectConfig.B_SERVERURL);
|
||||
//设置编码
|
||||
httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"GBK");
|
||||
strSendData = this.signMsg(strSendData);
|
||||
log.info(strSendData);
|
||||
System.out.println("发送报文:"+strSendData);
|
||||
postMethod.setRequestBody(strSendData);
|
||||
try {
|
||||
long start = System.currentTimeMillis();
|
||||
//执行getMethod
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
System.out.println("cost:"+(System.currentTimeMillis()-start));
|
||||
//失败
|
||||
if (statusCode != HttpStatus.SC_OK) {
|
||||
log.error(
|
||||
"Method failed: " + postMethod.getStatusLine());
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
//处理内容
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.error(strResp);
|
||||
return strResp;
|
||||
}
|
||||
else {
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.info("服务器返回:" + strResp);
|
||||
System.out.println("服务器返回:" + strResp);
|
||||
//验签
|
||||
if (this.verifySign(strResp)) {
|
||||
log.info("验签正确,处理服务器返回的报文");
|
||||
}
|
||||
return strResp;
|
||||
}
|
||||
} catch (HttpException e) {
|
||||
//发生致命的异常,可能是协议不对或者返回的内容有问题
|
||||
log.error("Please check your provided http address!", e);
|
||||
e.printStackTrace( );
|
||||
} catch (IOException e) {
|
||||
//发生网络异常
|
||||
log.error(e);
|
||||
} catch (Exception e) {
|
||||
log.error(null, e);
|
||||
} finally {
|
||||
//释放连接
|
||||
postMethod.releaseConnection();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
package com.tenwa.collectaudit.cache;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.commons.httpclient.HttpClient;
|
||||
import org.apache.commons.httpclient.HttpException;
|
||||
import org.apache.commons.httpclient.HttpStatus;
|
||||
import org.apache.commons.httpclient.methods.PostMethod;
|
||||
import org.apache.commons.httpclient.params.HttpMethodParams;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.commons.httpclient.protocol.Protocol;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
import com.amarsoft.app.awe.config.InitCollectConfig;
|
||||
import com.gnete.security.crypt.Crypt;
|
||||
import com.gnete.security.crypt.CryptException;
|
||||
|
||||
|
||||
/**
|
||||
* 新签名包测试用例(依赖新签名包gnete-bc-139.jar与gnete-security.jar)
|
||||
*/
|
||||
public class CollectAuditProcess {
|
||||
|
||||
private static Log log = LogFactory.getLog(CollectAuditProcess.class);
|
||||
|
||||
/**
|
||||
*代收付代收、代付交易测试URL
|
||||
*/
|
||||
//private static final String SERVER_URL = "http://59.41.103.98:333/gzdsf/ProcessServlet";
|
||||
|
||||
//代收付签约、银行卡验证交易测试URL
|
||||
//private static final String SERVER_URL = "http://59.41.103.98:9110/gzdsf/ProcessServlet";
|
||||
|
||||
|
||||
/* public static void main(String[] args) throws CryptException {
|
||||
CollectAuditProcess tp = new CollectAuditProcess( );
|
||||
tp.CollectAuditPayReq();
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* 验证签名信息
|
||||
* @throws CryptException
|
||||
*/
|
||||
private boolean verifySign(String strXML) throws CryptException {
|
||||
//签名(代收付系统JDK环境使用GBK编码,商户使用签名包时需传送GBK编码集)
|
||||
Crypt crypt = new Crypt("gbk" );
|
||||
String pathCer = InitCollectConfig.PUBLICKEYURL;
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\gzdsf.cer";
|
||||
int iStart = strXML.indexOf("<SIGNED_MSG>");
|
||||
if (iStart != -1) {
|
||||
int end = strXML.indexOf("</SIGNED_MSG>");
|
||||
String signedMsg = strXML.substring(iStart+12, end);
|
||||
log.info(signedMsg);
|
||||
String strMsg = strXML.substring(0, iStart) + strXML.substring(end+13);
|
||||
//调用签名包验签接口(原文,签名,公钥路径)
|
||||
if (crypt.verify(strMsg,signedMsg, pathCer)){
|
||||
log.info("verify ok");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
log.error("verify error");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据签名
|
||||
* comment here
|
||||
* @param strData
|
||||
* @return
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
private String signMsg(String strData) throws CryptException {
|
||||
String strRnt = "";
|
||||
//签名(代收付系统JDK环境使用GBK编码,商户使用签名包时需传送GBK编码集)
|
||||
Crypt crypt = new Crypt("gbk");
|
||||
String pathPfx = InitCollectConfig.PRIVATEKEYURL;
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\cps@00019140020764901.p12";
|
||||
//"D:\\BaiduNetdisk\\Download\\代收付系统接口文档和JAVA版测试demo及测试相关参数\\JAVA版测试DEMO及测试参数_20170825\\测试商户证书\\ORA@TEST1.p12";
|
||||
String strMsg = strData.replaceAll("<SIGNED_MSG></SIGNED_MSG>", "");
|
||||
//调用签名包签名接口(原文,私钥路径,密码)
|
||||
String signedMsg = crypt.sign(strMsg, pathPfx, "123456");
|
||||
return strData.replaceAll("<SIGNED_MSG></SIGNED_MSG>", "<SIGNED_MSG>"+signedMsg+"</SIGNED_MSG>");
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试请求
|
||||
* comment here
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
protected String CollectAuditPayReq(StringBuffer sendXml,String fileSavePath,String fileName) throws CryptException {
|
||||
String strSendData = sendXml.toString();
|
||||
HttpClient httpClient = new HttpClient( );
|
||||
PostMethod postMethod =
|
||||
new PostMethod(InitCollectConfig.C_SERVERURL);
|
||||
//设置编码
|
||||
httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"GBK");
|
||||
|
||||
//新加入代码
|
||||
ProtocolSocketFactory fcty = new MySecureProtocolSocketFactory();
|
||||
//加入相关的https请求方式
|
||||
Protocol.registerProtocol("https", new Protocol("https", fcty, 443));
|
||||
|
||||
strSendData = this.signMsg(strSendData);
|
||||
log.info(strSendData);
|
||||
System.out.println("发送报文:"+strSendData);
|
||||
InterFaceFileCreate.sendDiscFileCreate(strSendData, fileSavePath, fileName);
|
||||
postMethod.setRequestBody(strSendData);
|
||||
try {
|
||||
long start = System.currentTimeMillis();
|
||||
//执行getMethod
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
System.out.println("cost:"+(System.currentTimeMillis()-start));
|
||||
//失败
|
||||
if (statusCode != HttpStatus.SC_OK) {
|
||||
log.error(
|
||||
"Method failed: " + postMethod.getStatusLine());
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
//处理内容
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.error(strResp);
|
||||
return strResp;
|
||||
}
|
||||
else {
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.info("服务器返回:" + strResp);
|
||||
InterFaceFileCreate.replyDiscFileCreate(strResp, fileSavePath, fileName);
|
||||
System.out.println("服务器返回:" + strResp);
|
||||
//验签
|
||||
if (this.verifySign(strResp)) {
|
||||
log.info("验签正确,处理服务器返回的报文");
|
||||
}
|
||||
return strResp;
|
||||
}
|
||||
} catch (HttpException e) {
|
||||
//发生致命的异常,可能是协议不对或者返回的内容有问题
|
||||
log.error("Please check your provided http address!", e);
|
||||
e.printStackTrace( );
|
||||
} catch (IOException e) {
|
||||
//发生网络异常
|
||||
log.error(e);
|
||||
} catch (Exception e) {
|
||||
log.error(null, e);
|
||||
} finally {
|
||||
//释放连接
|
||||
postMethod.releaseConnection();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
* 测试验证银行卡二、三、四要素请求
|
||||
* comment here
|
||||
* @throws CryptException
|
||||
* @since gnete-ora 0.0.0.1
|
||||
*/
|
||||
protected String CollectAuditVerifyReq(StringBuffer sendXml) throws CryptException {
|
||||
String strSendData = sendXml.toString();
|
||||
HttpClient httpClient = new HttpClient();
|
||||
PostMethod postMethod =
|
||||
new PostMethod(InitCollectConfig.B_SERVERURL);
|
||||
//设置编码
|
||||
httpClient.getParams().setParameter(HttpMethodParams.HTTP_CONTENT_CHARSET,"GBK");
|
||||
strSendData = this.signMsg(strSendData);
|
||||
log.info(strSendData);
|
||||
System.out.println("发送报文:"+strSendData);
|
||||
postMethod.setRequestBody(strSendData);
|
||||
try {
|
||||
long start = System.currentTimeMillis();
|
||||
//执行getMethod
|
||||
int statusCode = httpClient.executeMethod(postMethod);
|
||||
System.out.println("cost:"+(System.currentTimeMillis()-start));
|
||||
//失败
|
||||
if (statusCode != HttpStatus.SC_OK) {
|
||||
log.error(
|
||||
"Method failed: " + postMethod.getStatusLine());
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
//处理内容
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.error(strResp);
|
||||
return strResp;
|
||||
}
|
||||
else {
|
||||
//读取内容
|
||||
byte[] responseBody = postMethod.getResponseBody();
|
||||
String strResp = new String(responseBody, "GBK");
|
||||
log.info("服务器返回:" + strResp);
|
||||
System.out.println("服务器返回:" + strResp);
|
||||
//验签
|
||||
if (this.verifySign(strResp)) {
|
||||
log.info("验签正确,处理服务器返回的报文");
|
||||
}
|
||||
return strResp;
|
||||
}
|
||||
} catch (HttpException e) {
|
||||
//发生致命的异常,可能是协议不对或者返回的内容有问题
|
||||
log.error("Please check your provided http address!", e);
|
||||
e.printStackTrace( );
|
||||
} catch (IOException e) {
|
||||
//发生网络异常
|
||||
log.error(e);
|
||||
} catch (Exception e) {
|
||||
log.error(null, e);
|
||||
} finally {
|
||||
//释放连接
|
||||
postMethod.releaseConnection();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
97
src_tenwa/com/tenwa/collectaudit/cache/MySecureProtocolSocketFactory.java
vendored
Normal file
97
src_tenwa/com/tenwa/collectaudit/cache/MySecureProtocolSocketFactory.java
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
package com.tenwa.collectaudit.cache;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
import java.net.UnknownHostException;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import org.apache.commons.httpclient.ConnectTimeoutException;
|
||||
import org.apache.commons.httpclient.HttpClientError;
|
||||
import org.apache.commons.httpclient.params.HttpConnectionParams;
|
||||
import org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory;
|
||||
import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
|
||||
|
||||
public class MySecureProtocolSocketFactory implements SecureProtocolSocketFactory {
|
||||
|
||||
//这里添加一个属性,主要目的就是来获取ssl跳过验证
|
||||
private SSLContext sslContext = null;
|
||||
/**
|
||||
* Constructor for MySecureProtocolSocketFactory.
|
||||
*/
|
||||
public MySecureProtocolSocketFactory() {
|
||||
}
|
||||
/**
|
||||
* 这个创建一个获取SSLContext的方法,导入MyX509TrustManager进行初始化
|
||||
* @return
|
||||
*/
|
||||
private static SSLContext createEasySSLContext() {
|
||||
try {
|
||||
SSLContext context = SSLContext.getInstance("TLSv1.2");
|
||||
context.init(null, new TrustManager[] { new MyX509TrustManager() },
|
||||
null);
|
||||
return context;
|
||||
} catch (Exception e) {
|
||||
throw new HttpClientError(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断获取SSLContext
|
||||
* @return
|
||||
*/
|
||||
private SSLContext getSSLContext() {
|
||||
if (this.sslContext == null) {
|
||||
this.sslContext = createEasySSLContext();
|
||||
}
|
||||
return this.sslContext;
|
||||
}
|
||||
//后面的方法基本上就是带入相关参数就可以了
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket(java.lang.String,
|
||||
* int, java.net.InetAddress, int)
|
||||
*/
|
||||
public Socket createSocket(String host, int port, InetAddress clientHost,int clientPort) throws IOException, UnknownHostException {
|
||||
return getSSLContext().getSocketFactory().createSocket(host, port,clientHost, clientPort);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket(java.lang.String,
|
||||
* int, java.net.InetAddress, int,
|
||||
* org.apache.commons.httpclient.params.HttpConnectionParams)
|
||||
*/
|
||||
public Socket createSocket(final String host, final int port,final InetAddress localAddress, final int localPort,
|
||||
final HttpConnectionParams params) throws IOException,UnknownHostException, ConnectTimeoutException {
|
||||
if (params == null) {
|
||||
throw new IllegalArgumentException("Parameters may not be null");
|
||||
}
|
||||
int timeout = params.getConnectionTimeout();
|
||||
if (timeout == 0) {
|
||||
return createSocket(host, port, localAddress, localPort);
|
||||
} else {
|
||||
return ControllerThreadSocketFactory.createSocket(this, host, port,localAddress, localPort, timeout);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see SecureProtocolSocketFactory#createSocket(java.lang.String,int)
|
||||
*/
|
||||
public Socket createSocket(String host, int port) throws IOException,UnknownHostException {
|
||||
return getSSLContext().getSocketFactory().createSocket(host, port);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see SecureProtocolSocketFactory#createSocket(java.net.Socket,java.lang.String,int,boolean)
|
||||
*/
|
||||
public Socket createSocket(Socket socket, String host, int port,boolean autoClose) throws IOException, UnknownHostException {
|
||||
return getSSLContext().getSocketFactory().createSocket(socket, host,port, autoClose);
|
||||
}
|
||||
}
|
||||
28
src_tenwa/com/tenwa/collectaudit/cache/MyX509TrustManager.java
vendored
Normal file
28
src_tenwa/com/tenwa/collectaudit/cache/MyX509TrustManager.java
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
package com.tenwa.collectaudit.cache;
|
||||
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
public class MyX509TrustManager implements X509TrustManager {
|
||||
/* (non-Javadoc)
|
||||
* @see javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String)
|
||||
*/
|
||||
public void checkClientTrusted(X509Certificate[] arg0, String arg1)
|
||||
throws CertificateException {
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see javax.net.ssl.X509TrustManager#checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String)
|
||||
*/
|
||||
public void checkServerTrusted(X509Certificate[] arg0, String arg1)
|
||||
throws CertificateException {
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
|
||||
*/
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -52,29 +52,39 @@ public class vehicleAssessmentController {
|
||||
String area = boLSNT.getAttribute("zone").getString();
|
||||
if(area.indexOf("上海") != -1){
|
||||
area = "上海上海市";
|
||||
}else if(area.indexOf("重庆") != -1){
|
||||
}
|
||||
if(area.indexOf("重庆") != -1){
|
||||
area = "重庆重庆市";
|
||||
}else if(area.indexOf("北京") != -1){
|
||||
}
|
||||
if(area.indexOf("北京") != -1){
|
||||
area = "北京北京市";
|
||||
}else if(area.indexOf("天津") != -1){
|
||||
}
|
||||
if(area.indexOf("天津") != -1){
|
||||
//area = "天津市市辖区";
|
||||
area = "天津天津市";
|
||||
}else if(area.indexOf("地区") != -1){
|
||||
}
|
||||
if(area.indexOf("地区") != -1){
|
||||
area = area.substring(0,area.indexOf("地区")+2);
|
||||
}else if(area.indexOf("市") != -1){
|
||||
}
|
||||
if(area.indexOf("市") != -1){
|
||||
area = area.substring(0,area.indexOf("市")+1);
|
||||
}else if(area.indexOf("区") != -1){
|
||||
}
|
||||
if(area.indexOf("区") != -1){
|
||||
area = area.substring(0,area.indexOf("区")+1);
|
||||
}else if(area.indexOf("自治州") != -1){
|
||||
}
|
||||
if(area.indexOf("自治州") != -1){
|
||||
area = area.substring(0,area.indexOf("自治州")+3);
|
||||
}else if(area.indexOf("自治县") != -1){
|
||||
}
|
||||
if(area.indexOf("自治县") != -1){
|
||||
area = area.substring(0,area.indexOf("自治县")+3);
|
||||
}else if(area.indexOf("县") != -1){
|
||||
}
|
||||
if(area.indexOf("县") != -1){
|
||||
area = area.substring(0,area.indexOf("县")+1);
|
||||
}else if(area.indexOf("盟") != -1){
|
||||
}
|
||||
if(area.indexOf("盟") != -1){
|
||||
area = area.substring(0,area.indexOf("盟")+1);
|
||||
}
|
||||
else{
|
||||
if(area ==null ||"".equals(area)){
|
||||
return "请返回租赁车辆基本信息页面填写地区!";
|
||||
}
|
||||
//到数据字典中查询对应的行政编号作为接口入参的zone参数
|
||||
|
||||
@ -42,7 +42,7 @@ public class MakingContractCarCheck extends DefaultBussinessCheck {
|
||||
if(ldcl!=null){
|
||||
BizObject psl = psltMange.createQuery("productid=:productid").setParameter("productid", lcit.getAttribute("PRODUCT_ID").getString()).getSingleResult(false);
|
||||
if(psl!=null){
|
||||
if("03".equals(ci.getAttribute("CUSTOMERTYPE").getString())&&!"BAIC_MOTOR".equals(psl.getAttribute("operationType").toString())&&!"DYCD".equals(psl.getAttribute("operationType").toString())&&!"ZYC".equals(psl.getAttribute("operationType").toString())&&!"KJZL".equals(psl.getAttribute("operationType").toString())){
|
||||
if("03".equals(ci.getAttribute("CUSTOMERTYPE").getString())&&!"BAIC_MOTOR".equals(psl.getAttribute("operationType").toString())&&!"DYCD".equals(psl.getAttribute("operationType").toString())&&!"ZYC".equals(psl.getAttribute("operationType").toString())&&!"KJZL".equals(psl.getAttribute("operationType").toString())&&!"KHSQ".equals(psl.getAttribute("operationType").toString())){
|
||||
if("4".equals(ldcl.getAttribute("PROCESS").getString())){
|
||||
putMsg("已完成电子签约!");
|
||||
setPass(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user