操作服务插件(Python)
源码来自敏蝶老李头
做个笔记,方便查询
import clr clr.AddReference("System") clr.AddReference("System.Core") clr.AddReference("Kingdee.BOS") clr.AddReference("Kingdee.BOS.Core") clr.AddReference("Kingdee.BOS.DataEntity") clr.AddReference('Kingdee.BOS.ServiceHelper') clr.AddReference('Kingdee.BOS.App') clr.AddReference("Newtonsoft.Json") from Kingdee.BOS import * from Kingdee.BOS.Core import * from Kingdee.BOS.App import * from Kingdee.BOS.App.Data import * from Kingdee.BOS.Util import * from Kingdee.BOS.Core.DynamicForm import * from Kingdee.BOS.Core.DynamicForm.PlugIn import * from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import * from Kingdee.BOS.Core.Metadata.FormElement import * from Kingdee.BOS.ServiceHelper import * from System import * from System.Net import * from System.IO import * from System.Linq import * from System.Text import * from Newtonsoft.Json import * from Newtonsoft.Json.Linq import * def AfterExecuteOperationTransaction(e): #this.OperationResult.IsShowMessage = True #保存之后 Operation_Save #提交之后 Operation_Submit #审核之后 Operation_Audit billid = "" billno="" if this.FormOperation.OperationId == FormOperation.Operation_Save: obj = e.DataEntitys; for item in obj: billid = item["Id"].ToString() billno = item["BillNo"].ToString() if billid is not None and billid!="": sql="exec u_gx_somu {0}".format(billid) DBUtils.Execute(this.Context,sql) #result=OperateResult() #result.SuccessStatus = True #result.PKValue = billid #result.Number = billno #result.Message = "{0}".format(billid+"\r\n"+sql) #this.OperationResult.OperateResult.Add(result)
操作服务插件(Python)
源码来自敏蝶老李头做个笔记,方便查询import clrclr.AddReference("System")clr.AddReference("System.Core")clr.AddReference("Kingdee.B...
点击下载文档
本文2024-09-16 18:04:42发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-19804.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章