有个存储过程:
create or replace procedure SHOP_CASH_FLOW_paysum(
 sums out sys_refcursor,
 ORDERAUTOID in number,
 shopautoId in number,
 queryDate in varchar2
)
as 
begin
select sum(ORDERITEM.PAIDACCOUNT) as SUM_PAIDACCOUNT into sums
from ORDER_T left join ORDERITEM on ORDER_T.AUTOID = ORDERITEM.ORDER_FK
where ORDER_T.ORDERTYPE = 'purchase.payment'
and ORDER_T.STATUS in ('ACCEPT','TRANSIT')
and ORDER_T.ENABLE = 1 
and ORDER_T.SHOPAUTOID = shopautoid 
and ORDERITEM.ORDERAUTOID = ORDERAUTOID  
and to_char(acceptDate,'yyyy-MM-dd')= queryDate ;
  dbms_output.put_line(shopautoid ||ORDERAUTOID);end ;
//得到一个和
然后java调用的时候
CallableStatement cstemt = conn
.prepareCall("{call shop_cash_flow_paysum(?,?,?,?)}");
cstemt.registerOutParameter(1, Types.VARCHAR);
cstemt.setLong(2, order.getAutoId());
cstemt.setLong(3, order.getShopAutoId());
cstemt.setString(4, queryDate);
cstemt.executeQuery();
String result =cstem.getString(1);

System.out.println(result);//打印这个和 但是总等于空 我在数据库测试 sums是等于300
问下高手 问题出在那