操作服务插件(Python)
5人赞赏了该文章
590次浏览
编辑于2024年08月27日 15:23:11
源码来自敏蝶老李头
做个笔记,方便查询
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)
本文转载自:社区
作者:敏蝶老李头
原文链接:https://vip.kingdee.com/article/452432069977609216?productLineId=1&lang=zh-CN
赞 5
5人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!