Connection conn = null;
ResultSet rs = null;
CallableStatement statm = null;
List<ClubStatisticeVo> listVo = new ArrayList<ClubStatisticeVo>();
//调用存储过程,返回sql
conn = JdbcUtil.getConnection();
statm = conn.prepareCall("{call pro_rpt_all_statistics_s(?,?,?)}");
statm.registerOutParameter(3, java.sql.Types.VARCHAR);
statm.setString(1, month);
statm.setString(2, dept);
statm.executeUpdate();
String result = statm.getString(3);
PreparedStatement ps = conn.prepareStatement(result);
rs = ps.executeQuery();
转载于:https://blog.51cto.com/zhangchi/1392285