- 1、本文档共12页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
科目修改以后刷数据的方法1
案例:单位‘上海体育职业学院’code:053014 主功能科目为:2050305 高等职业教育
现在对应的科目为2070301 行政运行,需要修改。
科目修改需要调整科目,调整科目需要修改CCID
CCID:
1.1、先要查询表vw_budget_voucher。(指标)
select * from vw_budget_voucher t where t.en_code=053014 and t.bs_code=2070301 and t.is_valid=1;
需要注意的是,看下查询出来的指标条数和给的文件中的是否一致,金额是否一样。
取出它的CCID
select t.ccid from vw_budget_voucher t where t.en_code=053014 and t.bs_code=2070301 and t.is_valid=1;
1.2、找到额度表vw_yl_gl_balance。
select * from vw_yl_gl_balance t where t.CCID in(select t.ccid from vw_budget_voucher t where t.en_code=053014 and t.bs_code=2070301 and t.is_valid=1);
其中avi_money为可用额度,use_money为已经使用的,需要sum它们的钱数和文件中的是否一致。
1.3、查询 gl_journal。(总账)
select * from gl_journal t where t.ccid in(select t.ccid from vw_budget_voucher t where t.en_code=053014 and t.bs_code=2070301 and t.is_valid=1);
需要注意的是vou_money字段是否和文件中的总金额一致。
1.4、计划表
select * from vw_plan_voucher t where t.en_code=053014 and t.bs_code=2070301 and t.is_valid=1;
需要注意的是input_money是否和执行金额一致。
1.5、金额的CCID
select * from gl_balance t where t.fromctrlid in (select toctrlid from vw_budget_voucher t where t.en_code = 053014 and t.bs_code = 2070301 and t.is_valid = 1);
需要注意的是avi_money是否和执行金额一致。
1.6、新建一张临时表用来存放科目修改以后的CCID。
create table ccid_temp as select a.*,0 as new_ccid from(
select * from gl_ccids where ccid in( select t.ccid from plan_checked_bill t where t.id in(select t1.checked_bill_id from vw_plan_voucher t1 where t1.en_code=053014 and t1.bs_code=2070301 and t1.is_valid=1)
union select t.ccid from gl_balance t where t.fromctrlid in (select toctrlid from vw_budget_voucher t where t.en_code = 053014 and t.bs_code = 2070301 and t.is_valid = 1)
union select t.ccid from vw_plan_voucher t where t.en_code=053014 and t.bs_code=2070301 and t.is_valid=1
union select t.ccid from vw_budget_voucher t where t.en_code=053014 and t.bs_code=2070301 and t.is_valid=1)) a;
把查询到的CCID放到临时表中。
1.7、修改临时表的科目名称、编号、以及ID
在ELE_BUDGET_SUBJECT表中查询出需要修改的科目名称、编号、以及ID:
Select chr_id,chr_code,chr_name from ELE_BUDGET_SUBJECT t where
t.chr_code=20
您可能关注的文档
最近下载
- 电力调度数据网络接入技术规范及网络拓扑图.doc VIP
- ZZGA高频开关整流器使用说明书.doc
- 危重患者院内转运PPT.pptx VIP
- 匀变速直线运动的速度与时间的关系课件 2024-2025学年高一上学期物理人教版(2019)必修第一册.pptx VIP
- 《科学发展观》课件.ppt VIP
- 匀变速直线运动的位移与时间的关系 课件 -2024-2025学年高一上学期物理人教版(2019)必修第一册.pptx VIP
- 2022年西安市灞桥区事业单位考试真题.docx VIP
- 【课件】匀变速直线运动的位移与时间的关系+课件高一上学期物理人教版(2019)必修第一册.pptx VIP
- 2024西安市灞桥区事业单位考试笔试题库及答案.docx VIP
- 福建专升本 “三个代表” 重要思想(思维导图).pdf VIP
文档评论(0)