记固定资产折旧维护生成的凭证上查界面不显示的问题排查原创
11人赞赏了该文章
47次浏览
编辑于2024年04月15日 11:42:23
1、问题描述
近期发现有个折旧维护生成的凭证,上查折旧表不显示数据。
2、解决思路
通过录制SQL并对比其他正常的数据,可以得知此处应该是靠T_FA_FaDepreciation的FControlUnitID控制的
SELECT TOP 10000 TMP_SUBSELECT_ALIAS."LNKFADEPREENTRY.ID", TMP_SUBSELECT_ALIAS."ID" FROM ( SELECT DISTINCT TOP 10000 "LNKFADEPREENTRY".FID AS "LNKFADEPREENTRY.ID", "FADEPRECIATION".FID AS "ID" FROM T_FA_FaDepreciation AS "FADEPRECIATION" INNER JOIN T_FA_FaDepreciationEntry AS "LNKFADEPREENTRY" ON "FADEPRECIATION".FID = "LNKFADEPREENTRY".FLnkFaDepreEntry INNER JOIN T_BD_Period AS "PERIOD" ON "FADEPRECIATION".Fperiod = "PERIOD".FID INNER JOIN T_ORG_Company AS "COMPANY" ON "FADEPRECIATION".FCompanyID = "COMPANY".FID INNER JOIN T_FA_FaCurCard AS "FACURCARD" ON "LNKFADEPREENTRY".FFaCurCardID = "FACURCARD".FID INNER JOIN T_ORG_Admin AS "DEPT" ON "FACURCARD".FDeptID = "DEPT".FID INNER JOIN T_FA_Cat AS "ASSETCAT" ON "FACURCARD".FAssetCatID = "ASSETCAT".FID INNER JOIN T_FA_DepreciationMode AS "DEPRMODE" ON "FACURCARD".FDeprMethodID = "DEPRMODE".FID WHERE ( "FADEPRECIATION".FControlUnitID = ? OR "FADEPRECIATION".FControlUnitID = ? OR "FADEPRECIATION".FControlUnitID = ? ) AND "FADEPRECIATION".FID IN ('ttsAABbIoyj9R8KR') ORDER BY "ID" ASC ) AS TMP_SUBSELECT_ALIAS
后台检查果然有问题,于是进行修复,修复完成后就可以正常查看了。
SELECT * FROM T_FA_FaDepreciation where FCOMPANYID<>FCONTROLUNITID select * into bk240412_FaDepreciation FROM T_FA_FaDepreciation where FCOMPANYID<>FCONTROLUNITID update T_FA_FaDepreciation set FCONTROLUNITID=FCOMPANYID where FCOMPANYID<>FCONTROLUNITID
赞 11
11人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!
推荐阅读
您的鼓励与嘉奖将成为创作者们前进的动力,如果觉得本文还不错,可以给予作者创作打赏哦!
请选择打赏金币数 *
10金币20金币30金币40金币50金币60金币
可用金币: 0