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按钮插件调用存储过程
本文2024-09-16 17:12:14发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-14200.html