1 统计“总计”(不随分页的变化而改变)
步骤:① 写总计的sql;② 取值放入list中;③ 从list中取值放入map中;④ 再放入文本框中 然后显示在列表中
以"客户资金余额client_account_list.jsp"为例:
List list1 = null;
Map map1;
String sqlstr1="";
String total_balance="";
String weight="";
String amount_in="";
String amount_out="";
sqlstr1="select sum(nvl(total_balance,0)) as total_balance,sum(nvl(weight,0)) as weight,sum(nvl(amount_in,0)) as amount_in,sum(nvl(amount_out,0)) as amount_out from (" + sqlstr + ")";