多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 问题:退租办理里面什么都没有? ## 原因:退款科目没有对应的反向科目。 ![](https://box.kancloud.cn/b3a529680e8968586293cd3f92c9a438_1702x903.JPG) ## 误退房后如何恢复? ## 答案 ``` 1.还原主订单正常状态 也可以where MJOrderid=2481 update MJOrder set istuidate=null,orderstatus=0 where edNumber='RZ-20180824-001' 2.更新字订单 正常状态 update MJOrderDetail set orderstatus=0 where MJOrderid=2481 3.更新房间正常状态 update MJRooms set state='租赁中',add_time='2018-08-24 10:42:56.040',up_time='2018-08-24 10:42:56.040',exp_time='2018-09-23 00:00:00.000',usernames='施泽权,易林丰',userids=0,usermobiles='18787136723,13888897885',orderstart_time='2018-08-24 00:00:00.000',orderend_time='2018-09-23 00:00:00.000',zuqi=1,jzrs=2,OrderId=2481,nextpaydate='2018-09-18 00:00:00.000' where roomnumber='6307' and keyid=853 ``` ## 退租时所有填成0如何更正 ``` update MJFinanceDetail set sumMoney=-1000 where keyid=44713 update MJFinanceDetail set sumMoney=-63 where keyid=44716 update MJFinanceMain set shifub=-1063,total=-1063,payment=-1063 where KeyId=13887 ``` ![](https://box.kancloud.cn/e8fd349a2093811229b417b83c612132_920x657.png) ## 问题:删除重开的房间 先删除订单主表,订单明细表;再删除财务主表、财务明细表 ``` delete FROM [bds257174606_db].[dbo].[MJOrder] where edNumber='RZ-20190118-003' delete FROM [bds257174606_db].[dbo].[MJOrderDetail] where edNumber='RZ-20190118-003' delete FROM [bds257174606_db].[dbo].[MJFinanceMain] where edNumber='RZ-20190118-003' delete FROM [bds257174606_db].[dbo].[MJFinanceDetail] where edNumber='RZ-20190118-003' ``` ## 更新房间状态 ``` update [bds257174606_db].[dbo].[MJRooms] set state='空闲' where roomnumber='6315' and keyid=291 ``` ## 恢复6359删除标记 ``` update [bds257174606_db].[dbo].[MJRooms] set isdel=0 where vestid=186 and roomnumber='6359' ```