From 95eff890b0659a6b42095a3ec94e7cf861251627 Mon Sep 17 00:00:00 2001 From: zhangbb Date: Fri, 23 Oct 2020 16:14:41 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=80=9A=E8=81=94=E4=BA=8C=E6=9C=9F=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BankType/BankTypeConfig4ContractInfo.jsp | 91 +++ .../BankType/BankTypeConfig4ContractList.jsp | 125 ++++ .../OwnConfig/BankType/BankTypeConfigInfo.jsp | 79 ++ .../OwnConfig/BankType/BankTypeConfigList.jsp | 122 ++++ .../Tenwa/Core/quartz/CheckContractNo.jsp | 16 + .../Tenwa/Core/quartz/CheckDateCompare.jsp | 15 + .../Flow/Comm/LBDebitCard/DebitCardInfo.jsp | 675 +++++++++--------- src_sql/view/vi_rent_collect.sql | 2 +- src_sql/view/vi_rent_collect_4_ebank.sql | 2 +- .../tenwa/flow/comm/status/BankCollect.java | 105 +++ .../CustomerAccountCollectTypeModify.java | 70 ++ .../BankCollectTypeAutoChange.java | 99 +++ 12 files changed, 1068 insertions(+), 333 deletions(-) create mode 100644 WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractInfo.jsp create mode 100644 WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractList.jsp create mode 100644 WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp create mode 100644 WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigList.jsp create mode 100644 WebContent/Tenwa/Core/quartz/CheckContractNo.jsp create mode 100644 WebContent/Tenwa/Core/quartz/CheckDateCompare.jsp create mode 100644 src_tenwa/com/tenwa/flow/comm/status/BankCollect.java create mode 100644 src_tenwa/com/tenwa/flow/fund/actualpayment/CustomerAccountCollectTypeModify.java create mode 100644 src_tenwa/com/tenwa/lease/app/quartzmession/BankCollectTypeAutoChange.java diff --git a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractInfo.jsp b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractInfo.jsp new file mode 100644 index 000000000..fc2ed3007 --- /dev/null +++ b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractInfo.jsp @@ -0,0 +1,91 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%> + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info00;Describe=注释区;]~*/%> + +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%> +<% + String PG_TITLE = "银行代收配置"; // 浏览器窗口标题 PG_TITLE +%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%> + + +<% + String rightType = CurPage.getParameter("rightType"); + if(rightType ==null)rightType=""; +%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%> +<% + String sTempletNo = "BankTypeConfig4ContractInfo";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + if(rightType.equals("ReadOnly")){ + dwTemp.ReadOnly = "1";//只读模式 + } + dwTemp.genHTMLObjectWindow(CurPage.getParameter("id")); + CurPage.getCurComp().setAttribute("RightType", rightType); +%> +<%/*~END~*/%> + + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%> +<% +//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"}, + {"true","","Button","返回","返回列表页面","parent.AsDialog.ClosePage()","","","","btn_icon_return"} + }; + sButtonPosition = "south"; +%> +<%/*~END~*/%> + + +<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%> +<%@ include file="/Frame/resources/include/ui/include_info.jspf"%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件-;]~*/%> + +<%/*~END~*/%> + + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractList.jsp b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractList.jsp new file mode 100644 index 000000000..4447ea89e --- /dev/null +++ b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractList.jsp @@ -0,0 +1,125 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%> + + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%> +<% + +%> +<%/*~END~*/%> + + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%> +<% + String PG_TITLE = "银行代收配置"; // 浏览器窗口标题 PG_TITLE +%> +<%/*~END~*/%> + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List02;Describe=定义变量,获取参数;]~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List03;Describe=定义数据对象;]~*/%> +<% + ASObjectModel doTemp = new ASObjectModel("BankTypeConfig4ContractList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(""); +%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%> +<% + String sButtons[][] = { + {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, + //{"true","","Button","详情","详情","view()","","","","btn_icon_detail",""}, + {"true","All","Button","修改","修改","edit()","","","","btn_icon_edit",""}, + {"true","All","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""}, + }; +%> +<%/*~END~*/%> + + + + +<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%> +<%@include file="/Frame/resources/include/ui/include_list.jspf"%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=定义按钮事件;]~*/%> + +<%/*~END~*/%> + + + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%> + +<%/*~END~*/%> + + + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%> + +<%/*~END~*/%> +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp new file mode 100644 index 000000000..eb09bddac --- /dev/null +++ b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp @@ -0,0 +1,79 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%> + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info00;Describe=注释区;]~*/%> + +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info01;Describe=定义页面属性;]~*/%> +<% + String PG_TITLE = "银行代收配置"; // 浏览器窗口标题 PG_TITLE +%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info02;Describe=定义变量,获取参数;]~*/%> + + +<% + String rightType = CurPage.getParameter("rightType"); + if(rightType ==null)rightType=""; +%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info03;Describe=定义数据对象;]~*/%> +<% + String sTempletNo = "BankCollectTypeConfigInfo";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + if(rightType.equals("ReadOnly")){ + dwTemp.ReadOnly = "1";//只读模式 + } + dwTemp.genHTMLObjectWindow(CurPage.getParameter("id")); + CurPage.getCurComp().setAttribute("RightType", rightType); +%> +<%/*~END~*/%> + + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%> +<% +//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"}, + {"true","","Button","返回","返回列表页面","parent.AsDialog.ClosePage()","","","","btn_icon_return"} + }; + sButtonPosition = "south"; +%> +<%/*~END~*/%> + + +<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=Info05;Describe=主体页面;]~*/%> +<%@ include file="/Frame/resources/include/ui/include_info.jspf"%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=Info06;Describe=定义按钮事件-;]~*/%> + +<%/*~END~*/%> + + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigList.jsp b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigList.jsp new file mode 100644 index 000000000..94c49f607 --- /dev/null +++ b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigList.jsp @@ -0,0 +1,122 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%> + + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List00;Describe=注释区;]~*/%> +<% + +%> +<%/*~END~*/%> + + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List01;Describe=定义页面属性;]~*/%> +<% + String PG_TITLE = "银行代收配置"; // 浏览器窗口标题 PG_TITLE +%> +<%/*~END~*/%> + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List02;Describe=定义变量,获取参数;]~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List03;Describe=定义数据对象;]~*/%> +<% + ASObjectModel doTemp = new ASObjectModel("BankCollectTypeConfigList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(""); +%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=List04;Describe=定义按钮;]~*/%> +<% + String sButtons[][] = { + {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, + //{"true","","Button","详情","详情","view()","","","","btn_icon_detail",""}, + {"true","All","Button","修改","修改","edit()","","","","btn_icon_edit",""}, + {"true","All","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""}, + }; +%> +<%/*~END~*/%> + + + + +<%/*~BEGIN~不可编辑区~[Editable=false;CodeAreaID=List05;Describe=主体页面;]~*/%> +<%@include file="/Frame/resources/include/ui/include_list.jspf"%> +<%/*~END~*/%> + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List06;Describe=定义按钮事件;]~*/%> + +<%/*~END~*/%> + + + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%> + +<%/*~END~*/%> + + + + +<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%> + +<%/*~END~*/%> +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Core/quartz/CheckContractNo.jsp b/WebContent/Tenwa/Core/quartz/CheckContractNo.jsp new file mode 100644 index 000000000..0845399b8 --- /dev/null +++ b/WebContent/Tenwa/Core/quartz/CheckContractNo.jsp @@ -0,0 +1,16 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/IncludeBeginMDAJAX.jsp"%><% + String contractNo = CurPage.getParameter("contractNo"); + + String sReturn = "None"; + String contractId = Sqlca.getString("select id from lb_contract_info where contract_no='"+contractNo+"'"); + if(contractId != null){ + sReturn = contractId; + String bankCode = Sqlca.getString("select bank_code from customer_account where contract_id='"+contractId+"'"); + if(bankCode==null||"".equals(bankCode)){ + sReturn = "refuse"; + } + } + + out.println(sReturn); +%><%@ include file="/IncludeEndAJAX.jsp"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Core/quartz/CheckDateCompare.jsp b/WebContent/Tenwa/Core/quartz/CheckDateCompare.jsp new file mode 100644 index 000000000..0e16b2aa4 --- /dev/null +++ b/WebContent/Tenwa/Core/quartz/CheckDateCompare.jsp @@ -0,0 +1,15 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@page import="com.amarsoft.app.als.sys.tools.DateUtil"%> +<%@ include file="/IncludeBeginMDAJAX.jsp"%><% + String sReturn = "success"; + String startDate = CurPage.getParameter("startDate"); + String endDate = CurPage.getParameter("endDate"); + String curDate = DateUtil.getToday(); + if(startDate.compareTo(curDate)<0){ + sReturn = "起始日期不能小于当前日期"; + } + if(startDate.compareTo(endDate)>0){ + sReturn = "起始日期不能大于结束日期"; + } + out.println(sReturn); +%><%@ include file="/IncludeEndAJAX.jsp"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp index b08778e08..5c86f377a 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp @@ -1,331 +1,344 @@ -<%@ page contentType="text/html; charset=GBK"%> -<%@page import="jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST"%> -<%@ include file="/Frame/resources/include/include_begin_info.jspf"%> -<% - /* - Author: undefined 2017-07-10 - Content: 示例详情页面 - History Log: - */ - String userId = CurUser.getUserID(); - String orgId = CurUser.getOrgID(); - String projectId = CurPage.getParameter("ProjectId"); - String customerId = CurPage.getParameter("customerId"); - String contractId = CurPage.getParameter("ContractId"); - String sPrevUrl = CurPage.getParameter("PrevUrl"); - if(sPrevUrl == null) sPrevUrl = ""; - String RightType=CurPage.getParameter("RightType"); - String ishistory=CurPage.getParameter("IsHistory"); - String FlowUnid=CurPage.getParameter("FlowUnid"); - String flowName=CurPage.getParameter("FlowName"); - String CustomerType=CurPage.getParameter("CustomerType"); - String ApplyType=CurPage.getParameter("ApplyType"); - String PhaseNo=CurPage.getParameter("PhaseNo"); - BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); - BizObject ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and ( flow_unid=:flowunid or contract_id=:contractid ) ").setParameter("flowunid", FlowUnid).setParameter("contractid", contractId).getSingleResult(false); - System.out.print("=========="+ldcls+"=========="); - /* System.out.print("\n\n\n\t--FlowUnid "+FlowUnid+"\t\n\n\n"); */ - String sTempletNo = "DebitCardInfo";//--模板号-- - if("合同制作流程".equals(flowName)||"合同变更流程".equals(flowName)){ - sTempletNo = "DebitCardInfoMcontract";//--模板号-- - } - ASObjectModel doTemp = new ASObjectModel(sTempletNo); - //doTemp.setColTips("", "测试"); - doTemp.setHtmlEvent("acc_number", "onchange", "getNameOfBank"); - if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){ - doTemp.setColInnerBtEvent("ACCOUNT", ""); - } - //doTemp.setHtmlEvent("MOBILE", "onchange", "checkMobile"); - ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); - dwTemp.Style = "2";//freeform - if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){ - dwTemp.ReadOnly = "-2";//只读模式 - } - if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ - dwTemp.ReadOnly = "-2";//只读模式 - RightType="ReadOnly"; - isShowButton=false; - }else{ - isShowButton=true; - } - if("合同制作流程".equals(flowName)||"合同变更流程".equals(flowName)){ - dwTemp.genHTMLObjectWindow(projectId); - }else{ - dwTemp.genHTMLObjectWindow(FlowUnid); - } - dwTemp.replaceColumn("PaymentCard", "", CurPage.getObjectWindowOutput()); - dwTemp.replaceColumn("S_PaymentCard", "", CurPage.getObjectWindowOutput()); - - String sButtons[][] = { - {"true","","Button","保存","保存所有修改","save()","","","",""}, - {"false","All","Button","校验银行卡信息","校验银行卡四要素","verifyFourelementBank()","","","","btn_icon_return"} - } - /* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} - } */; - sButtonPosition = "north"; -%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> - -<%@ include file="/Frame/resources/include/include_end.jspf"%> +<%@ page contentType="text/html; charset=GBK"%> +<%@page import="jbo.app.tenwa.doc.LB_DOC_CONTRACT_LIST"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%> +<% + /* + Author: undefined 2017-07-10 + Content: 示例详情页面 + History Log: + */ + String userId = CurUser.getUserID(); + String orgId = CurUser.getOrgID(); + String projectId = CurPage.getParameter("ProjectId"); + String customerId = CurPage.getParameter("customerId"); + String contractId = CurPage.getParameter("ContractId"); + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = ""; + String RightType=CurPage.getParameter("RightType"); + String ishistory=CurPage.getParameter("IsHistory"); + String FlowUnid=CurPage.getParameter("FlowUnid"); + String flowName=CurPage.getParameter("FlowName"); + String ccc=CurPage.getParameter("FlowNo"); + String CustomerType=CurPage.getParameter("CustomerType"); + String ApplyType=CurPage.getParameter("ApplyType"); + String PhaseNo=CurPage.getParameter("PhaseNo"); + BizObjectManager ldclManager = JBOFactory.getBizObjectManager(LB_DOC_CONTRACT_LIST.CLASS_NAME); + BizObject ldcls = ldclManager.createQuery("select * from O where file_flag='yes' and ( flow_unid=:flowunid or contract_id=:contractid ) ").setParameter("flowunid", FlowUnid).setParameter("contractid", contractId).getSingleResult(false); + System.out.print("=========="+ldcls+"=========="); + /* System.out.print("\n\n\n\t--FlowUnid "+FlowUnid+"\t\n\n\n"); */ + String sTempletNo = "DebitCardInfo";//--模板号-- + if("合同制作流程".equals(flowName)||"合同变更流程".equals(flowName)){ + sTempletNo = "DebitCardInfoMcontract";//--模板号-- + } + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + //doTemp.setColTips("", "测试"); + doTemp.setHtmlEvent("acc_number", "onchange", "getNameOfBank"); + if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){ + doTemp.setColInnerBtEvent("ACCOUNT", ""); + } + //doTemp.setHtmlEvent("MOBILE", "onchange", "checkMobile"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + if(PhaseNo.equals("0030")||PhaseNo.equals("0040")||PhaseNo.equals("0050")){ + dwTemp.ReadOnly = "-2";//只读模式 + } + if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){ + dwTemp.ReadOnly = "-2";//只读模式 + RightType="ReadOnly"; + isShowButton=false; + }else{ + isShowButton=true; + } + if("合同制作流程".equals(flowName)||"合同变更流程".equals(flowName)){ + dwTemp.genHTMLObjectWindow(projectId); + }else{ + dwTemp.genHTMLObjectWindow(FlowUnid); + } + dwTemp.replaceColumn("PaymentCard", "", CurPage.getObjectWindowOutput()); + dwTemp.replaceColumn("S_PaymentCard", "", CurPage.getObjectWindowOutput()); + + String sButtons[][] = { + {"true","","Button","保存","保存所有修改","save()","","","",""}, + {"false","All","Button","校验银行卡信息","校验银行卡四要素","verifyFourelementBank()","","","","btn_icon_return"} + } + /* {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} + } */; + sButtonPosition = "north"; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> diff --git a/src_sql/view/vi_rent_collect.sql b/src_sql/view/vi_rent_collect.sql index 9e1231640..372d5326f 100644 --- a/src_sql/view/vi_rent_collect.sql +++ b/src_sql/view/vi_rent_collect.sql @@ -1,4 +1,4 @@ -create view as ( +create view vi_rent_collect as ( SELECT `lrp`.`ID` AS `id`, `lci`.`ID` AS `contract_id`, diff --git a/src_sql/view/vi_rent_collect_4_ebank.sql b/src_sql/view/vi_rent_collect_4_ebank.sql index 803462971..dd6a2f6b2 100644 --- a/src_sql/view/vi_rent_collect_4_ebank.sql +++ b/src_sql/view/vi_rent_collect_4_ebank.sql @@ -1,4 +1,4 @@ -create view as ( +create view vi_rent_collect_4_ebank as ( SELECT `lrp`.`ID` AS `id`, `lci`.`ID` AS `contract_id`, diff --git a/src_tenwa/com/tenwa/flow/comm/status/BankCollect.java b/src_tenwa/com/tenwa/flow/comm/status/BankCollect.java new file mode 100644 index 000000000..247390443 --- /dev/null +++ b/src_tenwa/com/tenwa/flow/comm/status/BankCollect.java @@ -0,0 +1,105 @@ +package com.tenwa.flow.comm.status; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import jbo.app.tenwa.calc.LC_CALC_CONDITION; +import jbo.app.tenwa.calc.LC_CALC_CONDITION_STATUS; +import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP; +import jbo.app.tenwa.calc.LC_CASH_FLOW; +import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; +import jbo.app.tenwa.calc.LC_RENT_PLAN; +import jbo.app.tenwa.calc.LC_RENT_PLAN_SP; +import jbo.app.tenwa.calc.LC_RENT_PLAN_SP_TEMP; +import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; +import jbo.loan.BANK_COLLECT_TYPE_CONFIG; + +import com.amarsoft.app.als.sys.tools.DateUtil; +import com.amarsoft.app.awe.config.InitDBType; +import com.amarsoft.app.util.ProductParamUtil; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.reckon.executor.CreateTransactionExecutor; +/** + * 根据配置信息修改银行扣款方式 + * @author zhangbeibei + * + */ + +public class BankCollect { + private String contractId; + private String collectType; + private String startDate; + private String endDate; + + public void customerAccountCollectTypeModify(JBOTransaction tx) throws Exception{ + BizObjectManager bomCA = JBOFactory.getBizObjectManager(CUSTOMER_ACCOUNT.CLASS_NAME,tx); + if(contractId!=null||!"".equals(contractId)){ + BizObject boCA = bomCA.createQuery("contract_id=:contract_id").setParameter("contract_id", contractId).getSingleResult(true); + if(boCA.getAttribute("bank_code")!=null&&!"".equals(boCA.getAttribute("bank_code").toString())){ + bomCA.createQuery("update O,jbo.loan.BANK_COLLECT_TYPE_CONFIG bctc set O.collect_type=bctc.collect_type where O.bank_code=bctc.bank_code and O.contract_id=:contract_id") + .setParameter("contract_id", contractId).executeUpdate(); + } + //如果没有指定的方式,则默认是银联 + if(boCA.getAttribute("collect_type")==null||"".equals(boCA.getAttribute("collect_type").toString())){ + boCA.setAttributeValue("collect_type", "YLcollect"); + bomCA.saveObject(boCA); + } + } + } + + public String changeContractCollectTypeDo(JBOTransaction tx) throws Exception{ + //注意时间格式统一 + String curDate = DateUtil.getToday(); + //如果配置的时间小于等于当前时间,则立即改变状态,否则,按银行配置重新配置(防止先改当前日期,后改大于当前日期) + if(curDate.compareTo(startDate)>=0){ + this.changeContractCollectType(tx,contractId,collectType); + }else{ + this.customerAccountCollectTypeModify(tx); + } + return ""; + } + public void changeContractCollectType(JBOTransaction tx,String contractId,String collectType) throws JBOException{ + BizObjectManager bomCA = JBOFactory.getBizObjectManager(CUSTOMER_ACCOUNT.CLASS_NAME,tx); + BizObject boCA = bomCA.createQuery("contract_id=:contract_id").setParameter("contract_id", contractId).getSingleResult(true); + boCA.setAttributeValue("collect_type", collectType); + bomCA.saveObject(boCA); + } + public String getContractId() { + return contractId; + } + public void setContractId(String contractId) { + this.contractId = contractId; + } + public String getCollectType() { + return collectType; + } + public void setCollectType(String collectType) { + this.collectType = collectType; + } + public String getStartDate() { + return startDate; + } + public void setStartDate(String startDate) { + this.startDate = startDate; + } + public String getEndDate() { + return endDate; + } + public void setEndDate(String endDate) { + this.endDate = endDate; + } +} diff --git a/src_tenwa/com/tenwa/flow/fund/actualpayment/CustomerAccountCollectTypeModify.java b/src_tenwa/com/tenwa/flow/fund/actualpayment/CustomerAccountCollectTypeModify.java new file mode 100644 index 000000000..69326f48e --- /dev/null +++ b/src_tenwa/com/tenwa/flow/fund/actualpayment/CustomerAccountCollectTypeModify.java @@ -0,0 +1,70 @@ +package com.tenwa.flow.fund.actualpayment; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import jbo.app.tenwa.calc.LC_CALC_CONDITION; +import jbo.app.tenwa.calc.LC_CALC_CONDITION_STATUS; +import jbo.app.tenwa.calc.LC_CALC_CONDITION_TEMP; +import jbo.app.tenwa.calc.LC_CASH_FLOW; +import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; +import jbo.app.tenwa.calc.LC_RENT_PLAN; +import jbo.app.tenwa.calc.LC_RENT_PLAN_SP; +import jbo.app.tenwa.calc.LC_RENT_PLAN_SP_TEMP; +import jbo.app.tenwa.customer.CUSTOMER_ACCOUNT; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; +import jbo.loan.BANK_COLLECT_TYPE_CONFIG; + +import com.amarsoft.app.awe.config.InitDBType; +import com.amarsoft.app.util.ProductParamUtil; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.util.SqlObject; +import com.amarsoft.awe.util.Transaction; +import com.tenwa.comm.util.jboutil.DataOperatorUtil; +import com.tenwa.flow.baseBussion.BaseBussiness; +import com.tenwa.reckon.executor.CreateTransactionExecutor; +/** + * 实际付款申请通过后,根据配置信息修改银行扣款方式 + * @author zhangbeibei + * + */ + +public class CustomerAccountCollectTypeModify extends BaseBussiness{ + public Object run(Transaction Sqlca) throws Exception{ + this.initBussinessParam(Sqlca.getTransaction()); + JBOTransaction tx=null; + tx = Sqlca.getTransaction(); + String sFlowUnid = (String)this.getAttribute("ObjectNo"); + BizObjectManager bomLFIT = JBOFactory.getBizObjectManager(LC_FUND_INCOME_TEMP.CLASS_NAME,tx); + BizObjectManager bomCA = JBOFactory.getBizObjectManager(CUSTOMER_ACCOUNT.CLASS_NAME,tx); + List boLFITs = bomLFIT.createQuery("flowunid=:flowunid and pay_status<>'apply_return' and ebank_status='05'").setParameter("flowunid", sFlowUnid).getResultList(false); + for(BizObject bo:boLFITs){ + if(bo.getAttribute("CONTRACT_ID")!=null&&!"".equals(bo.getAttribute("CONTRACT_ID").toString())){ + String contractId = bo.getAttribute("CONTRACT_ID").toString(); + BizObject boCA = bomCA.createQuery("contract_id=:contract_id").setParameter("contract_id", contractId).getSingleResult(true); + if(boCA.getAttribute("bank_code")!=null&&!"".equals(boCA.getAttribute("bank_code").toString())){ + bomCA.createQuery("update O,jbo.loan.BANK_COLLECT_TYPE_CONFIG bctc set O.collect_type=bctc.collect_type where O.bank_code=bctc.bank_code and O.contract_id=:contract_id") + .setParameter("contract_id", contractId).executeUpdate(); + } + //如果没有指定的方式,则默认是银联 + if(boCA.getAttribute("collect_type")==null||"".equals(boCA.getAttribute("collect_type").toString())){ + boCA.setAttributeValue("collect_type", "YLcollect"); + bomCA.saveObject(boCA); + } + } + + } + + String sMessage="true"; + return sMessage; + } + +} diff --git a/src_tenwa/com/tenwa/lease/app/quartzmession/BankCollectTypeAutoChange.java b/src_tenwa/com/tenwa/lease/app/quartzmession/BankCollectTypeAutoChange.java new file mode 100644 index 000000000..8bd28114d --- /dev/null +++ b/src_tenwa/com/tenwa/lease/app/quartzmession/BankCollectTypeAutoChange.java @@ -0,0 +1,99 @@ +package com.tenwa.lease.app.quartzmession; + + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import jbo.app.tenwa.calc.LC_FUND_INCOME_TEMP; +import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT; +import jbo.com.tenwa.lease.comm.LC_FUND_INCOME_CALLBACK_DETAIL_TEMP; +import jbo.loan.BANK_COLLEC_TYPET_4_CONTRACT; + +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; + +import com.amarsoft.app.als.sys.tools.DateUtil; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.BizObjectManager; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.util.StringFunction; +import com.amarsoft.awe.Configure; +import com.base.util.QuartzUtil; +import com.tenwa.flow.comm.status.BankCollect; +import com.tenwa.sdk.VO.SDKCheckPayDateBackVO; +import com.tenwa.sdk.VO.SDKCheckPayDateDetail; +import com.tenwa.sdk.VO.SDKInfoVO; +import com.tenwa.sdk.VO.SDKToCheckPayDate; +import com.tenwa.sdk.VO.SDKTsinfx; +import com.tenwa.sdk.utils.HttpRequest; +import com.tenwa.sdk.utils.XMLStream; +import com.thoughtworks.xstream.XStream; + + + +/** + * 扣款方式自动变更 + * @author zhangbeibei + */ +public class BankCollectTypeAutoChange implements Job{ + + public void execute(JobExecutionContext arg0) throws JobExecutionException { + JBOTransaction tx=null; + String startime = StringFunction.getTodayNow(); + Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId"); + String curUserId = userId == null? "system" : userId.toString(); + BankCollect bc = new BankCollect(); + try{ + tx = JBOFactory.createJBOTransaction(); + BizObjectManager bomBCT4C = JBOFactory.getBizObjectManager(BANK_COLLEC_TYPET_4_CONTRACT.CLASS_NAME, tx); + //执行起始日期改变 + String curDate = DateUtil.getToday(); + List bosBCT4C = bomBCT4C.createQuery(" O.start_date=:curDate ").setParameter("curDate", curDate).getResultList(false); + if(bosBCT4C!=null&&bosBCT4C.size()>0){ + for(BizObject bo :bosBCT4C){ + String contractId = bo.getAttribute("contract_id").toString(); + String collectType = bo.getAttribute("collect_type").toString(); + bc.setContractId(contractId); + bc.setContractId(collectType); + bc.changeContractCollectType(tx,contractId, collectType); + } + } + //执行结束日期的状态改变 + Calendar c = Calendar.getInstance(); + c.add(Calendar.DAY_OF_MONTH, -1); + String shouldDate = new SimpleDateFormat("yyyy/MM/dd").format(c.getTime()); + List bosBCT4Cend = bomBCT4C.createQuery(" O.end_date=:shouldDate ").setParameter("shouldDate", shouldDate).getResultList(false); + if(bosBCT4Cend!=null&&bosBCT4Cend.size()>0){ + for(BizObject boe :bosBCT4Cend){ + String contractId = boe.getAttribute("contract_id").toString(); + bc.setContractId(contractId); + bc.customerAccountCollectTypeModify(tx); + } + } + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SelectActualPaymentDate", "success", "成功", curUserId); + }catch(Exception e){ + QuartzUtil.insertLog(startime,"com.tenwa.lease.app.quartzmession.SelectActualPaymentDate", "error", "失败", curUserId); + try { + tx.rollback(); + } catch (JBOException e1) { + e1.printStackTrace(); + } + e.printStackTrace(); + }finally { + if(tx!=null) { + try { + tx.commit(); + } catch (JBOException e) { + e.printStackTrace(); + } + } + } + } + +}