From 425f59d2f3b7ab1c8d9d679c0b2067da377e23f9 Mon Sep 17 00:00:00 2001 From: linxiaoping <12345678> Date: Wed, 27 Jun 2018 09:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=80=80=E5=9B=9E-=E8=B4=A6?= =?UTF-8?q?=E6=88=B7=E4=BD=99=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/DealerDeposit/DDepositReturn_TempInfo.jsp | 11 +++++++---- src_sys/com/tenwa/flow/action/comm/SelectBalance.java | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/WebContent/DealerDeposit/DDepositReturn_TempInfo.jsp b/WebContent/DealerDeposit/DDepositReturn_TempInfo.jsp index 969bb3fa4..d465d7c89 100644 --- a/WebContent/DealerDeposit/DDepositReturn_TempInfo.jsp +++ b/WebContent/DealerDeposit/DDepositReturn_TempInfo.jsp @@ -41,17 +41,20 @@ function save(){ var sFlowUnid = "<%=sFlowUnid%>"; setItemValue(0,getRow(),'FlowUnid',sFlowUnid); + var returnValue = getItemValue(0,0,'ACCOUNT_BALANCE'); + //alert(returnValue); + as_save("myiframe0","returnList()"); } function returnList(){ AsControl.OpenView("/DealerDeposit/DDepositReturn_TempList.jsp", "FlowUnid="+sFlowUnid,"_self",""); } function selectBalance(){ - //var distributor_id = getItemValue(0,getRow(),'distributor_id'); - //var CAUTION_MONEY = getItemValue(0,getRow(),'CAUTION_MONEY'); - //alert(CAUTION_MONEY); + var money = getItemValue(0,0,"CAUTION_MONEY"); + //alert(" 输入的金额:"+money); var sReturn=AsControl.RunJavaMethodTrans("com.tenwa.flow.action.comm.SelectBalance","runs","distributor_no=<%=DISTRIBUTOR_NO%>"); - setItemValue(0,0,"ACCOUNT_BALANCE",sReturn); + //alert(" 总金额:"+sReturn); + setItemValue(0,0,"ACCOUNT_BALANCE",sReturn-money); } diff --git a/src_sys/com/tenwa/flow/action/comm/SelectBalance.java b/src_sys/com/tenwa/flow/action/comm/SelectBalance.java index 28851b6f0..ed3576519 100644 --- a/src_sys/com/tenwa/flow/action/comm/SelectBalance.java +++ b/src_sys/com/tenwa/flow/action/comm/SelectBalance.java @@ -41,13 +41,13 @@ public class SelectBalance { Map params= new HashMap(); params.put("distributor_id", distributor_no); //params.put("caution_money", caution_money); - String sql="SELECT O.distributor_id,SUM(CASE WHEN O.money_type='收款' THEN O.caution_money ELSE -O.caution_money END) AS money " + String sql="SELECT O.distributor_id,O.caution_money AS money " + "FROM D_DEPOSITCHARGE_INFO O WHERE " + "O.distributor_id=:distributor_id GROUP BY O.distributor_id"; List> getSql = DataOperatorUtil.getDataBySql(scql, sql, params); //if(aaa.size()>0){ money=getSql.get(0).get("money"); - //} + //} return money; } }