数据处理问题集原创
金蝶云社区-白开水
白开水
8人赞赏了该文章 505次浏览 未经作者许可,禁止转载编辑于2022年08月27日 15:00:58

1、处理先核算,再关账的结账问题(风险)

----------更新成本计算合法性检查

INSERT INTO T_HS_OUTACCTGCHECK( FENTRYID, FID, FSEQ, FPROCESSENTRYID, FBILLTYPE, FBILLFROMID, FBILLID, FBILLENTRYID, FBILLSEQ, FCHECKID, FBILLNO, FBILLCHECKRESULT, FSHOWMODE, FBILLCHECKITEM, FHELPMSG)

select row_number() over(order by t1.FID)+500 FENTRYID,t1.FID,t7.FSEQ,0 FPROCESSENTRYID,' ' FBILLTYPE,' ' FBILLFROMID,0 FBILLID,0 FBILLENTRYID,0 FBILLSEQ,0 FCHECKID,' ' FBILLNO,0 FBILLCHECKRESULT,0 FSHOWMODE,t7.FBILLCHECKITEM,' ' FHELPMSG from T_HS_OUTACCTG T1

inner JOIN T_HS_CALDIMENSIONS T2 ON T1.FDIMENSIONID=T2.FDIMENSIONID

inner JOIN (SELECT FORGID FROM T_BAS_SYSTEMPROFILE where fcategory='HS' and fkey='CurrentPeriod' and fvalue='3' and facctsystemid=390533) T3 ON T2.FFINORGID=T3.FORGID

inner join T_ORG_ORGANIZATIONS_L t4 on t3.FORGID=t4.forgid and t4.FLOCALEID=2052

inner join T_ORG_ORGANIZATIONS t5 on t4.FORGID=t5.FORGID

inner join tmp_updateOUTACCTGCHECK t7 on 1=1

where fperiod=3 and t5.fnumber in ('1001003','1001008') 


select * from T_HS_OUTACCTGCHECK order by fentryid


---------------------更新存货核算合法性检查

select t1.*,t1.rowid from T_HS_OUTACCTG T1

INNER JOIN T_HS_CALDIMENSIONS T2 ON T1.FDIMENSIONID=T2.FDIMENSIONID

INNER JOIN (SELECT FORGID FROM T_BAS_SYSTEMPROFILE where fcategory='HS' and fkey='CurrentPeriod' and fvalue='3' and facctsystemid=390533) T3 ON T2.FFINORGID=T3.FORGID

inner join T_ORG_ORGANIZATIONS_L t4 on t3.FORGID=t4.forgid and t4.FLOCALEID=2052

inner join T_ORG_ORGANIZATIONS t5 on t4.FORGID=t5.FORGID

where fperiod=3 and t5.fnumber in ('1005')

--------更改存货关账操作日期

select t.*,t.rowid from T_STK_CLOSEPROFILE t where t.FCATEGORY='HS' and to_char(t.FOPERATETIME,'yyyy-mm-dd hh24:mi:ss')>'2022-05-28 09:00:20'


2、存货核算慢,增加系统参数:启用内部交易单据源单关系转换优化参数

select *from T_BAS_SYSTEMPROFILE WHERE FKEY = 'OVERORGREVERTTYPE' and FCATEGORY='HS';

INSERT INTO T_BAS_SYSTEMPROFILE(FCATEGORY,FORGID,FACCOUNTBOOKID,FKEY,FVALUE,FACCTPOLICYID,FACCTSYSTEMID)

VALUES('HS',0,0,'OVERORGREVERTTYPE','1',0,0);



图标赞 8
8人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!