/** * 统计计算 */ @Override public void statis(final String action,final String cate, final String begindate, final String enddate, final String year,final String staff,final String zone,final String userid) { getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Connection conn = session.connection(); CallableStatement cStatement = conn.prepareCall("{Call p_kfgl_bbtj.usp_bbtj(?,?,?,?,?,?,?,?,?,?,?)}"); cStatement.setString(1, action); cStatement.setString(2, cate); cStatement.setString(3, begindate); cStatement.setString(4, enddate); cStatement.setString(5, year); cStatement.setString(6, staff); cStatement.setString(7, zone); cStatement.setString(8, userid); cStatement.registerOutParameter(9, OracleTypes.VARCHAR); cStatement.registerOutParameter(10, OracleTypes.VARCHAR); cStatement.registerOutParameter(11, OracleTypes.VARCHAR); cStatement.execute(); cStatement.close(); conn.close(); return session.close(); } }); }