出纳现金和银行日记账保存很慢
金蝶云社区-吴银波
吴银波
1人赞赏了该文章 1,967次浏览 未经作者许可,禁止转载编辑于2016年08月22日 17:26:25

金蝶KIS专业版V12.2,服务器电脑是WIN 2003系统,客户端WIN 7旗舰版。帐套是从13年建账到现在,现在的问题是出纳模块录入现金和银行日记账保存,修改,删除都很慢,一条记录需要保存20秒以上才可以,请问有没有办法解决以上问题?还有就是出纳日记账是需要生成凭证到总账模块的。以下是通过数据库跟踪出来的情况:
update cn_xjrjz set fvoucherid=vch.fvoucheridfrom cn_xjrjz r inner join
(select v.*,g.fname as fgoupname from t_voucher v left outer join t_vouchergroup g on v.fgroupid=g.fgroupid) vch
on r.fvchyear = vch.fyear and r.fvchperiod = vch.fperiod and r.fgroup = vch.fgoupname and r.fnum = vch.fnumber
update cn_yhrjz set fvoucherid=vch.fvoucherid
from cn_yhrjz r inner join
(select v.*,g.fname as fgoupname from t_voucher v left outer join t_vouchergroup g on v.fgroupid=g.fgroupid) vch
on r.fvchyear = vch.fyear and r.fvchperiod = vch.fperiod and r.fgroup = vch.fgoupname and r.fnum = vch.fnumber
update t_voucher set FIsDailyAccount=1
from t_voucher v inner join
(
select distinct fvoucherid from cn_xjrjz where fvoucherid>0
union
select distinct fvoucherid from cn_yhrjz where fvoucherid>0
) r
on v.fvoucherid = r.fvoucherid where (v.FIsDailyAccount<>1 or v.FIsDailyAccount is null)
update t_voucher set FIsDailyAccount=0
where FIsDailyAccount=1 and fvoucherid not in (select fvoucherid from
(
select distinct fvoucherid from cn_xjrjz where fvoucherid>0
union
select distinct fvoucherid from cn_yhrjz where fvoucherid>0
) r)