|
执行储存过程
- CREATE PROCEDURE SP_jczi
- AS
- BEGIN
- TRUNCATE TABLE T_BAS_PREBDONE
- TRUNCATE TABLE T_BAS_PREBDONE_L
- --插入编码基础资料
- insert into T_BAS_PREBDONE (FID,FMasterId,FCREATEORGID,FUSEORGID,FNUMBER,FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,FFORBIDSTATUS,FDOCUMENTSTATUS)
- select FSUPPLIERID AS FID,FMasterId,FCREATEORGID,FUSEORGID,FNUMBER,FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,FFORBIDSTATUS,FDOCUMENTSTATUS from t_BD_Supplier
- --插入基础资料名称
- insert into T_BAS_PREBDONE_L(FPKID,FID,FLocaleID,FNAME)
- select FPKID,FSUPPLIERID AS FID,FLocaleID,FNAME from T_BD_SUPPLIER_L
- END
复制代码 执行Python代码
- # 引入 clr 运行库
- import clr
- clr.AddReference("Kingdee.BOS.Core")
- clr.AddReference("Kingdee.BOS.App")
- clr.AddReference("Kingdee.BOS")
- # 添加对 cloud 插件开发的常用组件的引用
- from Kingdee.BOS.Core.Bill.PlugIn import *
- from Kingdee.BOS.Core.Bill.PlugIn.Args import *
- from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import *
- from Kingdee.BOS.App.Data import *
- def AfterBarItemClick(e):
- # 判断点击审核按钮(菜单和列表一致)
- if e.BarItemKey == "tbSplitApprove" or e.BarItemKey == "tbApprove":
- # 执行 MSSQL 存储过程
- DBUtils.Execute(this.Context, "/*dialect*/exec SP_jczi")
复制代码
|
|