Grp_ScheduleInfo.cs 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. using OASystem.Domain.Enums;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Runtime.Serialization.Formatters.Binary;
  6. using System.Runtime.Serialization;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace OASystem.Domain.Entities.Groups
  10. {
  11. /// <summary>
  12. /// 团组流程管控
  13. /// </summary>
  14. [SugarTable("Grp_Schedule")]
  15. public class Grp_ScheduleInfo : EntityBase
  16. {
  17. /// <summary>
  18. /// 团组Id
  19. /// </summary>
  20. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  21. public int DiId { get; set; }
  22. /// <summary>
  23. /// 当前主流程
  24. /// </summary>
  25. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  26. public GrpSchedulePrimaryStepEnum PrimaryStep { get; set; }
  27. /// <summary>
  28. /// 当前子流程
  29. /// </summary>
  30. //[SugarColumn(IsNullable = true, ColumnDataType = "int")]
  31. //public int DetailStep { get; set; }
  32. /// <summary>
  33. /// 预计开始时间
  34. /// </summary>
  35. [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
  36. public DateTime ExpectBeginDt { get; set; }
  37. /// <summary>
  38. /// 预计结束时间
  39. /// </summary>
  40. [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
  41. public DateTime ExpectEndDt { get; set; }
  42. /// <summary>
  43. /// 实际开始时间
  44. /// </summary>
  45. [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
  46. public DateTime RealBeginDt { get; set; }
  47. /// <summary>
  48. /// 实际结束时间
  49. /// </summary>
  50. [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
  51. public DateTime RealEndDt { get; set; }
  52. /// <summary>
  53. /// 总负责人(SysUser.Id)
  54. /// </summary>
  55. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  56. public int Leader { get; set; }
  57. /// <summary>
  58. /// 异常状态0:正常,1:异常
  59. /// </summary>
  60. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  61. public int Exception { get; set; }
  62. }
  63. /// <summary>
  64. /// 团组流程管控详细进度
  65. /// 因为要实现DeepClone 字段必须在同一类下所以不能继承EntityBase
  66. /// </summary>
  67. [SugarTable("Grp_ScheduleDetail")]
  68. [Serializable]
  69. public class Grp_ScheduleDetailInfo : ICloneable
  70. {
  71. /// <summary>
  72. /// 编号
  73. /// </summary>
  74. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
  75. public int Id { get; set; }
  76. /// <summary>
  77. /// 创建者Id
  78. /// </summary>
  79. [SugarColumn(ColumnDescription = "创建者Id", IsNullable = true, ColumnDataType = "int")]
  80. public int CreateUserId { get; set; }
  81. /// <summary>
  82. /// 创建时间
  83. /// </summary>
  84. [SugarColumn(ColumnDescription = "创建时间", IsNullable = true, ColumnDataType = "DateTime")]
  85. public DateTime CreateTime { get; set; } = DateTime.Now;
  86. /// <summary>
  87. /// 删除者Id
  88. /// </summary>
  89. [SugarColumn(ColumnDescription = "删除者Id", IsNullable = true, ColumnDataType = "int")]
  90. public int? DeleteUserId { get; set; }
  91. /// <summary>
  92. /// 删除时间
  93. /// </summary>
  94. [SugarColumn(ColumnDescription = "删除时间", IsNullable = true, ColumnDataType = "varchar(30)")]
  95. public string DeleteTime { get; set; }
  96. /// <summary>
  97. /// 备注
  98. /// </summary>
  99. [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
  100. public string Remark { get; set; }
  101. /// <summary>
  102. /// 是否删除
  103. /// </summary>
  104. [SugarColumn(ColumnDescription = "是否删除", IsNullable = true, ColumnDataType = "int")]
  105. public int IsDel { get; set; }
  106. /// <summary>
  107. /// 团组流程Id
  108. /// </summary>
  109. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  110. public int ScheduleId { get; set; }
  111. /// <summary>
  112. /// 等级
  113. /// </summary>
  114. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  115. public int SLevel { get; set; }
  116. /// <summary>
  117. /// 流程
  118. /// </summary>
  119. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  120. public int Step { get; set; }
  121. /// <summary>
  122. /// 父级流程
  123. /// </summary>
  124. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  125. public int ParentStep { get; set; }
  126. /// <summary>
  127. /// 流程状态
  128. /// <list type="table">
  129. /// <item><para>0:待分配(未开始)</para></item>
  130. /// <item><para>1:进行中</para></item>
  131. /// <item><para>2:已完成</para></item>
  132. /// </list>
  133. /// </summary>
  134. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  135. public int StepStatus { get; set; }
  136. /// <summary>
  137. /// 负责人员(SysUser.Id)
  138. /// </summary>
  139. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  140. public int Duty { get; set; }
  141. /// <summary>
  142. /// 工作内容
  143. /// </summary>
  144. [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
  145. public string JobContent { get; set; }
  146. /// <summary>
  147. /// 预计开始时间
  148. /// </summary>
  149. [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
  150. public DateTime ExpectBeginDt { get; set; }
  151. /// <summary>
  152. /// 预计结束时间
  153. /// </summary>
  154. [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
  155. public DateTime ExpectEndDt { get; set; }
  156. /// <summary>
  157. /// 实际开始时间
  158. /// </summary>
  159. [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
  160. public DateTime RealBeginDt { get; set; }
  161. /// <summary>
  162. /// 实际结束时间
  163. /// </summary>
  164. [SugarColumn(IsNullable = true, ColumnDataType = "datetime")]
  165. public DateTime RealEndDt { get; set; }
  166. /// <summary>
  167. /// 异常状态0:正常,1:异常
  168. /// </summary>
  169. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  170. public int Exception { get; set; }
  171. public object Clone()
  172. {
  173. return this.MemberwiseClone();
  174. }
  175. public Grp_ScheduleDetailInfo DeepClone()
  176. {
  177. using (Stream objectStream = new MemoryStream())
  178. {
  179. IFormatter formatter = new BinaryFormatter();
  180. formatter.Serialize(objectStream, this);
  181. objectStream.Seek(0, SeekOrigin.Begin);
  182. return formatter.Deserialize(objectStream) as Grp_ScheduleDetailInfo;
  183. }
  184. }
  185. }
  186. /// <summary>
  187. /// 团组流程管控人员配置
  188. /// </summary>
  189. [SugarTable("Grp_SchedulePerson")]
  190. public class Grp_SchedulePersonInfo : EntityBase
  191. {
  192. /// <summary>
  193. /// 流程Id
  194. /// </summary>
  195. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  196. public int ScheduleId { get; set; }
  197. /// <summary>
  198. /// 人员编号(SysUser.Id)
  199. /// </summary>
  200. [SugarColumn(IsNullable = true, ColumnDataType = "int")]
  201. public int SysUserId { get; set; }
  202. /// <summary>
  203. /// 人员姓名
  204. /// </summary>
  205. [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
  206. public string SysUserName { get; set; }
  207. /// <summary>
  208. /// 负责工作
  209. /// </summary>
  210. [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
  211. public string JobStr { get; set; }
  212. }
  213. }