二开插件-工作流审批路线--通过二开增加节点创建时间
1、需要扩展的元数据:
2、元数据增加节点创建时间:
3、插件代码
using Kingdee.BOS.Core.DynamicForm.PlugIn;using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;using Kingdee.BOS.Core.List;using Kingdee.BOS.Mobile.FormPlugIns.EntryDetails;using Kingdee.BOS.Orm.DataEntity;using Kingdee.BOS.Workflow.Models.Chart;using Kingdee.BOS.Workflow.ServiceHelper;using System;using System.Collections.Generic;using System.ComponentModel;using System.Linq;using System.Text;namespace Kingdee.BOS.Mobile.FormPlugIns{ /// /// 审批路线测试插件 /// [Description("审批路线测试插件")] public class TestFlowWay : AbstractDynamicFormPlugIn { private List<ChartActivityInfo> activityList; public override void OnInitialize(Core.DynamicForm.PlugIn.Args.InitializeEventArgs e) { base.OnInitialize(e); if (e.Paramter.GetCustomParameter("procInstId") != null) { string procInstId = e.Paramter.GetCustomParameter("procInstId").ToString(); activityList = WorkflowChartServiceHelper.GetProcessRouter(this.View.Context, procInstId); } }public override void AfterBindData(EventArgs e) { base.AfterBindData(e); if (activityList.Count >= 0) { var list = this.Model.DataObject["FFlowWay"] as DynamicObjectCollection; foreach (DynamicObject item in list) { if (item["FACTINSTID"] != null && item["FACTINSTID"].ToString() != "") { var activity = activityList.Where(x => x.ActInstId == item["FACTINSTID"].ToString()).FirstOrDefault(); if (activity != null) { //数据库里取出的时间需要转一下时区 DateTime? createTime = activity.CreateTime.HasValue ? View.Context.SystemTimeZone.ConvertTime(activity.CreateTime.Value, View.Context.CurrentUserTimeZone) : activity.CreateTime; item["FActivityCreateTime"] = createTime; } } } this.View.UpdateView("FFlowWay"); } } } }
4、运行效果图:
二开插件-工作流审批路线--通过二开增加节点创建时间
1、需要扩展的元数据:2、元数据增加节点创建时间:3、插件代码using Kingdee.BOS.Core.DynamicForm.PlugIn;using Kingdee.BOS.Core.Dynami...
点击下载文档
本文2024-09-23 04:15:20发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-164127.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章