using BP.En; using BP.Sys; namespace BP.WF.Data { /// /// 流程 属性 /// public class FlowSimpleAttr : EntityNoNameAttr { #region 基本属性 /// /// 到达人员(可以为空) /// public const string ToEmps = "ToEmps"; public const string ToEmpOfSQLs = "ToEmpOfSQLs"; public const string ToStations = "ToStations"; public const string ToDepts = "ToDepts"; public const string BeiZhu = "BeiZhu"; public const string DTOfExe = "DTOfExe"; /// /// 发起时间点 /// public const string StartDT = "StartDT"; /// /// 执行的时间点 /// public const string Dots = "Dots"; #endregion } /// /// 流程 /// public class FlowSimple : EntityNoName { #region 属性 /// /// 发起时间点 /// public string StartDT { get { return this.GetValStringByKey(FlowSimpleAttr.StartDT); } set { this.SetValByKey(FlowSimpleAttr.StartDT, value); } } /// /// 执行的时间点. /// public string Dots { get { return this.GetValStringByKey(FlowSimpleAttr.Dots); } set { this.SetValByKey(FlowSimpleAttr.Dots, value); } } /// /// 执行时间 /// public string DTOfExe { get { return this.GetValStringByKey(FlowSimpleAttr.DTOfExe); } set { this.SetValByKey(FlowSimpleAttr.DTOfExe, value); } } /// /// 到达的人员 /// public string ToEmps { get { return this.GetValStringByKey(FlowSimpleAttr.ToEmps); } set { this.SetValByKey(FlowSimpleAttr.ToEmps, value); } } public string ToEmpOfSQLs { get { return this.GetValStringByKey(FlowSimpleAttr.ToEmpOfSQLs); } set { this.SetValByKey(FlowSimpleAttr.ToEmpOfSQLs, value); } } #endregion #region 构造函数 /// /// FlowSimple /// public FlowSimple() { } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("WF_Flow", "流程"); map.EnType = EnType.View; map.AddTBStringPK(FlowSimpleAttr.No, null, "编号", true, true, 3, 3, 3); map.AddTBString(FlowSimpleAttr.Name, null, "名称", true, false, 0, 200, 200, true); map.AddTBString("OrgNo", null, "OrgNo", false, false, 0, 200, 200); map.AddHidden("OrgNo", " = ", "@WebUser.OrgNo"); this._enMap = map; return this._enMap; } } #endregion } /// /// 流程 /// public class FlowSimples : EntitiesNoName { #region 方法 /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new FlowSimple(); } } /// /// 流程 /// public FlowSimples() { } #endregion public override int RetrieveAll() { if (BP.Difference.SystemConfig.CCBPMRunModel == CCBPMRunModel.Single) return base.RetrieveAll(); return base.Retrieve("OrgNo", BP.Web.WebUser.OrgNo); } #region 为了适应自动翻译成java的需要,把实体转换成List. /// /// 转化成 java list,C#不能调用. /// /// List public System.Collections.Generic.IList ToJavaList() { return (System.Collections.Generic.IList)this; } /// /// 转化成list /// /// List public System.Collections.Generic.List Tolist() { System.Collections.Generic.List list = new System.Collections.Generic.List(); for (int i = 0; i < this.Count; i++) { list.Add((FlowSimple)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }