webservice接口调用存储过程返回失败

poka.cashman.timer.service.impl.PdaOperateServiceImpl - Method Name: cashBoxOutOrIn; cbInfo:JN00201503170;;0;;;;;;902000000|JN00201503170;;0;;;;;;902000000|JN00201503170;;0;;;;;;902000000|JN00201503170;;0;;;;;;902000000
2015-03-18 10:37:19,863 [WebContainer : 3] INFO  cn.poka.cashman.timer.service.impl.PdaOperateServiceImpl - getCashBoxList:
2015-03-18 10:37:19,863 [WebContainer : 3] INFO  cn.poka.cashman.timer.service.impl.PdaOperateServiceImpl - Message.code=26
2015-03-18 10:37:19,863 [WebContainer : 3] INFO  cn.poka.cashman.timer.service.impl.PdaOperateServiceImpl - Message.msg=失败
2015-03-18 10:37:19,863 [WebContainer : 3] INFO  cn.poka.cashman.timer.service.impl.PdaOperateServiceImpl - Message.params=

根据返回的code26,去查代码,按住ctrl+shift+R输入PDA查询,选则PdaOerateServiceImpl.java文件

找到相应的接口,看代码map = this.newCashboxInDao.cashBoxOutOrIn(cbInfo);选中newCashboxInDao按住ctrl+shift+R出现newCashboxInDaoImpl文件

查询调用的存储过程,回收钞箱入库,

显示* 回收钞箱入库 (non-Javadoc)

继续看代码String sql = "call P_box_recycle (?,?,?,?)";

查询存储过程p_box_recycle存储过程,看v_ret=26的sql语句

if v_flag = '0' then   注:在v_flag=0的情况下

--MODFI 20140923
 select COUNT(ATMNUM) into v_count from T_ATMPLANDETAIL where (CLEARSTATE = '0' OR CLEARSTATE IS NULL)
   and PLANNUM = v_plannum and PLANSTATE = '1';

把上述sql语句换成toad能执行的语句如下

select COUNT(ATMNUM)  from T_ATMPLANDETAIL where (CLEARSTATE = '0' OR CLEARSTATE IS NULL)
   and PLANNUM = 'JN00201503170' and PLANSTATE = '1';
下边是存储过程对上述条件的判断

if v_count > 0 then
    set v_ret = '26';
    goto GOTO_RET;
 end if;

问题是表t_atmplandetail表clearstate状态为0是清机,还没有加钞不能执行回收钞箱操作,为null还没有清机

所以返回26,失败

问题指向了清机操作失败了,看清机的存储过程

清机v_flag设定的值TRUE(1以上的数字),FLASE(0)

上一篇:python之函数用法endswith()


下一篇:python+Appium自动化:app滑动操作swipe