流程管理中心流程实例显示当前处理人二开示例

第一,在BOS设计器中找到WF_ProcInstBill,拓展之后新增一个文本字段,标识为F_xxx_CurrentReceiver,名称为当前处理人,可见性设置为列表默认可见,此字段用来显示,不存储数据。
第二:为WF_ProcInstBill挂上列表插件。插件代码示例如下:
using Kingdee.BOS.Core.List;
using Kingdee.BOS.Core.List.PlugIn;
using Kingdee.BOS.ServiceHelper;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Kingdee.BOS.Printing.PlugIn.Test
{
public class ProcInstCurrentReceiver : AbstractListPlugIn
{
bool Reload = false;
Dictionary<string, List<string>> dict = new Dictionary<string, List<string>>();
public override void OnInitialize(Core.DynamicForm.PlugIn.Args.InitializeEventArgs e)
{
base.OnInitialize(e);
Reload = true;
dict.Clear();
}
public override void FormatCellValue(Kingdee.BOS.Core.List.PlugIn.Args.FormatCellValueArgs args)
{
string formId = this.View.BillBusinessInfo.GetForm().Id;
if (formId.EqualsIgnoreCase(WFBillConst.ProcManageProcInstEndHis))
{return;}
if (Reload)
{
var page = (this.View as IListView).CurrentPageRowsInfo;
string[] procinstids = page.Select(p => p.PrimaryKeyValue).ToArray();
GetReceiver(procinstids);
Reload = false;
}
if (args.Header.Key.EqualsIgnoreCase("F_xxx_CurrentReceiver"))
{
var row = args.DataRow as Kingdee.BOS.Core.List.ListRow;
if (row == null)
{
return;
}
var procinstid = ObjectUtils.Object2String(row.DynamicObject["fprocinstid"]);
args.FormateValue = dict.ContainsKey(procinstid) ? string.Join(",", dict[procinstid]) : "";
}
base.FormatCellValue(args);
}
private void GetRecei流程管理中心流程实例显示当前处理人二开示例
第一,在BOS设计器中找到WF_ProcInstBill,拓展之后新增一个文本字段,标识为F_xxx_CurrentReceiver,名称为当前处理人,可见性设置为列表...
点击下载文档文档为doc格式
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
上一篇
已经是第一篇



