【问题描述】
客户端不能升级,提示存在未买单的桌台,但是都已经结账了!
【问题答案】
如果存在未结算的单据,如果不结算,强行升级,会造成升级后的未结算单据无法结算,此控制是软件对数据的一个检测。以下语句可以处理
use issrestv6
go
–查询出状态异常的餐桌。
select ch_billno from cybr_u_master
where ch_billno not in (select ch_billno from cybr_u_checkout_master) —临时结算主表
and ch_billno not in (select ch_billno from cybr_u_togo where ch_payflag = ‘P’) —-外卖
and ch_billno not in (select ch_hangbillno from cybr_u_hangbill ) —-挂单
–删除
delete from cybr_u_tmp_table where ch_billno = ‘上面查出来的单据号’ —-临时开台表
delete from cybr_u_master where ch_billno = ‘上面查出来的单据号’ —–临时开单主表