1.通联二期功能补充
This commit is contained in:
parent
3911abf900
commit
95eff890b0
@ -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 = "银行代收配置"; // 浏览器窗口标题 <title> PG_TITLE </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=定义按钮事件-;]~*/%>
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=保存记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function saveRecord(){
|
||||
var startDate = getItemValue(0, 0, "start_date");
|
||||
var endDate = getItemValue(0, 0, "end_date");
|
||||
var collectType = getItemValue(0, 0, "collect_type");
|
||||
var dateReturn = AsControl.RunJsp("/Tenwa/Core/quartz/CheckDateCompare.jsp","startDate="+startDate+"&endDate="+endDate);
|
||||
if(dateReturn!="success"){
|
||||
alert(dateReturn);
|
||||
return;
|
||||
}
|
||||
var contractNo = getItemValue(0, 0, "contract_no");
|
||||
var sReturn = AsControl.RunJsp("/Tenwa/Core/quartz/CheckContractNo.jsp","contractNo="+contractNo);
|
||||
if(sReturn=="None"){
|
||||
alert("合同号不存在!");
|
||||
return;
|
||||
}else if(sReturn=="refuse"){
|
||||
alert("此合同号为历史数据,不允许变更!");
|
||||
return;
|
||||
}
|
||||
var contractId = sReturn;
|
||||
setItemValue(0, 0, "contract_id", contractId);
|
||||
var sParams = "contractId="+contractId+",startDate="+startDate+",collectType="+collectType;
|
||||
var result = RunJavaMethodTrans("com.tenwa.flow.comm.status.BankCollect", "changeContractCollectTypeDo",sParams );
|
||||
as_save("myiframe0","parent.AsDialog.ClosePage()");
|
||||
}
|
||||
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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 = "银行代收配置"; // 浏览器窗口标题 <title> PG_TITLE </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=定义按钮事件;]~*/%>
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractInfo.jsp";
|
||||
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"新增银行配置");
|
||||
}
|
||||
|
||||
|
||||
/*~[Describe=详情;InputParam=无;OutPutParam=无;]~*/
|
||||
function view(){
|
||||
var sUrl = "/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractInfo.jsp";
|
||||
var id = getItemValue(0,getRow(0),'id');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'id='+id+'&rightType=ReadOnly',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"银行配置详情");
|
||||
}
|
||||
|
||||
|
||||
function edit(){
|
||||
var sUrl = "/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfig4ContractInfo.jsp";
|
||||
var id = getItemValue(0,getRow(0),'id');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'id='+id,"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"修改银行配置");
|
||||
}
|
||||
|
||||
function deleteRecord(){
|
||||
var id = getItemValue(0,getRow(),'id');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
if(confirm('确实要删除吗?')){
|
||||
var contractId = getItemValue(0,getRow(0),'contract_id');
|
||||
var sParams = "contractId="+contractId;
|
||||
var result = RunJavaMethodTrans("com.tenwa.flow.comm.status.BankCollect", "customerAccountCollectTypeModify",sParams );
|
||||
as_delete(0,'');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
|
||||
|
||||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
|
||||
|
||||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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 = "银行代收配置"; // 浏览器窗口标题 <title> PG_TITLE </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=定义按钮事件-;]~*/%>
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=保存记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function saveRecord(){
|
||||
as_save("myiframe0","parent.AsDialog.ClosePage()");
|
||||
}
|
||||
function selectBankType(){
|
||||
AsDialog.OpenSelector("selectBankType","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"){
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,0,'bank_code',sReturn[0]);
|
||||
setItemValue(0,0,'bank_name',sReturn[1]);
|
||||
},"选择银行名称");
|
||||
}
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -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 = "银行代收配置"; // 浏览器窗口标题 <title> PG_TITLE </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=定义按钮事件;]~*/%>
|
||||
<script type="text/javascript">
|
||||
/*~[Describe=新增记录;InputParam=无;OutPutParam=无;]~*/
|
||||
function newRecord(){
|
||||
var sUrl = "/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp";
|
||||
AsDialog.PopView(sUrl,'',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"新增银行配置");
|
||||
}
|
||||
|
||||
|
||||
/*~[Describe=详情;InputParam=无;OutPutParam=无;]~*/
|
||||
function view(){
|
||||
var sUrl = "/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp";
|
||||
var id = getItemValue(0,getRow(0),'id');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'id='+id+'&rightType=ReadOnly',"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"银行配置详情");
|
||||
}
|
||||
|
||||
|
||||
function edit(){
|
||||
var sUrl = "/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp";
|
||||
var id = getItemValue(0,getRow(0),'id');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
AsDialog.PopView(sUrl,'id='+id,"resizable=yes;dialogWidth=800px;dialogHeight=300px;center:yes;status:no;statusbar:no",function(){
|
||||
reloadSelf();
|
||||
},"修改银行配置");
|
||||
}
|
||||
|
||||
function deleteRecord(){
|
||||
var id = getItemValue(0,getRow(),'id');
|
||||
if(typeof(id)=="undefined" || id.length==0 ){
|
||||
alert("请选择一条信息!");
|
||||
return ;
|
||||
}
|
||||
if(confirm('确实要删除吗?')){
|
||||
as_delete(0,'');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
|
||||
|
||||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List07;Describe=自定义函数;]~*/%>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
|
||||
|
||||
|
||||
|
||||
<%/*~BEGIN~可编辑区~[Editable=false;CodeAreaID=List08;Describe=页面装载时,进行初始化;]~*/%>
|
||||
<script type="text/javascript">
|
||||
|
||||
</script>
|
||||
<%/*~END~*/%>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
16
WebContent/Tenwa/Core/quartz/CheckContractNo.jsp
Normal file
16
WebContent/Tenwa/Core/quartz/CheckContractNo.jsp
Normal file
@ -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"%>
|
||||
15
WebContent/Tenwa/Core/quartz/CheckDateCompare.jsp
Normal file
15
WebContent/Tenwa/Core/quartz/CheckDateCompare.jsp
Normal file
@ -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"%>
|
||||
@ -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"%>
|
||||
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/bankBin.js"></script><%
|
||||
/*
|
||||
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", "<iframe type='iframe' name=\"frame_list\" width=\"100%\" height=\"120\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBDebitCard/PaymentCardInfo.jsp?FlowUnid="+FlowUnid+"&RightType="+RightType+"&ishistory="+ishistory+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
dwTemp.replaceColumn("S_PaymentCard", "<iframe type='iframe' name=\"frame_lists\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBDebitCard/S_PaymentCardInfo.jsp?FlowUnid="+FlowUnid+"&RightType="+RightType+"&ishistory="+ishistory+"&CompClientID="+sCompClientID+"\"></iframe>", 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"%>
|
||||
<script type="text/javascript">
|
||||
|
||||
//根据选择的用户名选择对应的证件号
|
||||
function autoSetCustId(){
|
||||
var param1 = "";
|
||||
var param2 = "";
|
||||
if('AccountChangeApply'=='<%=ApplyType%>'){
|
||||
param1 = "selectAccountForChange";
|
||||
param2 = "ProjectId,<%=projectId%>,customerType,<%=CustomerType%>,ProjectId,<%=projectId%>,CustomerId,<%=customerId%>";
|
||||
}else{
|
||||
param1 = "selectAccountByCusts";
|
||||
param2 = "flowunid,<%=FlowUnid%>";
|
||||
}
|
||||
param2=param2+",customerType,"+"<%=CustomerType%>";
|
||||
AsDialog.OpenSelector(param1,param2,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"){
|
||||
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,0,'CERTID',sReturn[0]);
|
||||
setItemValue(0,0,'ACCOUNT',sReturn[1]);
|
||||
setItemValue(0,0,'CUSTTYPE',sReturn[2]);
|
||||
setItemValue(0,0,'MOBILE',sReturn[3]);
|
||||
},"选择扣款卡名称");
|
||||
}
|
||||
function checkMobile(){
|
||||
if("<%=CustomerType%>"=="03"){//校验自然人扣款卡信息手机号是否是申请人或共同申请人
|
||||
var customerType = "03";
|
||||
var mobile = getItemValue(0,getRow(),"MOBILE");
|
||||
var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=FlowUnid%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkDebitCardMobile",sParams);
|
||||
if(sReturnInfo=="10"){
|
||||
alert("预留手机号不是申请人手机号或共同申请人手机号!");
|
||||
}
|
||||
return sReturnInfo;
|
||||
}else if("<%=CustomerType%>"=="01"){//校验法人扣款卡信息手机号是否是担保人或共同申请人
|
||||
var customerType = "01";
|
||||
var mobile = getItemValue(0,getRow(),"MOBILE");
|
||||
var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=FlowUnid%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkDebitCardMobile",sParams);
|
||||
if(sReturnInfo=="10"){
|
||||
alert("预留手机号不是担保人手机号或共同申请人手机号!");
|
||||
}
|
||||
return sReturnInfo;
|
||||
}
|
||||
}
|
||||
|
||||
function checkTel(){//校验预留手机号格式
|
||||
var mobile = getItemValue(0,getRow(0),"MOBILE");
|
||||
if(mobile==""){
|
||||
//setErrorTips("mobile","手机号不能为空!");
|
||||
// alert("预留手机号不能为空!");
|
||||
return true;
|
||||
}
|
||||
var phone = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/;
|
||||
if(phone.test(mobile)){
|
||||
setErrorTips("MOBILE","");
|
||||
return true;
|
||||
}else{
|
||||
setErrorTips("MOBILE","手机号格式不正确!");
|
||||
return false;
|
||||
}
|
||||
/* if(CheckPhoneCode(mobile)){
|
||||
return true;
|
||||
}else{
|
||||
//setErrorTips("mobile","手机号格式不正确!");
|
||||
alert("预留手机号格式不正确!");
|
||||
return false;
|
||||
} */
|
||||
}
|
||||
|
||||
function save(){
|
||||
var TelRes=checkTel();
|
||||
if(TelRes==false){
|
||||
return;
|
||||
}
|
||||
setItemValue(0,0,"flowunid","<%=FlowUnid%>");
|
||||
setItemValue(0,0,"acc_type","Debit");
|
||||
var res=true;
|
||||
if('BusinessApplyApply'=='<%=ApplyType%>'){
|
||||
res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "getCustIdByFlowunid", "FlowUnid=<%=FlowUnid%>");
|
||||
var strarry=res.split(",");
|
||||
var customerid=strarry[0];
|
||||
var projectid=strarry[1];
|
||||
var contractid=strarry[2];
|
||||
if(res=="false"){
|
||||
alert("请先填写个人基本信息!");
|
||||
return;
|
||||
}
|
||||
|
||||
var contract_id= getItemValue(0,0,"contract_id");
|
||||
if(null!=contract_id&&contract_id!=""){
|
||||
contractid=contract_id;
|
||||
}
|
||||
setItemValue(0,0,"customerid",customerid);
|
||||
setItemValue(0,0,"project_id",projectid);
|
||||
if(contractid==""||contractid=="null"||contractid==null){
|
||||
setItemValue(0,0,"contract_id","");
|
||||
}else{
|
||||
setItemValue(0,0,"contract_id",contractid);
|
||||
}
|
||||
}
|
||||
var project_id = getItemValue(0,0,"project_id");
|
||||
//校验对应的扣款卡是否签约,如果签约
|
||||
RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkAccountSignStatus", "projectid="+project_id+",userId=<%=userId%>,orgId=<%=orgId%>");
|
||||
if("BusinessApplyApply"=="<%=ApplyType%>"||"BusinessChangeApply"=="<%=ApplyType%>"||"BContractApproveApply"=="<%=ApplyType%>"||"BContractChangeApply"=="<%=ApplyType%>"){
|
||||
var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>,certId="+getItemValue(0,getRow(),"CERTID")+",applyType=<%=ApplyType%>";
|
||||
var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams);
|
||||
if("false"==meassge){
|
||||
alert("合同已生成,请先删除合同再修改扣款卡信息!");
|
||||
return ;
|
||||
}else if("Y"==meassge){
|
||||
setItemValue(0,0,"sign_status","Y");
|
||||
}else if("N"==meassge){
|
||||
setItemValue(0,0,"sign_status","");
|
||||
}
|
||||
}
|
||||
|
||||
iV_all("0");
|
||||
setItemValue(0,0,"ACC_NUMBER",allTrim(getItemValue(0,0,"ACC_NUMBER")));
|
||||
var flowName="<%=flowName%>";
|
||||
if("业务变更流程"==flowName||"合同制作流程"==flowName || "合同变更流程"==flowName){
|
||||
// 判断是否变更, 如果变更了, 将变更内容插入中间表
|
||||
var account = getItemValue(0,0,"account"); // 账户名称
|
||||
var acc_number = getItemValue(0,0,"acc_number"); // 银行账号
|
||||
var bank_name = getItemValue(0,0,"bank_name"); // 开户银行
|
||||
var MOBILE = getItemValue(0,0,"MOBILE"); // 预留手机号
|
||||
var project_id = getItemValue(0,0,"project_id"); // 项目id
|
||||
var contract_id = getItemValue(0,0,"contract_id");// 预留手机号
|
||||
var sign_status = getItemValue(0,0,"sign_status");// 签约信息
|
||||
var flowunid = "<%=FlowUnid%>" ;
|
||||
|
||||
var sparams ="FlowUnid="+flowunid+",account="+account+",acc_number="+acc_number+",bank_name="+bank_name+",mobile="+MOBILE+",projectid="+project_id+",contractid="+contract_id+",sign_status="+sign_status+"";
|
||||
var result = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "savaCustomerAccountTomiddle", sparams);
|
||||
if("true"==result){
|
||||
as_save("0","re");
|
||||
}else{
|
||||
alert("保存失败, 请联系管理员 !");
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
as_save("0","re");
|
||||
}
|
||||
}
|
||||
function re(){
|
||||
var param="CompClientID=<%=sCompClientID%>&FlowUnid=<%=FlowUnid%>&RightType=<%=RightType%>&ishistory=<%=ishistory%>";
|
||||
AsControl.OpenView("/Tenwa/Lease/Flow/Comm/LBDebitCard/PaymentCardInfo.jsp",param,"frame_list");
|
||||
}
|
||||
|
||||
function CheckBank_name(){
|
||||
var bank_name=getItemValue(0, getRow(0), "bank_name");
|
||||
if(bank_name==null||bank_name==""){
|
||||
setErrorTips("bank_name","请输入开户银行!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("bank_name","");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function CheckAccount(){
|
||||
var account=getItemValue(0, getRow(0), "account");
|
||||
if(account==null||account==""){
|
||||
setErrorTips("account","请输入账户名称!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("account","");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* 银行账号格式校验 */
|
||||
function CheckAcc_number(){
|
||||
var acc=getItemValue(0, getRow(0), "acc_number");
|
||||
if(acc!=null&&acc!=""){
|
||||
/* var reg = /^(\d{16}|\d{19})$/;
|
||||
if(!reg.test(acc)){
|
||||
setErrorTips("acc_number","银行账号格式错误!");
|
||||
return false;
|
||||
}else{ */
|
||||
setErrorTips("acc_number","");
|
||||
return true;
|
||||
|
||||
}else{
|
||||
setErrorTips("acc_number","请输入银行账号!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
function getNameOfBank(){
|
||||
var sflag=-1;
|
||||
var number=getItemValue(0, getRow(0), "acc_number");
|
||||
/* var reg = /^(\d{14}|\d{16}|\d{19})$/;
|
||||
if(!reg.test(number)){
|
||||
setErrorTips("acc_number","银行账号格式错误!");
|
||||
return false;
|
||||
}else{ */
|
||||
var cardbin = number.substring(0, 6);
|
||||
for (var i=0;i<bankBin.length;i++) {
|
||||
if(cardbin==bankBin[i]){
|
||||
sflag = i;
|
||||
}
|
||||
}
|
||||
if (sflag != -1) {
|
||||
var name=bankName[sflag].substring(0,bankName[sflag].indexOf("·"));
|
||||
setItemValue(0,getRow(),"bank_name",name);
|
||||
}
|
||||
setErrorTips("acc_number","");
|
||||
return true;
|
||||
}
|
||||
//校验银行卡四要素
|
||||
function verifyFourelementBank(){
|
||||
var parm = "FlowUnid=<%=FlowUnid%>";
|
||||
var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "verifyFourelementBank", parm);
|
||||
if (res == "ERROR") {
|
||||
alert("校验失败");
|
||||
}else if(res == 'SUCCESS'){
|
||||
alert('校验完成');
|
||||
reloadSelf();
|
||||
}else{
|
||||
alert(res);
|
||||
}
|
||||
}
|
||||
//提示是否为指定银行
|
||||
function vertifyBankIsValid(){
|
||||
var parm = "bank_name="+getItemValue(0,getRow(0),"bank_name");
|
||||
var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "vertifyBankIsValid", parm);
|
||||
if (res == "error") {
|
||||
alert("该银行卡号,非指定银行,请核对");
|
||||
}
|
||||
}
|
||||
//选择开户行所属省份
|
||||
function selectProvince(){
|
||||
AsDialog.OpenSelector("selectProvince","","dialogWidth=" + parseInt(window.screen.width * 0.50) + "px dialogHeight=" + parseInt(window.screen.height * 0.45) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""){
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
if (sReturn[0].indexOf("省") != -1) {
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("省"));
|
||||
}else if (sReturn[0].indexOf("市") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("市"));
|
||||
}else if (sReturn[0].indexOf("壮族自治区") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("壮族自治区"));
|
||||
}else if (sReturn[0].indexOf("回族自治区") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("回族自治区"));
|
||||
}else if (sReturn[0].indexOf("自治区") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("自治区"));
|
||||
}else if (sReturn[0].indexOf("特别行政区") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("特别行政区"));
|
||||
}
|
||||
setItemValue(0,0,"ACCOUNT_PROVINCE",sReturn[0]);
|
||||
},"请选择开户行所属省份",'');
|
||||
}
|
||||
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ 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"%>
|
||||
<script type="text/javascript" src="<%=sWebRootPath%>/Frame/page/js/bankBin.js"></script><%
|
||||
/*
|
||||
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", "<iframe type='iframe' name=\"frame_list\" width=\"100%\" height=\"120\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBDebitCard/PaymentCardInfo.jsp?FlowUnid="+FlowUnid+"&RightType="+RightType+"&ishistory="+ishistory+"&CompClientID="+sCompClientID+"\"></iframe>", CurPage.getObjectWindowOutput());
|
||||
dwTemp.replaceColumn("S_PaymentCard", "<iframe type='iframe' name=\"frame_lists\" width=\"100%\" height=\"250\" frameborder=\"0\" src=\""+sWebRootPath+"/Tenwa/Lease/Flow/Comm/LBDebitCard/S_PaymentCardInfo.jsp?FlowUnid="+FlowUnid+"&RightType="+RightType+"&ishistory="+ishistory+"&CompClientID="+sCompClientID+"\"></iframe>", 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"%>
|
||||
<script type="text/javascript">
|
||||
function selectBankType(){
|
||||
AsDialog.OpenSelector("selectBankType","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"){
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
var bankCode = getItemValueByName(0, 0, "bank_code");
|
||||
if(<%=flowNo%>=="BusinessApplyFlow"||(bankCode!=null&&bankCode!="")){
|
||||
setItemValue(0,0,'bank_code',sReturn[0]);
|
||||
}
|
||||
setItemValue(0,0,'bank_type',sReturn[1]);
|
||||
},"选择银行名称");
|
||||
}
|
||||
//根据选择的用户名选择对应的证件号
|
||||
function autoSetCustId(){
|
||||
var param1 = "";
|
||||
var param2 = "";
|
||||
if('AccountChangeApply'=='<%=ApplyType%>'){
|
||||
param1 = "selectAccountForChange";
|
||||
param2 = "ProjectId,<%=projectId%>,customerType,<%=CustomerType%>,ProjectId,<%=projectId%>,CustomerId,<%=customerId%>";
|
||||
}else{
|
||||
param1 = "selectAccountByCusts";
|
||||
param2 = "flowunid,<%=FlowUnid%>";
|
||||
}
|
||||
param2=param2+",customerType,"+"<%=CustomerType%>";
|
||||
AsDialog.OpenSelector(param1,param2,"dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"){
|
||||
alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
setItemValue(0,0,'CERTID',sReturn[0]);
|
||||
setItemValue(0,0,'ACCOUNT',sReturn[1]);
|
||||
setItemValue(0,0,'CUSTTYPE',sReturn[2]);
|
||||
setItemValue(0,0,'MOBILE',sReturn[3]);
|
||||
},"选择扣款卡名称");
|
||||
}
|
||||
function checkMobile(){
|
||||
if("<%=CustomerType%>"=="03"){//校验自然人扣款卡信息手机号是否是申请人或共同申请人
|
||||
var customerType = "03";
|
||||
var mobile = getItemValue(0,getRow(),"MOBILE");
|
||||
var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=FlowUnid%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkDebitCardMobile",sParams);
|
||||
if(sReturnInfo=="10"){
|
||||
alert("预留手机号不是申请人手机号或共同申请人手机号!");
|
||||
}
|
||||
return sReturnInfo;
|
||||
}else if("<%=CustomerType%>"=="01"){//校验法人扣款卡信息手机号是否是担保人或共同申请人
|
||||
var customerType = "01";
|
||||
var mobile = getItemValue(0,getRow(),"MOBILE");
|
||||
var sParams = "mobile="+mobile+",customerType="+customerType+",flowunid="+"<%=FlowUnid%>";
|
||||
var sReturnInfo = RunJavaMethodTrans("com.tenwa.lease.flow.project.businessapply.CustomerInfoCheck","checkDebitCardMobile",sParams);
|
||||
if(sReturnInfo=="10"){
|
||||
alert("预留手机号不是担保人手机号或共同申请人手机号!");
|
||||
}
|
||||
return sReturnInfo;
|
||||
}
|
||||
}
|
||||
|
||||
function checkTel(){//校验预留手机号格式
|
||||
var mobile = getItemValue(0,getRow(0),"MOBILE");
|
||||
if(mobile==""){
|
||||
//setErrorTips("mobile","手机号不能为空!");
|
||||
// alert("预留手机号不能为空!");
|
||||
return true;
|
||||
}
|
||||
var phone = /^[1][2,3,4,5,6,7,8,9][0-9]{9}$/;
|
||||
if(phone.test(mobile)){
|
||||
setErrorTips("MOBILE","");
|
||||
return true;
|
||||
}else{
|
||||
setErrorTips("MOBILE","手机号格式不正确!");
|
||||
return false;
|
||||
}
|
||||
/* if(CheckPhoneCode(mobile)){
|
||||
return true;
|
||||
}else{
|
||||
//setErrorTips("mobile","手机号格式不正确!");
|
||||
alert("预留手机号格式不正确!");
|
||||
return false;
|
||||
} */
|
||||
}
|
||||
|
||||
function save(){
|
||||
var TelRes=checkTel();
|
||||
if(TelRes==false){
|
||||
return;
|
||||
}
|
||||
setItemValue(0,0,"flowunid","<%=FlowUnid%>");
|
||||
setItemValue(0,0,"acc_type","Debit");
|
||||
var res=true;
|
||||
if('BusinessApplyApply'=='<%=ApplyType%>'){
|
||||
res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "getCustIdByFlowunid", "FlowUnid=<%=FlowUnid%>");
|
||||
var strarry=res.split(",");
|
||||
var customerid=strarry[0];
|
||||
var projectid=strarry[1];
|
||||
var contractid=strarry[2];
|
||||
if(res=="false"){
|
||||
alert("请先填写个人基本信息!");
|
||||
return;
|
||||
}
|
||||
|
||||
var contract_id= getItemValue(0,0,"contract_id");
|
||||
if(null!=contract_id&&contract_id!=""){
|
||||
contractid=contract_id;
|
||||
}
|
||||
setItemValue(0,0,"customerid",customerid);
|
||||
setItemValue(0,0,"project_id",projectid);
|
||||
if(contractid==""||contractid=="null"||contractid==null){
|
||||
setItemValue(0,0,"contract_id","");
|
||||
}else{
|
||||
setItemValue(0,0,"contract_id",contractid);
|
||||
}
|
||||
}
|
||||
var project_id = getItemValue(0,0,"project_id");
|
||||
//校验对应的扣款卡是否签约,如果签约
|
||||
RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkAccountSignStatus", "projectid="+project_id+",userId=<%=userId%>,orgId=<%=orgId%>");
|
||||
if("BusinessApplyApply"=="<%=ApplyType%>"||"BusinessChangeApply"=="<%=ApplyType%>"||"BContractApproveApply"=="<%=ApplyType%>"||"BContractChangeApply"=="<%=ApplyType%>"){
|
||||
var sparams = "account="+getItemValue(0,getRow(),"ACCOUNT")+",acc_number="+getItemValue(0,getRow(),"ACC_NUMBER")+",bank_name="+getItemValue(0,getRow(),"BANK_NAME")+",mobile="+getItemValue(0,getRow(),"MOBILE")+",projectid=<%=projectId%>,FlowUnid=<%=FlowUnid%>,contractid=<%=contractId%>,certId="+getItemValue(0,getRow(),"CERTID")+",applyType=<%=ApplyType%>";
|
||||
var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams);
|
||||
if("false"==meassge){
|
||||
alert("合同已生成,请先删除合同再修改扣款卡信息!");
|
||||
return ;
|
||||
}else if("Y"==meassge){
|
||||
setItemValue(0,0,"sign_status","Y");
|
||||
}else if("N"==meassge){
|
||||
setItemValue(0,0,"sign_status","");
|
||||
}
|
||||
}
|
||||
|
||||
iV_all("0");
|
||||
setItemValue(0,0,"ACC_NUMBER",allTrim(getItemValue(0,0,"ACC_NUMBER")));
|
||||
var flowName="<%=flowName%>";
|
||||
if("业务变更流程"==flowName||"合同制作流程"==flowName || "合同变更流程"==flowName){
|
||||
// 判断是否变更, 如果变更了, 将变更内容插入中间表
|
||||
var account = getItemValue(0,0,"account"); // 账户名称
|
||||
var acc_number = getItemValue(0,0,"acc_number"); // 银行账号
|
||||
var bank_name = getItemValue(0,0,"bank_name"); // 开户银行
|
||||
var MOBILE = getItemValue(0,0,"MOBILE"); // 预留手机号
|
||||
var project_id = getItemValue(0,0,"project_id"); // 项目id
|
||||
var contract_id = getItemValue(0,0,"contract_id");// 预留手机号
|
||||
var sign_status = getItemValue(0,0,"sign_status");// 签约信息
|
||||
var flowunid = "<%=FlowUnid%>" ;
|
||||
|
||||
var sparams ="FlowUnid="+flowunid+",account="+account+",acc_number="+acc_number+",bank_name="+bank_name+",mobile="+MOBILE+",projectid="+project_id+",contractid="+contract_id+",sign_status="+sign_status+"";
|
||||
var result = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "savaCustomerAccountTomiddle", sparams);
|
||||
if("true"==result){
|
||||
as_save("0","re");
|
||||
}else{
|
||||
alert("保存失败, 请联系管理员 !");
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
as_save("0","re");
|
||||
}
|
||||
}
|
||||
function re(){
|
||||
var param="CompClientID=<%=sCompClientID%>&FlowUnid=<%=FlowUnid%>&RightType=<%=RightType%>&ishistory=<%=ishistory%>";
|
||||
AsControl.OpenView("/Tenwa/Lease/Flow/Comm/LBDebitCard/PaymentCardInfo.jsp",param,"frame_list");
|
||||
}
|
||||
|
||||
function CheckBank_name(){
|
||||
var bank_name=getItemValue(0, getRow(0), "bank_name");
|
||||
if(bank_name==null||bank_name==""){
|
||||
setErrorTips("bank_name","请输入开户银行!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("bank_name","");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function CheckAccount(){
|
||||
var account=getItemValue(0, getRow(0), "account");
|
||||
if(account==null||account==""){
|
||||
setErrorTips("account","请输入账户名称!");
|
||||
return false;
|
||||
}else{
|
||||
setErrorTips("account","");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* 银行账号格式校验 */
|
||||
function CheckAcc_number(){
|
||||
var acc=getItemValue(0, getRow(0), "acc_number");
|
||||
if(acc!=null&&acc!=""){
|
||||
/* var reg = /^(\d{16}|\d{19})$/;
|
||||
if(!reg.test(acc)){
|
||||
setErrorTips("acc_number","银行账号格式错误!");
|
||||
return false;
|
||||
}else{ */
|
||||
setErrorTips("acc_number","");
|
||||
return true;
|
||||
|
||||
}else{
|
||||
setErrorTips("acc_number","请输入银行账号!");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
function getNameOfBank(){
|
||||
var sflag=-1;
|
||||
var number=getItemValue(0, getRow(0), "acc_number");
|
||||
/* var reg = /^(\d{14}|\d{16}|\d{19})$/;
|
||||
if(!reg.test(number)){
|
||||
setErrorTips("acc_number","银行账号格式错误!");
|
||||
return false;
|
||||
}else{ */
|
||||
var cardbin = number.substring(0, 6);
|
||||
for (var i=0;i<bankBin.length;i++) {
|
||||
if(cardbin==bankBin[i]){
|
||||
sflag = i;
|
||||
}
|
||||
}
|
||||
if (sflag != -1) {
|
||||
var name=bankName[sflag].substring(0,bankName[sflag].indexOf("·"));
|
||||
setItemValue(0,getRow(),"bank_name",name);
|
||||
}
|
||||
setErrorTips("acc_number","");
|
||||
return true;
|
||||
}
|
||||
//校验银行卡四要素
|
||||
function verifyFourelementBank(){
|
||||
var parm = "FlowUnid=<%=FlowUnid%>";
|
||||
var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "verifyFourelementBank", parm);
|
||||
if (res == "ERROR") {
|
||||
alert("校验失败");
|
||||
}else if(res == 'SUCCESS'){
|
||||
alert('校验完成');
|
||||
reloadSelf();
|
||||
}else{
|
||||
alert(res);
|
||||
}
|
||||
}
|
||||
//提示是否为指定银行
|
||||
function vertifyBankIsValid(){
|
||||
var parm = "bank_name="+getItemValue(0,getRow(0),"bank_name");
|
||||
var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "vertifyBankIsValid", parm);
|
||||
if (res == "error") {
|
||||
alert("该银行卡号,非指定银行,请核对");
|
||||
}
|
||||
}
|
||||
//选择开户行所属省份
|
||||
function selectProvince(){
|
||||
AsDialog.OpenSelector("selectProvince","","dialogWidth=" + parseInt(window.screen.width * 0.50) + "px dialogHeight=" + parseInt(window.screen.height * 0.45) + "px",function(sReturn){
|
||||
if(!sReturn||sReturn=="_CANCEL_"||sReturn==""){
|
||||
//alert(getHtmlMessage('1'));//请选择一条信息!
|
||||
return;
|
||||
}
|
||||
sReturn = sReturn.split("@");
|
||||
if (sReturn[0].indexOf("省") != -1) {
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("省"));
|
||||
}else if (sReturn[0].indexOf("市") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("市"));
|
||||
}else if (sReturn[0].indexOf("壮族自治区") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("壮族自治区"));
|
||||
}else if (sReturn[0].indexOf("回族自治区") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("回族自治区"));
|
||||
}else if (sReturn[0].indexOf("自治区") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("自治区"));
|
||||
}else if (sReturn[0].indexOf("特别行政区") != -1){
|
||||
sReturn[0] = sReturn[0].substring(0,sReturn[0].indexOf("特别行政区"));
|
||||
}
|
||||
setItemValue(0,0,"ACCOUNT_PROVINCE",sReturn[0]);
|
||||
},"请选择开户行所属省份",'');
|
||||
}
|
||||
|
||||
function returnList(){
|
||||
AsControl.OpenView("<%=sPrevUrl%>", "","_self","");
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
create view as (
|
||||
create view vi_rent_collect as (
|
||||
SELECT
|
||||
`lrp`.`ID` AS `id`,
|
||||
`lci`.`ID` AS `contract_id`,
|
||||
|
||||
@ -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`,
|
||||
|
||||
105
src_tenwa/com/tenwa/flow/comm/status/BankCollect.java
Normal file
105
src_tenwa/com/tenwa/flow/comm/status/BankCollect.java
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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<BizObject> 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;
|
||||
}
|
||||
|
||||
}
|
||||
@ -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<BizObject> 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<BizObject> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user