From 55a34df30f7e512e75ae2c1b8df7fb16044fc347 Mon Sep 17 00:00:00 2001 From: xiezhiwen Date: Wed, 18 Sep 2019 18:43:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E8=87=AA=E4=BD=9C=E5=8F=8A?= =?UTF-8?q?=E5=90=88=E5=90=8C=E5=8F=98=E6=9B=B4=EF=BC=8C=20=E6=94=B9?= =?UTF-8?q?=E5=8F=98=E6=89=A3=E6=AC=BE=E5=8D=A1=E4=BF=A1=E6=81=AF=E5=8F=91?= =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E9=87=8D=E6=96=B0=E7=AD=BE=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp | 2 +- .../tenwa/comm/customerfilterlist/DebitCardAction.java | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp index 3e1ce88b8..abc51cfdc 100644 --- a/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp +++ b/WebContent/Tenwa/Lease/Flow/Comm/LBDebitCard/DebitCardInfo.jsp @@ -184,7 +184,7 @@ iV_all("0"); setItemValue(0,0,"ACC_NUMBER",allTrim(getItemValue(0,0,"ACC_NUMBER"))); var flowName="<%=flowName%>"; - if("业务变更流程"==flowName||"合同制作流程"==flowName){ + if("业务变更流程"==flowName||"合同制作流程"==flowName || "合同变更流程"==flowName){ // 判断是否变更, 如果变更了, 将变更内容插入中间表 var account = getItemValue(0,0,"account"); // 账户名称 var acc_number = getItemValue(0,0,"acc_number"); // 银行账号 diff --git a/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java b/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java index bcec06c80..08c1f6fc7 100644 --- a/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java +++ b/src_core/com/tenwa/comm/customerfilterlist/DebitCardAction.java @@ -294,7 +294,7 @@ public class DebitCardAction { Sqlca =Transaction.createTransaction(CacheLoaderFactory.getDataSource()); // 查询页面上的数据是否与正式表匹配 - selectSql="SELECT PROJECT_ID FROM CUSTOMER_ACCOUNT WHERE PROJECT_ID='"+projectid+"' AND ACC_NUMBER='"+acc_number+"' AND BANK_NAME='"+bank_name+"' AND ACCOUNT='"+account+"' AND MOBILE='"+mobile+"'"; + selectSql="SELECT PROJECT_ID FROM CUSTOMER_ACCOUNT WHERE PROJECT_ID='"+projectid+"' AND ACC_NUMBER='"+acc_number+"' AND BANK_NAME='"+bank_name+"' AND ACCOUNT='"+account+"' AND MOBILE='"+mobile+"' and SIGN_STATUS='Y'"; List> dataList = DataOperatorUtil.getDataBySql(Sqlca, selectSql, null); // 如果不匹配, 说明是变更的, 判断数据在中间表是否已存在; @@ -308,6 +308,8 @@ public class DebitCardAction { for (Map his : HisList) { if("Y".equals(his.get("SIGN_STATUS"))){ sign_status = "Y"; + updateSql="UPDATE CUSTOMER_ACCOUNT SET sign_status='Y' WHERE PROJECT_ID='"+projectid+"' "; + Sqlca.executeSQL(updateSql); break; } } @@ -316,9 +318,14 @@ public class DebitCardAction { if(dataList2 ==null || dataList2.size()==0){ insertSql="INSERT INTO CUSTOMER_ACCOUNT_MIDDLE(ID,ACC_NUMBER,BANK_NAME,ACCOUNT,PROJECT_ID,CONTRACT_ID,MOBILE,SIGN_STATUS,INSERTTIME,flowunid) VALUES(REPLACE(UUID(),'-',''),'"+acc_number+"','"+bank_name+"','"+account+"','"+projectid+"','"+contractid+"','"+mobile+"','"+sign_status+"','"+date+"','"+FlowUnid+"')"; Sqlca.executeSQL(insertSql); + updateSql="UPDATE CUSTOMER_ACCOUNT SET sign_status='N' WHERE PROJECT_ID='"+projectid+"' "; + Sqlca.executeSQL(updateSql); }else{ updateSql="UPDATE CUSTOMER_ACCOUNT_MIDDLE SET ACC_NUMBER='"+acc_number+"',BANK_NAME='"+bank_name+"',ACCOUNT='"+account+"',MOBILE='"+mobile+"',UPDATETIME='"+date+"',flowunid='"+FlowUnid+"',SIGN_STATUS='"+sign_status+"' WHERE PROJECT_ID='"+projectid+"' "; Sqlca.executeSQL(updateSql); + updateSql="UPDATE CUSTOMER_ACCOUNT SET sign_status='N' WHERE PROJECT_ID='"+projectid+"' "; + Sqlca.executeSQL(updateSql); + } // 如果匹配, 说明没有变更, 将中间表相关数据删除 }else{