using BP.En; namespace BP.WF.Data { /// /// 自动报表 属性 /// public class AutoRptDtlAttr : EntityNoNameAttr { #region 基本属性 /// /// 发起人 /// public const string AutoRptNo = "AutoRptNo"; /// /// 插入日期 /// public const string SQLExp = "SQLExp"; public const string BeiZhu = "BeiZhu"; public const string UrlExp = "UrlExp"; #endregion } /// /// 自动报表-数据项 /// public class AutoRptDtl : EntityOIDName { #region 属性 /// /// 对应的任务. /// public string AutoRptNo { get { return this.GetValStringByKey(AutoRptDtlAttr.AutoRptNo); } set { this.SetValByKey(AutoRptDtlAttr.AutoRptNo, value); } } /// /// 到达的人员 /// public string SQLExp { get { string str = this.GetValStringByKey(AutoRptDtlAttr.SQLExp); return BP.WF.Glo.DealExp(str, null); } set { this.SetValByKey(AutoRptDtlAttr.SQLExp, value); } } public string UrlExp { get { string str = this.GetValStringByKey(AutoRptDtlAttr.UrlExp); return BP.WF.Glo.DealExp(str, null); } set { this.SetValByKey(AutoRptDtlAttr.UrlExp, value); } } /// /// 发起时间(可以为空) /// public string BeiZhu { get { return this.GetValStringByKey(AutoRptDtlAttr.BeiZhu); } set { this.SetValByKey(AutoRptDtlAttr.BeiZhu, value); } } #endregion #region 构造函数 /// /// AutoRptDtl /// public AutoRptDtl() { } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("WF_AutoRptDtl", "自动报表-数据项"); map.CodeStruct = "3"; //主键. map.AddTBIntPKOID(); map.AddTBString(AutoRptDtlAttr.Name, null, "标题", true, false, 0, 300, 150); map.AddTBString(AutoRptDtlAttr.SQLExp, null, "SQL表达式(返回一个数字)", true, false, 0, 300, 300); //map.AddTBStringDoc(AutoRptDtlAttr.SQLExp, null, "SQL表达式(返回一个数字)", true, false, true); string msg = "返回的一行一列:"; msg += "\t\n比如:SELECT COUNT(*) FROM WF_EmpWorks WHERE FK_Emp ='@WebUser.No'"; msg += "\t\n支持ccbpm表达式。"; map.SetHelperAlert(AutoRptDtlAttr.SQLExp, msg); map.AddTBString(AutoRptDtlAttr.UrlExp, null, "Url表达式", true, false, 0, 300, 300); msg = "具有绝对路径的Url表达式:"; msg += "\t\n比如:http:/128.1.1.1:9090/myurl.htm?UserNo=@WebUser.No"; msg += "\t\n支持ccbpm表达式。"; map.SetHelperAlert(AutoRptDtlAttr.UrlExp, msg); map.AddTBString(AutoRptDtlAttr.BeiZhu, null, "备注", true, false, 0, 500, 150); map.AddTBString(AutoRptDtlAttr.AutoRptNo, null, "任务ID", false, false, 0, 20, 10); this._enMap = map; return this._enMap; } } #endregion } /// /// 自动报表-数据项 /// public class AutoRptDtls : EntitiesOIDName { #region 方法 /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new AutoRptDtl(); } } /// /// 自动报表 /// public AutoRptDtls() { } #endregion #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((AutoRptDtl)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }