企业新闻
南通金蝶KIS专业版:固定资产卡片保存报错,系统提示“method~object~failed”
问题描述:卡片重新编辑后保存时报错,系统提示“method~object~failed” 问题原因:卡片已经存在变动记录,但数据不正确, 解决方法:select falterid, max(famulalterclassid) famulalterclassid into #t1 from t_facarditem group by falterid delete from t_facarditem insert into t_facarditem select * from #t1 drop table #t1 update x set x.famulalterclassid=c.coun-1 from t_facarditem x, (select * from (select fassetid, count(fassetid) coun from t_faalter group by fassetid) a left join (select fassetid idd, max(falterid) falterid from t_faalter group by fassetid) b on a.fassetid=b.idd) c where x.falterid=c.falterid DECLARE @A1 int DECLARE @A2 int select @A1=(select max(famulalterclassid) from t_facarditem) WHILE @A1 > 0 BEGIN IF EXISTS(SELECT falterid from t_facarditem group by falterid having max(famulalterclassid)=@A1 and count(falterid)<>@A1+1) declare @t1 int --步长定义 DECLARE cur CURSOR FOR SELECT falterid from t_facarditem group by falterid having max(famulalterclassid)=@A1 and count(falterid)<>@A1+1 OPEN cur FETCH cur INTO @A2 WHILE @@FETCH_STATUS <> -1 begin set @t1=@A1-1 WHILE @t1>=0 begin if not EXISTS(SELECT * from t_facarditem where FAlterID=@A2 and FAMulAlterClassID=@t1) insert into t_facarditem(FAlterID,FAMulAlterClassID) values(@A2,@t1) else set @t1=@t1-1 End FETCH next from cur INTO @A2 End close cur deallocate cur set @A1=@A1-1 End
搜索关键字:南通金蝶KIS专业版 南通金蝶KIS专业版固定资产卡片编辑报错