Python按钮插件调用存储过程

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

Python按钮插件调用存储过程

import clr
clr.AddReference("mscorlib")
clr.AddReference("Kingdee.BOS")
clr.AddReference("Kingdee.BOS.Core")
clr.AddReference("Kingdee.BOS.App")
clr.AddReference("System.Data")
from Kingdee.BOS import *
from Kingdee.BOS.App.Data import *
from Kingdee.BOS.Core.DynamicForm.PlugIn import *
from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import *
from Kingdee.BOS.Util import *
from System import *
from System.Collections.Generic import *
from System.Data import *

def AfterExecuteOperationTransaction(e):
    for billObj in e.DataEntitys:
        billId=billObj["Id"];
        billNo=billObj["BillNo"];
        
    #存储过程名称

    procedureName = "P_Sub_OrderToOA"
    sqlParameterList = List[SqlParam]()


    #存储过程参数

    sqlParameterList.Add(SqlParam("@FBillNo", KDDbType.AnsiString, billNo))
    DBUtils.ExecuteStoreProcedure(this.Context, procedureName, sqlParameterList)    
    

    #显示结果信息    
    #result=OperateResult()
    #result.SuccessStatus=True
    #result.PKValue = billId
    #result.Number = billNo
    #result.Message = "通知OA发起对应流程,单据号:"+billNo
    #this.OperationResult.OperateResult.Add(result)


sqlParameterList.Add(SqlParam("@FBillNo", KDDbType.AnsiString, billNo))

这一句的意思是,给存储过程数据输入参数? 

正常数据库执行应该是 exec P_Sub_OrderToOA  'fbillno',是这个意思么

Python按钮插件调用存储过程

import clrclr.AddReference("mscorlib")clr.AddReference("Kingdee.BOS")clr.AddReference("Kingdee.BOS.Core")clr.AddReference("Kingdee...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息