更改退回-账户余额

This commit is contained in:
linxiaoping 2018-06-27 09:27:19 +08:00
parent baac581f9c
commit 425f59d2f3
2 changed files with 9 additions and 6 deletions

View File

@ -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);
}
</script>

View File

@ -41,13 +41,13 @@ public class SelectBalance {
Map<String,String> params= new HashMap<String,String>();
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<Map<String,String>> getSql = DataOperatorUtil.getDataBySql(scql, sql, params);
//if(aaa.size()>0){
money=getSql.get(0).get("money");
//}
//}
return money;
}
}