diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/ClearRecord/LbClearFileRecordDetail.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/ClearRecord/LbClearFileRecordDetail.jsp new file mode 100644 index 000000000..a960e635e --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/ClearRecord/LbClearFileRecordDetail.jsp @@ -0,0 +1,45 @@ +<%@page import="com.tenwa.comm.util.date.DateAssistant"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% + /* + Author: undefined 2017-10-30 + Content: 示例详情页面 + History Log: + */ + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/Flow/CollectionAudit/ClearRecord/LbClearFileRecordList.jsp"; + + String sTempletNo = "LbClearFileRecordDetail";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + String currtToday = DateAssistant.getToday(); + //设置默认值 + doTemp.setDefaultValue("INPUTUSERID", CurUser.getUserID()); + doTemp.setDefaultValue("INPUTORGID", CurUser.getOrgID()); + doTemp.setDefaultValue("INPUTTIME", currtToday); + //doTemp.setDefaultValue("CLEAR_DATE", "2017/09/20"); + doTemp.setDefaultValue("CLEAR_DATE", currtToday); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + //dwTemp.ReadOnly = "-2";//只读模式 + dwTemp.genHTMLObjectWindow(CurPage.getParameter("SerialNo")); + + String sButtons[][] = { + {"true","All","Button","确认","保存所有修改","save()","","","btn_icon_save",""}, + }; + sButtonPosition = "south"; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/ClearRecord/LbClearFileRecordList.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/ClearRecord/LbClearFileRecordList.jsp new file mode 100644 index 000000000..c4401ecd8 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/ClearRecord/LbClearFileRecordList.jsp @@ -0,0 +1,56 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2017-10-30 + Content: + History Log: + */ + ASObjectModel doTemp = new ASObjectModel("LbClearFileRecordList"); + 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",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcAuditRentFileList.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcAuditRentFileList.jsp new file mode 100644 index 000000000..cf6bdffd7 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcAuditRentFileList.jsp @@ -0,0 +1,79 @@ +<%@page import="com.tenwa.comm.util.date.DateAssistant"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2017-09-20 + Content: + History Log: + */ + String plan_date = DateAssistant.getToday(); + ASObjectModel doTemp = new ASObjectModel("ViLcFirstAuditRentFileList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.MultiSelect = true; //多选 + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(""); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"false","All","Button","审核","确认审核通过","if(confirm('确定要提交审核吗?')){auditRecord()}","","","","btn_icon_add",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyInfo.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyInfo.jsp new file mode 100644 index 000000000..804bdb519 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyInfo.jsp @@ -0,0 +1,30 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% + /* + Author: undefined 2018-06-11 + Content: 示例详情页面 + History Log: + */ + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = ""; + + String sTempletNo = "CustomerBankVertifyInfo";//--模板号-- + 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"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyList.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyList.jsp new file mode 100644 index 000000000..82dbf9f46 --- /dev/null +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcCustomerBankVertifyList.jsp @@ -0,0 +1,93 @@ +<%@page import="com.tenwa.comm.util.date.DateAssistant"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2017-09-20 + Content: + History Log: + */ + String plan_date = DateAssistant.getToday(); + ASObjectModel doTemp = new ASObjectModel("CustomerBankVertifyList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.MultiSelect = true; //多选 + 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","验证银行卡信息","验证银行卡信息","verifyBankInfo()","","","","btn_icon_add",""}, + {"true","All","Button","编辑","编辑","viewAndEdit()","","","","btn_icon_add",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcFirstAuditRentPlanList.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcFirstAuditRentPlanList.jsp index 6c17e713a..a41b3a8a5 100644 --- a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcFirstAuditRentPlanList.jsp +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcFirstAuditRentPlanList.jsp @@ -1,71 +1,71 @@ -<%@page import="com.tenwa.comm.util.date.DateAssistant"%> -<%@ page contentType="text/html; charset=GBK"%> -<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% - /* - Author: undefined 2017-09-20 - Content: - History Log: - */ - String plan_date = DateAssistant.getToday(); - ASObjectModel doTemp = new ASObjectModel("ViLcFirstAuditRentPlanList"); - //默认预查询 - doTemp.setJboWhereWhenNoFilter(" and O.PLAN_DATE = '"+plan_date+"' "); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - dwTemp.Style="1"; //--设置为Grid风格-- - dwTemp.MultiSelect = true; //多选 - 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","审核","确认审核通过","if(confirm('确定要提交审核吗?')){auditRecord()}","","","","btn_icon_add",""}, - }; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - +<%@page import="com.tenwa.comm.util.date.DateAssistant"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2017-09-20 + Content: + History Log: + */ + String plan_date = DateAssistant.getToday(); + ASObjectModel doTemp = new ASObjectModel("ViLcFirstAuditRentPlanList"); + //默认预查询 + doTemp.setJboWhereWhenNoFilter(" and O.PLAN_DATE = '"+plan_date+"' "); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.MultiSelect = true; //多选 + 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","审核","确认审核通过","if(confirm('确定要提交审核吗?')){auditRecord()}","","","","btn_icon_add",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcReviewAuditRentPlanList.jsp b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcReviewAuditRentPlanList.jsp index 58de2e2e1..dec53b87a 100644 --- a/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcReviewAuditRentPlanList.jsp +++ b/WebContent/Tenwa/Lease/Flow/CollectionAudit/LcReviewAuditRentPlanList.jsp @@ -1,126 +1,198 @@ -<%@page import="com.tenwa.comm.util.date.DateAssistant"%> -<%@ page contentType="text/html; charset=GBK"%> -<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% - /* - Author: undefined 2017-09-20 - Content: - History Log: - */ - - String plan_date = DateAssistant.getToday(); - ASObjectModel doTemp = new ASObjectModel("ViLcReviewAuditRentPlanList"); - doTemp.setJboWhere(" O.AUDIT_STATE = 'Y'"); - //默认预查询 - doTemp.setJboWhereWhenNoFilter(" and O.PLAN_DATE = '"+plan_date+"' and O.COLLECT_STATUS in ('1','2','4','5') "); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - dwTemp.Style="1"; //--设置为Grid风格-- - dwTemp.MultiSelect = true; //多选 - dwTemp.ReadOnly = "1"; //只读模式 - dwTemp.setPageSize(10); - dwTemp.ShowSummary = "1"; //显示小计 - dwTemp.genHTMLObjectWindow(""); - - //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 - String sButtons[][] = { - {"true","All","Button","扣款","扣款","batchCollect()","","","","btn_icon_add",""}, - {"true","","Button","退回","审核未通过,退回初审","if(confirm('确定要退回吗?')){viewAndEdit()}","","","","btn_icon_detail",""}, - }; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - +<%@page import="com.tenwa.comm.util.date.DateAssistant"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2017-09-20 + Content: + History Log: + */ + + String plan_date = DateAssistant.getToday(); + ASObjectModel doTemp = new ASObjectModel("ViLcReviewAuditRentPlanList"); + doTemp.setJboWhere(" O.AUDIT_STATE = 'Y'"); + //默认预查询 + doTemp.setJboWhereWhenNoFilter(" and O.PLAN_DATE = '"+plan_date+"' and O.COLLECT_STATUS in ('未收款','部分收款') "); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.MultiSelect = true; //多选 + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.ShowSummary = "1"; //显示小计 + dwTemp.genHTMLObjectWindow(""); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","All","Button","批量扣款","批量扣款","batchCollect()","","","","btn_icon_add",""}, + {"true","All","Button","实时扣款","实时扣款","timelyCollect()","","","","btn_icon_add",""}, + {"true","All","Button","手工扣款","手工扣款","afterCollectManage()","","","","btn_icon_add",""}, + {"false","All","Button","查询批量扣款","查询批量扣款","queryBatchCollect()","","","","btn_icon_add",""}, + {"true","","Button","退回","审核未通过,退回初审","if(confirm('确定要退回吗?')){viewAndEdit()}","","","","btn_icon_detail",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/WEB-INF/lib/gnete-bc-139.jar b/WebContent/WEB-INF/lib/gnete-bc-139.jar new file mode 100644 index 000000000..ac7bf8ef8 Binary files /dev/null and b/WebContent/WEB-INF/lib/gnete-bc-139.jar differ diff --git a/WebContent/WEB-INF/lib/gnete-security-1.1.jar b/WebContent/WEB-INF/lib/gnete-security-1.1.jar new file mode 100644 index 000000000..f2d9a6db2 Binary files /dev/null and b/WebContent/WEB-INF/lib/gnete-security-1.1.jar differ diff --git a/config/collect_config.properties b/config/collect_config.properties index 7a0193db1..a24bd5947 100644 --- a/config/collect_config.properties +++ b/config/collect_config.properties @@ -1,30 +1,47 @@ - -# product environment - -#com.tenwa.yangdm.collect.c_env=prd -#com.tenwa.yangdm.bank.c_version=1.0.0 -#com.tenwa.yangdm.bank.c_appkey=b373daf93000876cd5f3728bcc36f697 -#com.tenwa.yangdm.c_privateKey=MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqObLkOTu/ENsmxNdLfIBXisAoA/WZPNGUT2b6Y+wn5ociJmg1nIt+a7jKE2vsZgpxjYzUzBxWd9jHTNkxZzQjYLZTYjAi6RoG55OsVfTIr+9DcVKRg6aZrgtNxtPXGwWrft6tTyN5ddwpzv8zj6+/F/MUoisPAI2bb6tGr3GyCPEUN4tZSK2JYi+BcjeLrEX7BbkvWaBBu9G+PUu2Athm6gkdRWMCbNVPOPSqNB8fnYzESo5/0RJd2ZRM8ssweqI5AfkAEg5PB8vAK7y3Thcz1XDK8DOzsk8XSSuP6YQE44VsalNCzplMPR9Cm11aN4T4vLsBL0Qrzp6da/SXT9FDAgMBAAECggEAWaF//IPWXci2XDeRVYH84huBCpDrJQDNKdaVVop+spPD28t1W6VOHgcCigSn8xXXserimLnQwgbg8jAYvNamsWofFtDAn+E1fyU4sKmh9noM9eoZm91CP/FQqmdi7ASie6aWAZOGDlJs1ubToYaq92fY6qhpG8EizxGBkfqXVzJZwK5QBs2WjsVh/gad/JdAW2SWG17WNErdoGX0dDkJook0yMM29lpXWJqg6JaJEwSM18rVCVPP+DEhxarRiAFa2nXACpxoaiO5Hk8S8LgUv9ct1nlYWkP4NRgTyhcaUUCyjPdmGwO/NBpx8ChoRdtXOeMLw6RNzD3JgdZ+QhYtoQKBgQDfvA1xJKVY+Tr/O98bBEAS8N2IM9K+gBaLUkjrGn69pjTlGTmPSpaXzINVu/aR5KOvf1LfPhCriBZzMw03j4BYl+BHaQIPjeJw4PpyycssI5CrUHY7CFHhguDSims/9w2scO+j18gq9LMxiL/l7R4KdG+jcrMrD9SMlPSQnDre1wKBgQDCxiqhmd/qRGUkjgjjeKK70YgOzE7f8+foxm9AkqHiOfcclSdHHBi6THrawoEyWzC0FDcQDZuJYDbYK7JslhDZOYEqv1tYaUeD/D4CgNn4vnUJ++v1f0c+9BrkLYCbaZhz9XDes3JAOq7jO08LbLd01wQj8MP1YJ3UbprwiyWvdQKBgQC3rt9mTYzGgE+0bkYcGyAzrLZj9RAHQIfBuDuPcYAuWX9Bu7Tq9HSwicIlqByl6I2OLr0t9PmgqiisSXSHcfQQSBhk6Ew90uHehIZ5qTx5r3U9gOCgVJNMzrOfhu7IZB9AvLOx0x1OTvmzKC9MKKEqOi/RhACe0O9Sv5QOCYW3nwKBgF3XzMJ/uPrOaUzrgizW+tEzazJ2DaqpgZsNwJyECatN8lm7I2mHiAJ6xtaP0F/Kv/SDqOP7Km1OBh6xLw5SX1vJ8Qn/mKtITkSxS8849cx7NzjQQCfQYytZwXse0VAP2HxGTVN/chSwMYMaGEOQ5fNNhZkrb77SBjlL8SrkYAvhAoGAcu0+1c1vorUwDbvTmka7hxWatI/2NwdnLKeYwcWZLwP+XCaSnD968OmuaVBjN5Sf7fE/+hc9F7wiIG2pTFDX2j/3kItyspb+f0avDoTkxbMJW7t5hm0sKtiQWyA8nSA8U2tQjlrj2VxSUv/34neExc5J8xOysHnGT7yXlLWUkXc= -#com.tenwa.yangdm.collect.c_bizCat=ZFSC -#com.tenwa.yangdm.collect.c_bizSys=ZLRZXT -#com.tenwa.yangdm.collect.c_bizType=1 -#com.tenwa.yangdm.collect.c_subBusinessCode= -#com.tenwa.yangdm.collect.c_businessCode=ZLRZZLZY -#com.tenwa.yangdm.collect.c_chanAcctId=0 -#com.tenwa.yangdm.collect.c_authType=FOUR_AUTH -#com.tenwa.yangdm.collect.msg_apikey= - - -# test environment -com.tenwa.yangdm.collect.c_env=iTest -com.tenwa.yangdm.bank.c_version=1.0.0 -com.tenwa.yangdm.bank.c_appkey=230a15d4bc245d1fba6e5cce1f2b21ec -com.tenwa.yangdm.c_privateKey=MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDqll0OE25x8gr4E5sDOGWIItjssI/tXKrZwjKD5ZXlzbLgcXSf0u3MFjz9UKdkQlr4GpUtPvdrbet/bPxZ5PBLe91ZYohAOv3vSZLcElhr2JI0mEX+Xyy2RlTRmk27WZZLH02fvhJrh6a4PFQYagHfqVTBJQFo2uSUP2/TZeEUBCz+jPp+YVwGl/jDBNGP+UNRDOkYLpDFnmJGbVNl6kgqf7IzY9yaF8RGtlzWz7/NOfn/fRc+PQuhrWk19sxbPJsgONQtx8G2Ecd/RdVV3kxViEf8ETn6ypuB4dthgHhS+SWn3KJftY1g3BbgoiMrExn/HLtyHU2suyExB/FqoRmDAgMBAAECggEBALOcQM9ALXXsvl1GlY8XpRVgqPpADVLNerqTp525MNXscqLJ+2NLWmrCNBw3npJzA7emksU7yrBkTsUXqvchBKKmyclgWbXj9P07Ncht+2lHPloqpJyoPlGo89Qv8ogZhasq4oIGQ5A1In85IaI3uAuJWK0xKi0gO5cOIw6WmIh7WmSzc+IY++DGfgBhpQ1zgaFeFg10r9Ha2atYmhw+3p1xeJLnDqxpDT4cRms9L+WOh2e7UCAbRUAK6xugFiZf1bCDM5PvxGQJi0LmaBUKkF2kbTogCJtSolar71xhgBhdjx7zxBwfpr0OOTyMsDks+j98ZwL/80cGJ42Iu5IRTlECgYEA/8SW1IfSTVqj/UHUN+/y3N6ebf+VsByWpNnkEWMznRGAsGPy8cLwQdz2vysaEw7/mMm6vGjAuAxdKKzHSslncHVdQEBJhdXoBbHEIiPWxFwj3bfjGy6zmiMGiYU9d7qm7CUObjDmBlTjIIWCsLN3qbCy39FzrZsrTlj/0+stbc0CgYEA6szaumC73J0a1YWpLgguZz0JhLhxtZkWs3GbIzDw/5Uc+aU9lbbCUkQmgc6WfI66TvmF8yWrUVTtbHMhHCHwc3LN7MPqnZuAvzgOG5TzZGH50rVVHXGEBezHOoNFZdOLipOYoQ5/MIlR2vHnJkbt9XEFY9bpHw7+TlnKVief1I8CgYBWXJoVX1s6dV2kGUNANAxMWfsi50cy9SREu7IP0PBPm+ZZKRaSXaFki+jhOfuO7eSOQaeFENXqD3qxTk3oycLcrTR0ioCI6WZz7cdtQ660FOyjZAESX52TcTo22z+bGvJcEFMkD+zLvIQIqiwr4B2KtbhgbMfjmd5wkQqpEuL/DQKBgGjjMiJn7APVOpN/rd+eT/xWS9Y5/rG8vWNTsJW72yyRE+yBYE1s4smVIA6Elrz1lUyKMsg3X5xpb9YuZ/AFSUCJXGwT6M6XFKBXDhZMJ54EFnGGB4urlep/p1AALBQcuA0jed8YdsDb1vETdsqmjM5DusCq1GDHddrSSYzLDp8JAoGBAMtAONE3gvFpgRr/3tudOHZt1lywfHsePSXOnMFkSviJDTMXNWR0GQ7k8R1PHVdZRr8xIeONH5WKU9Vd7jmCKIvi2LdjdhePoGVwq875cLLALH3CkgWr0kcHB02M3xLK2oowmtrRCX18Jzo3Q6oKycq1NcljaPLQsObp9/ws2bkX -com.tenwa.yangdm.collect.c_bizCat=ZFSC -com.tenwa.yangdm.collect.c_bizSys=ZLRZXT -com.tenwa.yangdm.collect.c_bizType=1 -com.tenwa.yangdm.collect.c_subBusinessCode= -com.tenwa.yangdm.collect.c_businessCode=ZLRZZLZY -com.tenwa.yangdm.collect.c_chanAcctId=0 -com.tenwa.yangdm.collect.c_authType=FOUR_AUTH -com.tenwa.yangdm.collect.msg_apikey= \ No newline at end of file +#sheng chan huan jing url +#com.tenwa.yangdm.collect.serverUrl=http://cps.gnete.com/ProcessServlet +#com.tenwa.yangdm.bank.serverUrl=http://cps.gnete.com:8191/gzdsf/ProcessServlet + +#ce shi huan jing url +com.tenwa.yangdm.collect.serverUrl=http://59.41.103.98:333/gzdsf/ProcessServlet +com.tenwa.yangdm.bank.serverUrl=http://59.41.103.98:9110/gzdsf/ProcessServlet + +#--------------------------------------------------------------------------------------------- + +#clearFile downUrl +com.tenwa.yangdm.bank.clearRequestUrl=http://59.41.103.98:333/gzdsf/GetSettFile.do +#com.tenwa.yangdm.merchantId=000191400207649 +#test +com.tenwa.yangdm.merchantId=001053110000001 + +#--------------------------------------------------------------------------------------------- +#daishoupeizhi ( 'S' dai biao dai shou,batch.trxCode dai biao piliangdaishou,collect.trxCode dai biao shishidaishou,version banbenhao) +com.tenwa.yangdm.collect.flag=S +com.tenwa.yangdm.batch.trxCode=100001 +#com.tenwa.yangdm.collect.trxCode=100001 +com.tenwa.yangdm.collect.trxCode=100004 +com.tenwa.yangdm.collect.version=05 + +#ye wu dui ying yin hang dai ma bian hao(10702 wei zhu ling) +com.tenwa.yangdm.collect.dataType=2 +com.tenwa.yangdm.collect.level=5 +#yi xia shi yao yong de yong hu ming he mi ma(zheng shi tou chan hou xiu gai) +#com.tenwa.yangdm.collect.userName=00019140020764901 +#com.tenwa.yangdm.collect.userPass=TPSHauto123. +com.tenwa.yangdm.collect.businessCode=10702 + +#test (ce shi huan jing zheng shi tou chan hou zhu shi diao) +com.tenwa.yangdm.collect.userName=operator +com.tenwa.yangdm.collect.userPass=ora_123456 +com.tenwa.yangdm.collect.businessCode=10600 + +#yin hang ka si yao su yan zheng +com.tenwa.yangdm.bank.trxCode=100039 +com.tenwa.yangdm.bank.version=03 +com.tenwa.yangdm.bank.dataType=2 +com.tenwa.yangdm.bank.level=5 + +#an quan zheng shu xiang guan (si yao he gong yao de cun fang wei zhi) +com.tenwa.yangdm.publicKeyUrl=D:\\BaiduNetdisk\\Download\\SecutyKey\\gzdsf.cer +com.tenwa.yangdm.privateKeyUrl=D:\\BaiduNetdisk\\Download\\SecutyKey\\ORA@TEST1.p12 +#com.tenwa.yangdm.privateKeyUrl=D:\\BaiduNetdisk\\Download\\SecutyKey\\cps@00019140020764901.p12 \ No newline at end of file diff --git a/src/com/amarsoft/app/awe/config/CollectProperties.java b/src/com/amarsoft/app/awe/config/CollectProperties.java index 704112023..82507b727 100644 --- a/src/com/amarsoft/app/awe/config/CollectProperties.java +++ b/src/com/amarsoft/app/awe/config/CollectProperties.java @@ -1,100 +1,142 @@ -package com.amarsoft.app.awe.config; - - -public class CollectProperties{ - - /* - * 代扣及鉴权关键参数 - */ - private String c_env; - private String c_version; - private String c_appkey; - private String c_privateKey; - private String c_bizCat; - private String c_bizSys; - private String c_bizType; - private String c_subBusinessCode; - private String c_businessCode; - private String c_chanAcctId; - private String c_authType; - /** - * 云片apikey - */ - private String msg_apikey; - - public String getC_env() { - return c_env; - } - public void setC_env(String c_env) { - this.c_env = c_env; - } - public String getC_version() { - return c_version; - } - public void setC_version(String c_version) { - this.c_version = c_version; - } - public String getC_appkey() { - return c_appkey; - } - public void setC_appkey(String c_appkey) { - this.c_appkey = c_appkey; - } - public String getC_privateKey() { - return c_privateKey; - } - public void setC_privateKey(String c_privateKey) { - this.c_privateKey = c_privateKey; - } - public String getC_bizCat() { - return c_bizCat; - } - public void setC_bizCat(String c_bizCat) { - this.c_bizCat = c_bizCat; - } - public String getC_bizSys() { - return c_bizSys; - } - public void setC_bizSys(String c_bizSys) { - this.c_bizSys = c_bizSys; - } - public String getC_bizType() { - return c_bizType; - } - public void setC_bizType(String c_bizType) { - this.c_bizType = c_bizType; - } - public String getC_subBusinessCode() { - return c_subBusinessCode; - } - public void setC_subBusinessCode(String c_subBusinessCode) { - this.c_subBusinessCode = c_subBusinessCode; - } - public String getC_businessCode() { - return c_businessCode; - } - public void setC_businessCode(String c_businessCode) { - this.c_businessCode = c_businessCode; - } - public String getC_chanAcctId() { - return c_chanAcctId; - } - public void setC_chanAcctId(String c_chanAcctId) { - this.c_chanAcctId = c_chanAcctId; - } - public String getC_authType() { - return c_authType; - } - public void setC_authType(String c_authType) { - this.c_authType = c_authType; - } - public String getMsg_apikey() { - return msg_apikey; - } - public void setMsg_apikey(String msg_apikey) { - this.msg_apikey = msg_apikey; - } - - - -} +package com.amarsoft.app.awe.config; + + +public class CollectProperties{ + + private String c_serverUrl; + private String b_serverUrl; + private String merchantId; + private String flag; + private String userName; + private String userPass; + private String businessCode; + private String c_dataType; + private String c_level; + private String c_trxCode; + private String c_version; + private String b_trxCode; + private String b_version; + private String b_dataType; + private String b_level; + private String publicKeyUrl; + private String privateKeyUrl; + private String clearRequestUrl; + private String batch_trxCode;//批量交易代码 + + public String getBatch_trxCode() { + return batch_trxCode; + } + public void setBatch_trxCode(String batch_trxCode) { + this.batch_trxCode = batch_trxCode; + } + public String getPublicKeyUrl() { + return publicKeyUrl; + } + public void setPublicKeyUrl(String publicKeyUrl) { + this.publicKeyUrl = publicKeyUrl; + } + public String getPrivateKeyUrl() { + return privateKeyUrl; + } + public void setPrivateKeyUrl(String privateKeyUrl) { + this.privateKeyUrl = privateKeyUrl; + } + public String getClearRequestUrl() { + return clearRequestUrl; + } + public void setClearRequestUrl(String clearRequestUrl) { + this.clearRequestUrl = clearRequestUrl; + } + public String getC_serverUrl() { + return c_serverUrl; + } + public void setC_serverUrl(String c_serverUrl) { + this.c_serverUrl = c_serverUrl; + } + public String getB_serverUrl() { + return b_serverUrl; + } + public void setB_serverUrl(String b_serverUrl) { + this.b_serverUrl = b_serverUrl; + } + public String getMerchantId() { + return merchantId; + } + public void setMerchantId(String merchantId) { + this.merchantId = merchantId; + } + public String getFlag() { + return flag; + } + public void setFlag(String flag) { + this.flag = flag; + } + public String getUserName() { + return userName; + } + public void setUserName(String userName) { + this.userName = userName; + } + public String getUserPass() { + return userPass; + } + public void setUserPass(String userPass) { + this.userPass = userPass; + } + public String getBusinessCode() { + return businessCode; + } + public void setBusinessCode(String businessCode) { + this.businessCode = businessCode; + } + public String getC_dataType() { + return c_dataType; + } + public void setC_dataType(String c_dataType) { + this.c_dataType = c_dataType; + } + public String getC_level() { + return c_level; + } + public void setC_level(String c_level) { + this.c_level = c_level; + } + public String getC_trxCode() { + return c_trxCode; + } + public void setC_trxCode(String c_trxCode) { + this.c_trxCode = c_trxCode; + } + public String getC_version() { + return c_version; + } + public void setC_version(String c_version) { + this.c_version = c_version; + } + public String getB_trxCode() { + return b_trxCode; + } + public void setB_trxCode(String b_trxCode) { + this.b_trxCode = b_trxCode; + } + public String getB_version() { + return b_version; + } + public void setB_version(String b_version) { + this.b_version = b_version; + } + public String getB_dataType() { + return b_dataType; + } + public void setB_dataType(String b_dataType) { + this.b_dataType = b_dataType; + } + public String getB_level() { + return b_level; + } + public void setB_level(String b_level) { + this.b_level = b_level; + } + + +} diff --git a/src/com/amarsoft/app/awe/config/InitCollectConfig.java b/src/com/amarsoft/app/awe/config/InitCollectConfig.java index c34404761..95ccc5b38 100644 --- a/src/com/amarsoft/app/awe/config/InitCollectConfig.java +++ b/src/com/amarsoft/app/awe/config/InitCollectConfig.java @@ -1,71 +1,62 @@ -package com.amarsoft.app.awe.config; - -import javax.servlet.http.HttpServlet; - -import org.springframework.web.context.ContextLoader; -import org.springframework.web.context.WebApplicationContext; - -import com.mchange.v2.c3p0.ComboPooledDataSource; - -/** - * 全局增加 接口配置信息 - * @author yangdm - */ -public class InitCollectConfig extends HttpServlet{ - private static final long serialVersionUID = 1L; - - /** - * 环境参数 - */ - public static final String C_ENV; - /** - * 服务版本号 - */ - public static final String C_VERSION; - /** - * 代扣及鉴权appkey - */ - public static final String C_APPKEY; - /** - * 代扣及鉴权的私钥 - */ - public static final String C_PRIVATEKEY; - /** - * 业务大类 - */ - public static final String C_BIZCAT; - /** - * 交易业务系统 - */ - public static final String C_BIZSYS; - /** - * 消费类型 - * 1-消费 - * 8-申购 - * 30-追偿 - */ - public static final String C_BIZTYPE; - public static final String C_SUBBUSINESSCODE; - public static final String C_BUSINESSCODE; - public static final String C_CHANACCTID; - public static final String C_AUTHTYPE; - public static final String MSG_APIKEY; - - - static{ - WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext(); - CollectProperties collectproperties = wac.getBean("collectConfig", CollectProperties.class); - C_ENV = collectproperties.getC_env(); - C_VERSION = collectproperties.getC_version(); - C_APPKEY = collectproperties.getC_appkey(); - C_PRIVATEKEY = collectproperties.getC_privateKey(); - C_BIZCAT = collectproperties.getC_bizCat(); - C_BIZSYS = collectproperties.getC_bizSys(); - C_BIZTYPE = collectproperties.getC_bizType(); - C_SUBBUSINESSCODE = collectproperties.getC_subBusinessCode() != null ? collectproperties.getC_subBusinessCode() :""; - C_BUSINESSCODE = collectproperties.getC_businessCode(); - C_CHANACCTID = collectproperties.getC_chanAcctId(); - C_AUTHTYPE = collectproperties.getC_authType(); - MSG_APIKEY = collectproperties.getMsg_apikey(); - } -} +package com.amarsoft.app.awe.config; + +import javax.servlet.http.HttpServlet; + +import org.springframework.web.context.ContextLoader; +import org.springframework.web.context.WebApplicationContext; + +import com.mchange.v2.c3p0.ComboPooledDataSource; + +/** + * 全局增加 接口配置信息 + * @author yangdm + */ +public class InitCollectConfig extends HttpServlet{ + private static final long serialVersionUID = 1L; + public static final String C_SERVERURL; + public static final String B_SERVERURL; + public static final String MERCHANTID; + public static final String FLAG; + public static final String USERNAME; + public static final String USERPASS; + public static final String BUSSINESSCODE; + public static final String C_DATATYPE; + public static final String C_LEVEL; + public static final String C_TRXCODE; + public static final String C_VERSION; + /** + * 批量交易代码,其他参数同实时 + */ + public static final String BATCH_TRXCODE; + public static final String B_TRXCODE; + public static final String B_VERSION; + public static final String B_DATATYPE; + public static final String B_LEVEL; + public static final String PUBLICKEYURL; + public static final String PRIVATEKEYURL; + public static final String CLEARREQUESTURL; + + static{ + WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext(); + CollectProperties collectproperties = wac.getBean("collectConfig", CollectProperties.class); + C_SERVERURL = collectproperties.getC_serverUrl(); + B_SERVERURL = collectproperties.getB_serverUrl(); + MERCHANTID = collectproperties.getMerchantId(); + FLAG = collectproperties.getFlag(); + USERNAME = collectproperties.getUserName(); + USERPASS = collectproperties.getUserPass(); + BUSSINESSCODE = collectproperties.getBusinessCode(); + C_DATATYPE = collectproperties.getC_dataType(); + C_LEVEL = collectproperties.getC_level(); + C_TRXCODE = collectproperties.getC_trxCode(); + C_VERSION = collectproperties.getC_version(); + BATCH_TRXCODE = collectproperties.getBatch_trxCode(); + B_TRXCODE = collectproperties.getB_trxCode(); + B_VERSION = collectproperties.getB_version(); + B_DATATYPE = collectproperties.getB_dataType(); + B_LEVEL = collectproperties.getB_level(); + PUBLICKEYURL=collectproperties.getPublicKeyUrl(); + PRIVATEKEYURL=collectproperties.getPrivateKeyUrl(); + CLEARREQUESTURL=collectproperties.getClearRequestUrl(); + } +} diff --git a/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcess.java b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcess.java new file mode 100644 index 000000000..35c7580af --- /dev/null +++ b/src_tenwa/com/tenwa/collectaudit/cache/CollectAuditProcess.java @@ -0,0 +1,209 @@ +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(""); + if (iStart != -1) { + int end = strXML.indexOf(""); + 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("", ""); + //调用签名包签名接口(原文,私钥路径,密码) + String signedMsg = crypt.sign(strMsg, pathPfx, "123456"); + return strData.replaceAll("", ""+signedMsg+""); + } + + /** + * 测试请求 + * 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 ""; + } + + +} diff --git a/src_tenwa/com/tenwa/collectaudit/cache/EntityTransform.java b/src_tenwa/com/tenwa/collectaudit/cache/EntityTransform.java new file mode 100644 index 000000000..6932821e4 --- /dev/null +++ b/src_tenwa/com/tenwa/collectaudit/cache/EntityTransform.java @@ -0,0 +1,274 @@ +package com.tenwa.collectaudit.cache; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.Date; + + +public class EntityTransform { + + /** + * 请求报文 实时代收 Trans_Detail + * @param t + * @return + */ + public static String toXmlByLotCollect(T t){ + //接收xml + StringBuffer xml = new StringBuffer(); + //xml.append("\n"); + Field[] fielArr = t.getClass().getDeclaredFields(); + try { + for (Field field : fielArr) { + // 获取属性的名字 + String fieldName = field.getName(); + // 将属性的首字符大写,方便构造get,set方法 + fieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); + // 获取属性的类型 + String type = field.getGenericType().toString(); + if (type.equals("class java.lang.String")) { + Method m = t.getClass().getMethod("get" + fieldName); + // 调用getter方法获取属性值 + String value = (String) m.invoke(t); + if (fieldName.equals("SN") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + }/*else if (fieldName.equals("ACCOUNT_NAME") && value != null) { + //xml.append("<"+fieldName+">"+value+"\n"); + xml.append("<"+fieldName+">"+value+"\n"); + }*/ else if (fieldName.equals("PROVINCE") && value != null) { + //xml.append("<"+fieldName+">"+value+"\n"); + xml.append("<"+fieldName+">"+value+"\n"); + }else if (fieldName.equals("CURRENCY") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + }else if (fieldName.equals("RECKON_ACCOUNT") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + }else if("".equals(value)){ + value = ""; + xml.append("<"+fieldName+">"+value+"\n"); + }else if(value != null){ + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Integer")) { + Method m = t.getClass().getMethod("get" + fieldName); + Integer value = (Integer) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Long")) { + Method m = t.getClass().getMethod("get" + fieldName); + Long value = (Long) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Short")) { + Method m = t.getClass().getMethod("get" + fieldName); + Short value = (Short) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Double")) { + Method m = t.getClass().getMethod("get" + fieldName); + Double value = (Double) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Boolean")) { + Method m = t.getClass().getMethod("get" + fieldName); + Boolean value = (Boolean) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.util.Date")) { + Method m = t.getClass().getMethod("get" + fieldName); + Date value = (Date) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + } + } catch (Exception e) { + //log.error("构造xml出错"+e); + } + //转化XML + return xml.toString(); + } + /** + * 批量代收 XML + * @param t + * @return + */ + public static String toXmlByBatchCollect(T t){ + //接收xml + StringBuffer xml = new StringBuffer(); + //xml.append("\n"); + Field[] fielArr = t.getClass().getDeclaredFields(); + try { + for (Field field : fielArr) { + // 获取属性的名字 + String fieldName = field.getName(); + // 将属性的首字符大写,方便构造get,set方法 + fieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); + // 获取属性的类型 + String type = field.getGenericType().toString(); + if (type.equals("class java.lang.String")) { + Method m = t.getClass().getMethod("get" + fieldName); + // 调用getter方法获取属性值 + String value = (String) m.invoke(t); + if (fieldName.equals("SN") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + }/*else if (fieldName.equals("ACCOUNT_NAME") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + //xml.append("<"+fieldName+">"+value+"\n"); + }*/else if (fieldName.equals("PROVINCE") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + //xml.append("<"+fieldName+">"+value+"\n"); + } else if (fieldName.equals("CURRENCY") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + }else if (fieldName.equals("RECKON_ACCOUNT") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + }else if("".equals(value)){ + value = ""; + xml.append("<"+fieldName+">"+value+"\n"); + }else if(value != null){ + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Integer")) { + Method m = t.getClass().getMethod("get" + fieldName); + Integer value = (Integer) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Long")) { + Method m = t.getClass().getMethod("get" + fieldName); + Long value = (Long) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Short")) { + Method m = t.getClass().getMethod("get" + fieldName); + Short value = (Short) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Double")) { + Method m = t.getClass().getMethod("get" + fieldName); + Double value = (Double) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Boolean")) { + Method m = t.getClass().getMethod("get" + fieldName); + Boolean value = (Boolean) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.util.Date")) { + Method m = t.getClass().getMethod("get" + fieldName); + Date value = (Date) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + } + } catch (Exception e) { + //log.error("构造xml出错"+e); + } + //转化XML + return xml.toString(); + } + + /** + * 普通将实体类转化为xml字符串 + * @param t + * @return + */ + public static String toXml(T t) { + + //接收xml + StringBuffer xml = new StringBuffer(); + //xml.append("\n"); + Field[] fielArr = t.getClass().getDeclaredFields(); + try { + for (Field field : fielArr) { + // 获取属性的名字 + String fieldName = field.getName(); + // 将属性的首字符大写,方便构造get,set方法 + fieldName = fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1); + // 获取属性的类型 + String type = field.getGenericType().toString(); + if (type.equals("class java.lang.String")) { + Method m = t.getClass().getMethod("get" + fieldName); + // 调用getter方法获取属性值 + String value = (String) m.invoke(t); + if (fieldName.equals("SN") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } else if (fieldName.equals("CURRENCY") && value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + }else if("".equals(value)){ + value = ""; + xml.append("<"+fieldName+">"+value+"\n"); + }else if(value != null){ + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Integer")) { + Method m = t.getClass().getMethod("get" + fieldName); + Integer value = (Integer) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Long")) { + Method m = t.getClass().getMethod("get" + fieldName); + Long value = (Long) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Short")) { + Method m = t.getClass().getMethod("get" + fieldName); + Short value = (Short) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Double")) { + Method m = t.getClass().getMethod("get" + fieldName); + Double value = (Double) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.lang.Boolean")) { + Method m = t.getClass().getMethod("get" + fieldName); + Boolean value = (Boolean) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + if (type.equals("class java.util.Date")) { + Method m = t.getClass().getMethod("get" + fieldName); + Date value = (Date) m.invoke(t); + if (value != null) { + xml.append("<"+fieldName+">"+value+"\n"); + } + } + } + } catch (Exception e) { + //log.error("构造xml出错"+e); + } + //转化XML + //xml.append(""); + return xml.toString(); + } +} diff --git a/src_tenwa/com/tenwa/collectaudit/cache/Info.java b/src_tenwa/com/tenwa/collectaudit/cache/Info.java new file mode 100644 index 000000000..4611e02b8 --- /dev/null +++ b/src_tenwa/com/tenwa/collectaudit/cache/Info.java @@ -0,0 +1,69 @@ +package com.tenwa.collectaudit.cache; + + +/** + * 位于 GZELINK-->INFO 下 + * @author tenwapc + * + */ +public class Info { + private String TRX_CODE; + private String VERSION; + private String DATA_TYPE; + private String LEVEL; + private String USER_NAME; + private String USER_PASS; + private String REQ_SN;//当前时间 + private String SIGNED_MSG; + + public String getTRX_CODE() { + return TRX_CODE; + } + public void setTRX_CODE(String tRX_CODE) { + TRX_CODE = tRX_CODE; + } + public String getVERSION() { + return VERSION; + } + public void setVERSION(String vERSION) { + VERSION = vERSION; + } + public String getDATA_TYPE() { + return DATA_TYPE; + } + public void setDATA_TYPE(String dATA_TYPE) { + DATA_TYPE = dATA_TYPE; + } + public String getLEVEL() { + return LEVEL; + } + public void setLEVEL(String lEVEL) { + LEVEL = lEVEL; + } + public String getUSER_NAME() { + return USER_NAME; + } + public void setUSER_NAME(String uSER_NAME) { + USER_NAME = uSER_NAME; + } + public String getUSER_PASS() { + return USER_PASS; + } + public void setUSER_PASS(String uSER_PASS) { + USER_PASS = uSER_PASS; + } + public String getREQ_SN() { + return REQ_SN; + } + public void setREQ_SN(String rEQ_SN) { + REQ_SN = rEQ_SN; + } + public String getSIGNED_MSG() { + return SIGNED_MSG; + } + public void setSIGNED_MSG(String sIGNED_MSG) { + SIGNED_MSG = sIGNED_MSG; + } + + +} diff --git a/src_tenwa/com/tenwa/collectaudit/cache/InterFaceFileCreate.java b/src_tenwa/com/tenwa/collectaudit/cache/InterFaceFileCreate.java new file mode 100644 index 000000000..a629eadb9 --- /dev/null +++ b/src_tenwa/com/tenwa/collectaudit/cache/InterFaceFileCreate.java @@ -0,0 +1,80 @@ +package com.tenwa.collectaudit.cache; + + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.Scanner; + + +public class InterFaceFileCreate { + + /** + * 生成送盘文件 + * @param sendData + * @param fileSavePath + * @param fileName + */ + public static void sendDiscFileCreate(String sendData,String fileSavePath,String fileName) { + try { + File file = new File(fileSavePath); + System.out.println(file.getAbsolutePath()); + if(!file.exists()){//目录不存在则直接创建 + file.mkdirs(); + } + String filePath = file.getAbsolutePath(); + FileWriter fileWriter = new FileWriter(filePath+"/"+fileName+".txt"); + String ss = sendData; + fileWriter.write(ss); + fileWriter.flush(); + fileWriter.close(); + + FileReader fileReader = new FileReader(filePath+"/"+fileName+".txt"); + BufferedReader br = new BufferedReader(fileReader); + String s; + while ((s = br.readLine()) != null) { + System.out.println(s); + } + fileReader.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + /** + * 生成回盘文件 + * @param replyData + * @param fileSavePath + * @param fileName + */ + public static void replyDiscFileCreate(String replyData,String fileSavePath,String fileName) { + try { + File file = new File(fileSavePath); + System.out.println(file.getAbsolutePath()); + if(!file.exists()){//目录不存在则直接创建 + file.mkdirs(); + } + String filePath = file.getAbsolutePath(); + FileWriter fileWriter = new FileWriter(filePath+"/"+fileName+".rnt"); + String ss = replyData; + fileWriter.write(ss); + fileWriter.flush(); + fileWriter.close(); + + FileReader fileReader = new FileReader(filePath+"/"+fileName+".rnt"); + BufferedReader br = new BufferedReader(fileReader); + String s; + while ((s = br.readLine()) != null) { + System.out.println(s); + } + fileReader.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/src_tenwa/com/tenwa/collectaudit/cache/Trans_Detail.java b/src_tenwa/com/tenwa/collectaudit/cache/Trans_Detail.java new file mode 100644 index 000000000..4722cd5d5 --- /dev/null +++ b/src_tenwa/com/tenwa/collectaudit/cache/Trans_Detail.java @@ -0,0 +1,149 @@ +package com.tenwa.collectaudit.cache; + +/** + * 位于GZELINK--> BODY-->TRANS_DETAILS 下 + * @author tenwapc + * + */ +public class Trans_Detail { + private String SN; + //private String E_USER_CODE;// + private String BANK_CODE; + private String ACCOUNT_TYPE; + private String ACCOUNT_NO; + private String ACCOUNT_NAME; + private String PROVINCE; + private String CITY; + private String BANK_NAME; + private String ACCOUNT_PROP; + private String AMOUNT; + private String CURRENCY; + //private String PROTOCOL;// + //private String PROTOCOL_USERID;// + private String ID_TYPE; + private String ID; + private String TEL; + private String CUST_USERID; + private String RECKON_ACCOUNT; + private String REMARK; + private String RESERVE1; + private String RESERVE2; + + + public String getREMARK() { + return REMARK; + } + public void setREMARK(String rEMARK) { + REMARK = rEMARK; + } + public String getSN() { + return SN; + } + public void setSN(String sN) { + SN = sN; + } + public String getBANK_CODE() { + return BANK_CODE; + } + public void setBANK_CODE(String bANK_CODE) { + BANK_CODE = bANK_CODE; + } + public String getACCOUNT_TYPE() { + return ACCOUNT_TYPE; + } + public void setACCOUNT_TYPE(String aCCOUNT_TYPE) { + ACCOUNT_TYPE = aCCOUNT_TYPE; + } + public String getACCOUNT_NO() { + return ACCOUNT_NO; + } + public void setACCOUNT_NO(String aCCOUNT_NO) { + ACCOUNT_NO = aCCOUNT_NO; + } + public String getACCOUNT_NAME() { + return ACCOUNT_NAME; + } + public void setACCOUNT_NAME(String aCCOUNT_NAME) { + ACCOUNT_NAME = aCCOUNT_NAME; + } + public String getPROVINCE() { + return PROVINCE; + } + public void setPROVINCE(String pROVINCE) { + PROVINCE = pROVINCE; + } + public String getCITY() { + return CITY; + } + public void setCITY(String cITY) { + CITY = cITY; + } + public String getBANK_NAME() { + return BANK_NAME; + } + public void setBANK_NAME(String bANK_NAME) { + BANK_NAME = bANK_NAME; + } + public String getACCOUNT_PROP() { + return ACCOUNT_PROP; + } + public void setACCOUNT_PROP(String aCCOUNT_PROP) { + ACCOUNT_PROP = aCCOUNT_PROP; + } + public String getAMOUNT() { + return AMOUNT; + } + public void setAMOUNT(String aMOUNT) { + AMOUNT = aMOUNT; + } + public String getCURRENCY() { + return CURRENCY; + } + public void setCURRENCY(String cURRENCY) { + CURRENCY = cURRENCY; + } + public String getID_TYPE() { + return ID_TYPE; + } + public void setID_TYPE(String iD_TYPE) { + ID_TYPE = iD_TYPE; + } + public String getID() { + return ID; + } + public void setID(String iD) { + ID = iD; + } + public String getTEL() { + return TEL; + } + public void setTEL(String tEL) { + TEL = tEL; + } + public String getCUST_USERID() { + return CUST_USERID; + } + public void setCUST_USERID(String cUST_USERID) { + CUST_USERID = cUST_USERID; + } + public String getRECKON_ACCOUNT() { + return RECKON_ACCOUNT; + } + public void setRECKON_ACCOUNT(String rECKON_ACCOUNT) { + RECKON_ACCOUNT = rECKON_ACCOUNT; + } + public String getRESERVE1() { + return RESERVE1; + } + public void setRESERVE1(String rESERVE1) { + RESERVE1 = rESERVE1; + } + public String getRESERVE2() { + return RESERVE2; + } + public void setRESERVE2(String rESERVE2) { + RESERVE2 = rESERVE2; + } + + +} diff --git a/src_tenwa/com/tenwa/collectaudit/cache/Trans_Sum.java b/src_tenwa/com/tenwa/collectaudit/cache/Trans_Sum.java new file mode 100644 index 000000000..961d3ea15 --- /dev/null +++ b/src_tenwa/com/tenwa/collectaudit/cache/Trans_Sum.java @@ -0,0 +1,75 @@ +package com.tenwa.collectaudit.cache; + +/** + * 位于GZELINK--> BODY-->TRANS_SUM 下 + * @author tenwapc + * + */ +public class Trans_Sum { + + private String BUSINESS_CODE; + private String MERCHANT_ID; + private String SUBMIT_TIME; + private String TOTAL_ITEM; + private String EXPECT_SEND_TIME;//预约发送时间 + private String TOTAL_SUM; + private String ID_TYPE; + private String ID; + private String TEL; + + public String getEXPECT_SEND_TIME() { + return EXPECT_SEND_TIME; + } + public void setEXPECT_SEND_TIME(String eXPECT_SEND_TIME) { + EXPECT_SEND_TIME = eXPECT_SEND_TIME; + } + public String getID_TYPE() { + return ID_TYPE; + } + public void setID_TYPE(String iD_TYPE) { + ID_TYPE = iD_TYPE; + } + public String getID() { + return ID; + } + public void setID(String iD) { + ID = iD; + } + public String getTEL() { + return TEL; + } + public void setTEL(String tEL) { + TEL = tEL; + } + public String getBUSINESS_CODE() { + return BUSINESS_CODE; + } + public void setBUSINESS_CODE(String bUSINESS_CODE) { + BUSINESS_CODE = bUSINESS_CODE; + } + public String getMERCHANT_ID() { + return MERCHANT_ID; + } + public void setMERCHANT_ID(String mERCHANT_ID) { + MERCHANT_ID = mERCHANT_ID; + } + public String getSUBMIT_TIME() { + return SUBMIT_TIME; + } + public void setSUBMIT_TIME(String sUBMIT_TIME) { + SUBMIT_TIME = sUBMIT_TIME; + } + public String getTOTAL_ITEM() { + return TOTAL_ITEM; + } + public void setTOTAL_ITEM(String tOTAL_ITEM) { + TOTAL_ITEM = tOTAL_ITEM; + } + public String getTOTAL_SUM() { + return TOTAL_SUM; + } + public void setTOTAL_SUM(String tOTAL_SUM) { + TOTAL_SUM = tOTAL_SUM; + } + +}