diff --git a/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeasebackTJListHasInvoiced.jsp b/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeasebackTJListHasInvoiced.jsp
index ebf4dc745..73c90c503 100644
--- a/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeasebackTJListHasInvoiced.jsp
+++ b/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/InvoiceLeasebackTJListHasInvoiced.jsp
@@ -3,7 +3,7 @@
CurPage.setAttribute("leaseForm", "02");
ASObjectModel doTemp = new ASObjectModel("Invoice_TJ_Leaseback");
doTemp.appendJboWhere("li.status='Y'");
- doTemp.setColumnAttribute("plan_list,tax_no,fpdm,fphm,hztzdh,tax_code", "colvisible", "1");
+ doTemp.setColumnAttribute("plan_list,fpdm,fphm,hztzdh,tax_code", "colvisible", "1");
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "1"; //只读模式
diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp
index b672c0674..f3e85536b 100644
--- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/AccountChangeFlowDebitCardInfo.jsp
@@ -7,6 +7,8 @@
Content: 示例详情页面
History Log:
*/
+ String userId = CurUser.getUserID();
+ String orgId = CurUser.getOrgID();
String projectId = CurPage.getParameter("ProjectId");
String RightType=CurPage.getParameter("RightType");
String ishistory=CurPage.getParameter("IsHistory");
@@ -15,7 +17,8 @@
String customerId = CurPage.getParameter("customerId");
String FlowUnid=CurPage.getParameter("FlowUnid");
String contractId = CurPage.getParameter("ContractId");
-
+ String subjectId=CurPage.getParameter("SubjectId");//获取主体信息,用于是否签约查询
+
String sTempletNo = "DebitCardInfoMcontract";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setHtmlEvent("acc_number", "onchange", "getNameOfBank");
@@ -101,7 +104,11 @@
}
setErrorTips("acc_number","");
setItemValue(0,0,"acc_type","Debit");
- 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%>";
+
+ //查询该申请号的扣款卡是否签约,如果已签约将对应的数据存入对应的记录表中
+ RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkAccountSignStatus", "projectid=<%=projectId%>,userId=<%=userId%>,orgId=<%=orgId%>,applyType=<%=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%>,subjectId=<%=subjectId%>,collect_type="+getItemValue(0,getRow(),"collect_type");
var meassge = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkSign", sparams);
if("Y"==meassge){
setItemValue(0,0,"sign_status","Y");
@@ -127,13 +134,45 @@
sflag = i;
}
}
+ var bool = true;
if (sflag != -1) {
var name=bankName[sflag].substring(0,bankName[sflag].indexOf("·"));
- setItemValue(0,getRow(),"bank_name",name);
+ if(name.indexOf("邮储") != -1 || name.indexOf("邮政") != -1){
+ name = "邮政银行";
+ }
+ var res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "selectBankName", "bank_name="+name);
+ if("error"!= res){
+ res = res.split("@");
+ var bankCode = getItemValue(0, 0, "bank_code");
+ setItemValue(0,0,'bank_code',res[0]);
+ setItemValue(0,0,'bank_type',res[1]);
+ setItemValue(0,0,"bank_name",res[1]);
+ setItemValue(0,0,"collect_type",res[2]);
+ bool = false;
+ }
}
+ if(bool){
+ setItemValue(0,0,'bank_code','');
+ setItemValue(0,0,'bank_type','');
+ setItemValue(0,0,"bank_name",'');
+ setItemValue(0,0,"collect_type",'');
+ }
setErrorTips("acc_number","");
return true;
}
+
+ 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_type',sReturn[1]);
+ setItemValue(0,0,"bank_name",sReturn[1]);
+ setItemValue(0,0,"collect_type",sReturn[2]);
+ },"选择银行名称");
+ }
<%@ include file="/Frame/resources/include/include_end.jspf"%>
diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp
index ab559b529..0396eb093 100644
--- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp
+++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp
@@ -22,6 +22,7 @@
String CustomerType=CurPage.getParameter("CustomerType");
String ApplyType=CurPage.getParameter("ApplyType");
String PhaseNo=CurPage.getParameter("PhaseNo");
+ String subjectId=CurPage.getParameter("SubjectId");//获取主体信息,用于是否签约查询
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+"==========");
@@ -72,7 +73,7 @@
return;
}
sReturn = sReturn.split("@");
- var bankCode = getItemValue(0, 0, "bank_code");
+ //var bankCode = getItemValue(0, 0, "bank_code");
setItemValue(0,0,'bank_code',sReturn[0]);
setItemValue(0,0,'bank_type',sReturn[1]);
setItemValue(0,0,"bank_name",sReturn[1]);
@@ -181,19 +182,22 @@
}
}
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%>"){//业务申请不用校验是否签约,因为业务申请没有办法签约。如果是签约状态也是从别的表拷贝的。
+ //查询该申请号的扣款卡是否签约,如果已签约将对应的数据存入对应的记录表中
+ RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "checkAccountSignStatus", "projectid="+project_id+",userId=<%=userId%>,orgId=<%=orgId%>,applyType=<%=ApplyType%>");
+ }
+
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","");
- }
+ 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%>,subjectId=<%=subjectId%>,collect_type="+getItemValue(0,getRow(),"collect_type");
+ 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");
diff --git a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml
index 72c2810eb..120c163c9 100644
--- a/WebContent/WEB-INF/etc/jbo/jbo_customer.xml
+++ b/WebContent/WEB-INF/etc/jbo/jbo_customer.xml
@@ -14,6 +14,7 @@
+
@@ -3019,6 +3020,9 @@
+
+
+
diff --git a/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java b/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java
index 6dafe2f02..8950ea9de 100644
--- a/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java
+++ b/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java
@@ -58,6 +58,7 @@ public class DebitCardAction {
private String orgId;
private String applyType;
private String collect_type;
+ private String subjectId;
public String getCustIdByFlowunid(JBOTransaction tx) throws JBOException{
String s=this.getFlowUnid();
@@ -277,41 +278,46 @@ public class DebitCardAction {
return "false";
}
}
- //校验通联卡扣
- if("BContractApproveApply".equals(applyType) || "BContractChangeApply".equals(applyType)||"AccountChangeApply".equals(applyType)){
- BizObjectManager lcsshManage = JBOFactory.getFactory().getManager(LB_CARD_SIGN_STATUS_HIS.CLASS_NAME);
- BizObject lcss = lcsshManage.createQuery(" tl_status='sign_status2' and account=:account and acc_number=:acc_number and certid=:certid and mobile=:mobile ")
- .setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("mobile", mobile).getSingleResult(false);
-
- BizObjectManager lcthManage = JBOFactory.getFactory().getManager(LC_CARD_TLSIGN.CLASS_NAME,tx);
- BizObject lct = lcthManage.createQuery("PROJECT_ID=:project_id ").setParameter("project_id", projectid).getSingleResult(true);
- if(lcss!=null){
- if(lct == null){
- lct = lcthManage.newObject();
- lct.setAttributeValue("PROJECT_ID", projectid);
- }
- lct.setAttributeValue("SIGN_STATUS", "sign_status2");
- lct.setAttributeValue("AGRMNO", lcss.getAttribute("AGRMNO").getString());
+ //查询历史是否签约
+ BizObjectManager lcsshManage = JBOFactory.getFactory().getManager(LB_CARD_SIGN_STATUS_HIS.CLASS_NAME);
+ BizObject lcss = lcsshManage.createQuery("select O.AGRMNO from O left join jbo.com.tenwa.lease.comm.LB_PROJECT_INFO lpi on lpi.id=O.project_id where O.tl_status='sign_status2' and O.account=:account and O.acc_number=:acc_number and O.certid=:certid and O.mobile=:mobile and O.sign_type=:sign_type and lpi.subjectid=:subjectId ")
+ .setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("mobile", mobile).setParameter("sign_type", collect_type).setParameter("subjectId", subjectId).getSingleResult(false);
+
+ //查询当前项目是否有对应的签约记录
+ BizObjectManager lcthManage = JBOFactory.getFactory().getManager(LC_CARD_TLSIGN.CLASS_NAME,tx);
+ BizObject lct = lcthManage.createQuery("PROJECT_ID=:project_id ").setParameter("project_id", projectid).getSingleResult(true);
+
+ //查看现有卡是否签约
+ BizObject caAgrmno = lcthManage.createQuery("select O.AGRMNO from O left join jbo.app.tenwa.customer.CUSTOMER_ACCOUNT ca on ca.project_id=O.project_id left join jbo.com.tenwa.lease.comm.LB_PROJECT_INFO lpi on lpi.id=O.project_id where O.sign_status='sign_status2' and lpi.subjectid=:subjectid and O.sign_type=:sign_type and ca.acc_number=:acc_number and ca.certid=:certid and ca.mobile=:mobile ")
+ .setParameter("subjectId", subjectId).setParameter("sign_type", collect_type).setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("mobile", mobile).getSingleResult(false);
+
+ if(lcss!=null || caAgrmno!= null){
+ if(lct == null){
+ lct = lcthManage.newObject();
+ lct.setAttributeValue("PROJECT_ID", projectid);
+ }
+ lct.setAttributeValue("SIGN_STATUS", "sign_status2");
+ lct.setAttributeValue("sign_type", collect_type);
+ lct.setAttributeValue("AGRMNO", lcss!=null ? lcss.getAttribute("agrmno").getString(): caAgrmno.getAttribute("agrmno").getString());
+ lcthManage.saveObject(lct);
+ }else{
+ if(lct != null){
+ lct.setAttributeValue("SIGN_STATUS", "sign_status4");
lcthManage.saveObject(lct);
- }else{
- if(lct != null){
- lct.setAttributeValue("SIGN_STATUS", "sign_status4");
- lcthManage.saveObject(lct);
- }
}
}
-
- BizObjectManager cahManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT_HIS.CLASS_NAME);
- List cahs = cahManage.createQuery(" sign_status='Y' and account=:account and acc_number=:acc_number and certid=:certid ")
- .setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).getResultList(false);
- if(cahs != null && cahs.size() > 0){
- return "Y";
- }
- BizObjectManager caManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT.CLASS_NAME);
- List cas = caManage.createQuery(" sign_status='Y' and account=:account and acc_number=:acc_number and certid=:certid ")
- .setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).getResultList(false);
- if(cas != null && cas.size() > 0){
- return "Y";
+ if("YLcollect".equals(collect_type)){
+ BizObjectManager cahManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT_HIS.CLASS_NAME);
+ String sql ="select O.id from O left join jbo.com.tenwa.lease.comm.LB_PROJECT_INFO lpi on lpi.id=O.project_id where O.sign_status='Y' and O.account=:account and O.acc_number=:acc_number and O.certid=:certid and O.collect_type='YLcollect' and lpi.subjectid=:subjectid";
+ List cahs = cahManage.createQuery(sql).setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("subjectid", subjectId).getResultList(false);
+ if(cahs != null && cahs.size() > 0){
+ return "Y";
+ }
+ BizObjectManager caManage = JBOFactory.getFactory().getManager(CUSTOMER_ACCOUNT.CLASS_NAME);
+ List cas = caManage.createQuery(sql).setParameter("account", account).setParameter("acc_number", acc_number).setParameter("certid", certId).setParameter("subjectid", subjectId).getResultList(false);
+ if(cas != null && cas.size() > 0){
+ return "Y";
+ }
}
return "N";
}
@@ -333,7 +339,7 @@ public class DebitCardAction {
String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
try {
Sqlca =Transaction.createTransaction(CacheLoaderFactory.getDataSource());
- selectSql="SELECT PROJECT_ID FROM CUSTOMER_ACCOUNT WHERE PROJECT_ID='"+projectid+"' AND ACC_NUMBER='"+acc_number+"' AND ACCOUNT='"+account+"' AND MOBILE='"+mobile+"' ";
+ selectSql="SELECT PROJECT_ID FROM CUSTOMER_ACCOUNT WHERE PROJECT_ID='"+projectid+"' AND ACC_NUMBER='"+acc_number+"' AND ACCOUNT='"+account+"' AND MOBILE='"+mobile+"' and bank_name='"+bank_name+"'";
List