using System; using System.Data; using BP.DA; using BP.En; using BP.WF; using BP.Port; namespace BP.WF { /// /// 退回轨迹 /// public class ReturnWorkAttr { #region 基本属性 /// /// 工作ID /// public const string WorkID = "WorkID"; /// /// fid /// public const string FID = "FID"; /// /// 工作人员 /// public const string Worker = "Worker"; /// /// 退回原因 /// public const string BeiZhu = "BeiZhu"; /// /// 退回日期 /// public const string RDT = "RDT"; /// /// 退回人 /// public const string Returner = "Returner"; /// /// 退回人名称 /// public const string ReturnerName = "ReturnerName"; /// /// 退回到节点 /// public const string ReturnToNode = "ReturnToNode"; /// /// 退回节点 /// public const string ReturnNode = "ReturnNode"; /// /// 退回节点名称 /// public const string ReturnNodeName = "ReturnNodeName"; /// /// 退回给 /// public const string ReturnToEmp = "ReturnToEmp"; /// /// 退回后是否需要原路返回? /// public const string IsBackTracking = "IsBackTracking"; /// /// frm格式化的数据. /// public const string FrmDB = "FrmDB"; #endregion } /// /// 退回轨迹 /// public class ReturnWork : EntityMyPK { #region 基本属性 /// /// 工作ID /// public Int64 WorkID { get { return this.GetValInt64ByKey(ReturnWorkAttr.WorkID); } set { SetValByKey(ReturnWorkAttr.WorkID, value); } } /// /// FID /// public Int64 FID { get { return this.GetValInt64ByKey(ReturnWorkAttr.FID); } set { SetValByKey(ReturnWorkAttr.FID, value); } } /// /// 退回到节点 /// public int ReturnToNode { get { return this.GetValIntByKey(ReturnWorkAttr.ReturnToNode); } set { SetValByKey(ReturnWorkAttr.ReturnToNode, value); } } /// /// 退回节点 /// public int ReturnNode { get { return this.GetValIntByKey(ReturnWorkAttr.ReturnNode); } set { SetValByKey(ReturnWorkAttr.ReturnNode, value); } } public string ReturnNodeName { get { return this.GetValStrByKey(ReturnWorkAttr.ReturnNodeName); } set { SetValByKey(ReturnWorkAttr.ReturnNodeName, value); } } /// /// 退回人 /// public string Returner { get { return this.GetValStringByKey(ReturnWorkAttr.Returner); } set { SetValByKey(ReturnWorkAttr.Returner, value); } } public string ReturnerName { get { return this.GetValStringByKey(ReturnWorkAttr.ReturnerName); } set { SetValByKey(ReturnWorkAttr.ReturnerName, value); } } /// /// 退回给 /// public string ReturnToEmp { get { return this.GetValStringByKey(ReturnWorkAttr.ReturnToEmp); } set { SetValByKey(ReturnWorkAttr.ReturnToEmp, value); } } public string BeiZhu { get { return this.GetValStringByKey(ReturnWorkAttr.BeiZhu); } set { SetValByKey(ReturnWorkAttr.BeiZhu, value); } } public string BeiZhuHtml { get { return this.GetValHtmlStringByKey(ReturnWorkAttr.BeiZhu); } } /// /// 记录日期 /// public string RDT { get { return this.GetValStringByKey(ReturnWorkAttr.RDT); } set { SetValByKey(ReturnWorkAttr.RDT, value); } } /// /// 是否要原路返回? /// public bool IsBackTracking { get { return this.GetValBooleanByKey(ReturnWorkAttr.IsBackTracking); } set { SetValByKey(ReturnWorkAttr.IsBackTracking, value); } } #endregion #region 构造函数 /// /// 退回轨迹 /// public ReturnWork() { } /// /// 重写基类方法 /// public override Map EnMap { get { if (this._enMap != null) return this._enMap; Map map = new Map("WF_ReturnWork", "退回轨迹"); map.AddMyPK(); map.AddTBInt(ReturnWorkAttr.WorkID, 0, "WorkID", true, true); map.AddTBInt(ReturnWorkAttr.FID, 0, "FID", true, true); map.AddTBInt(ReturnWorkAttr.ReturnNode, 0, "退回节点", true, true); map.AddTBString(ReturnWorkAttr.ReturnNodeName, null, "退回节点名称", true, true, 0, 100, 10); map.AddTBString(ReturnWorkAttr.Returner, null, "退回人", true, true, 0, 50, 10); map.AddTBString(ReturnWorkAttr.ReturnerName, null, "退回人名称", true, true, 0, 100, 10); map.AddTBInt(ReturnWorkAttr.ReturnToNode, 0, "退回到的节点", true, true); map.AddTBString(ReturnWorkAttr.ReturnToEmp, null, "退回给", true, true, 0, 4000, 10); //如果是frm类型,就是格式化的json数据. map.AddTBString(ReturnWorkAttr.BeiZhu, null, "退回原因", true, true, 0, 4000, 10); map.AddTBDateTime(ReturnWorkAttr.RDT, null, "退回日期", true, true); map.AddTBInt(ReturnWorkAttr.IsBackTracking, 0, "是否要原路返回", true, true); // map.AddTBInt(ReturnWorkAttr.IsBackResetAccepter, 0, "是否要原路返回", true, true); // map.AddTBString(ReturnWorkAttr.FrmDB, null, "退回的Frm格式化数据", true, true, 0, 3999, 10); // map.AddAttrsFromMapData("BP.WF.ReturnWorks"); this._enMap = map; return this._enMap; } } #endregion protected override bool beforeInsert() { this.Returner = BP.Web.WebUser.No; this.ReturnerName = BP.Web.WebUser.Name; this.RDT = DataType.CurrentDateTime; return base.beforeInsert(); } } /// /// 退回轨迹s /// public class ReturnWorks : Entities { #region 构造 /// /// 退回轨迹s /// public ReturnWorks() { } /// /// 得到它的 Entity /// public override Entity GetNewEntity { get { return new ReturnWork(); } } #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((ReturnWork)this[i]); } return list; } #endregion 为了适应自动翻译成java的需要,把实体转换成List. } }