AdoS0WarehouseBasicDtos.cs 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. namespace Admin.NET.Plugin.AiDOP.Dto.S0.Warehouse;
  2. // ========== 部门 ==========
  3. public class AdoS0DepartmentQueryDto
  4. {
  5. public long? CompanyRefId { get; set; }
  6. public long? FactoryRefId { get; set; }
  7. public string? DomainCode { get; set; }
  8. public string? Keyword { get; set; }
  9. public bool? IsActive { get; set; }
  10. public int Page { get; set; } = 1;
  11. public int PageSize { get; set; } = 20;
  12. }
  13. public class AdoS0DepartmentUpsertDto
  14. {
  15. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  16. public long CompanyRefId { get; set; }
  17. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  18. public long FactoryRefId { get; set; }
  19. [MaxLength(50)]
  20. public string? DomainCode { get; set; }
  21. [Required(ErrorMessage = "部门编码不能为空")]
  22. [MaxLength(100)]
  23. public string Department { get; set; } = string.Empty;
  24. [MaxLength(255)]
  25. public string? Descr { get; set; }
  26. public bool IsActive { get; set; } = true;
  27. [MaxLength(100)]
  28. public string? CreateUser { get; set; }
  29. [MaxLength(100)]
  30. public string? UpdateUser { get; set; }
  31. }
  32. // ========== 雇员 ==========
  33. public class AdoS0EmployeeQueryDto
  34. {
  35. public long? CompanyRefId { get; set; }
  36. public long? FactoryRefId { get; set; }
  37. public string? DomainCode { get; set; }
  38. public string? Keyword { get; set; }
  39. public string? Department { get; set; }
  40. public bool? IsActive { get; set; }
  41. public int Page { get; set; } = 1;
  42. public int PageSize { get; set; } = 20;
  43. }
  44. public class AdoS0EmployeeUpsertDto
  45. {
  46. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  47. public long CompanyRefId { get; set; }
  48. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  49. public long FactoryRefId { get; set; }
  50. [MaxLength(50)]
  51. public string? DomainCode { get; set; }
  52. [Required(ErrorMessage = "员工编码不能为空")]
  53. [MaxLength(100)]
  54. public string Employee { get; set; } = string.Empty;
  55. [MaxLength(200)]
  56. public string? Name { get; set; }
  57. [MaxLength(10)]
  58. public string? Sex { get; set; }
  59. [MaxLength(50)]
  60. public string? Phone { get; set; }
  61. [MaxLength(200)]
  62. public string? Email { get; set; }
  63. public DateTime? BirthDate { get; set; }
  64. [MaxLength(100)]
  65. public string? Department { get; set; }
  66. public DateTime? DateEmployed { get; set; }
  67. [MaxLength(50)]
  68. public string? EmploymentStatus { get; set; }
  69. [MaxLength(50)]
  70. public string? MaritalStatus { get; set; }
  71. [MaxLength(100)]
  72. public string? JobTitle { get; set; }
  73. public DateTime? DateTerminated { get; set; }
  74. [MaxLength(100)]
  75. public string? WorkCtr { get; set; }
  76. [MaxLength(100)]
  77. public string? CarId { get; set; }
  78. [MaxLength(100)]
  79. public string? DefaultWorkLocation { get; set; }
  80. public bool IsActive { get; set; } = true;
  81. [MaxLength(100)]
  82. public string? CreateUser { get; set; }
  83. [MaxLength(100)]
  84. public string? UpdateUser { get; set; }
  85. }
  86. // ========== 成本中心 ==========
  87. public class AdoS0CostCtrQueryDto
  88. {
  89. public long? CompanyRefId { get; set; }
  90. public long? FactoryRefId { get; set; }
  91. public string? DomainCode { get; set; }
  92. public string? Keyword { get; set; }
  93. public int Page { get; set; } = 1;
  94. public int PageSize { get; set; } = 20;
  95. }
  96. public class AdoS0CostCtrUpsertDto
  97. {
  98. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  99. public long CompanyRefId { get; set; }
  100. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  101. public long FactoryRefId { get; set; }
  102. [MaxLength(50)]
  103. public string? DomainCode { get; set; }
  104. [Required(ErrorMessage = "成本中心编码不能为空")]
  105. [MaxLength(100)]
  106. public string CostCtr { get; set; } = string.Empty;
  107. [MaxLength(255)]
  108. public string? Descr { get; set; }
  109. [MaxLength(255)]
  110. public string? Ufld1 { get; set; }
  111. public DateTime? EffTime { get; set; }
  112. [MaxLength(100)]
  113. public string? CreateUser { get; set; }
  114. [MaxLength(100)]
  115. public string? UpdateUser { get; set; }
  116. }
  117. // ========== 库位 ==========
  118. public class AdoS0LocationQueryDto
  119. {
  120. public long? CompanyRefId { get; set; }
  121. public long? FactoryRefId { get; set; }
  122. public string? DomainCode { get; set; }
  123. public string? Keyword { get; set; }
  124. public string? Typed { get; set; }
  125. public bool? IsActive { get; set; }
  126. public int Page { get; set; } = 1;
  127. public int PageSize { get; set; } = 20;
  128. }
  129. public class AdoS0LocationUpsertDto
  130. {
  131. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  132. public long CompanyRefId { get; set; }
  133. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  134. public long FactoryRefId { get; set; }
  135. [MaxLength(50)]
  136. public string? DomainCode { get; set; }
  137. [Required(ErrorMessage = "库位编码不能为空")]
  138. [MaxLength(100)]
  139. public string Location { get; set; } = string.Empty;
  140. [MaxLength(255)]
  141. public string? Descr { get; set; }
  142. [MaxLength(300)]
  143. public string? Storer { get; set; }
  144. [MaxLength(50)]
  145. public string? Typed { get; set; }
  146. [MaxLength(500)]
  147. public string? PhysicalAddress { get; set; }
  148. public bool IsActive { get; set; } = true;
  149. [MaxLength(100)]
  150. public string? CreateUser { get; set; }
  151. [MaxLength(100)]
  152. public string? UpdateUser { get; set; }
  153. /// <summary>
  154. /// 货架明细(FULL Replace)。仅接受 InvShelf/Descr/Area(及可选 Id,本次不依赖);
  155. /// tenant/company/factory/domain/location/审计一律由服务端从库位主表 + 上下文赋值,不信任前端传值。
  156. /// </summary>
  157. public List<AdoS0LocationShelfInputDto> Shelves { get; set; } = new();
  158. }
  159. /// <summary>
  160. /// 库位货架明细入参(库位主从保存用)。前端仅允许提交货架编码/描述/区域,作用域字段由服务端统一赋值。
  161. /// </summary>
  162. public class AdoS0LocationShelfInputDto
  163. {
  164. /// <summary>回显用;FULL Replace 保存不依赖此 Id。</summary>
  165. public long? Id { get; set; }
  166. [Required(ErrorMessage = "货架编码不能为空")]
  167. [MaxLength(100)]
  168. public string InvShelf { get; set; } = string.Empty;
  169. [MaxLength(255)]
  170. public string? Descr { get; set; }
  171. [MaxLength(100)]
  172. public string? Area { get; set; }
  173. }
  174. /// <summary>
  175. /// 库位详情输出(含货架明细,供编辑回显)。
  176. /// </summary>
  177. public class AdoS0LocationDetailDto
  178. {
  179. public long Id { get; set; }
  180. public long CompanyRefId { get; set; }
  181. public long FactoryRefId { get; set; }
  182. public string DomainCode { get; set; } = string.Empty;
  183. public string Location { get; set; } = string.Empty;
  184. public string? Descr { get; set; }
  185. public string? Storer { get; set; }
  186. public string? Typed { get; set; }
  187. public string? PhysicalAddress { get; set; }
  188. public bool IsActive { get; set; }
  189. public string? CreateUser { get; set; }
  190. public DateTime? CreateTime { get; set; }
  191. public string? UpdateUser { get; set; }
  192. public DateTime? UpdateTime { get; set; }
  193. public List<AdoS0LocationShelfInputDto> Shelves { get; set; } = new();
  194. }
  195. /// <summary>
  196. /// 库位字典下拉项。供「供应商维护」等模块按 domainCode 过滤库位时使用,按 Location 作为业务值。
  197. /// </summary>
  198. public class S0LocationOptionRow
  199. {
  200. public string Value { get; set; } = string.Empty;
  201. public string Label { get; set; } = string.Empty;
  202. public string Code { get; set; } = string.Empty;
  203. public string? Name { get; set; }
  204. public string? DomainCode { get; set; }
  205. public bool IsActive { get; set; }
  206. }
  207. // ========== 货架 ==========
  208. public class AdoS0LocationShelfQueryDto
  209. {
  210. public long? CompanyRefId { get; set; }
  211. public long? FactoryRefId { get; set; }
  212. public string? DomainCode { get; set; }
  213. public string? Location { get; set; }
  214. public string? Keyword { get; set; }
  215. public int Page { get; set; } = 1;
  216. public int PageSize { get; set; } = 20;
  217. }
  218. public class AdoS0LocationShelfUpsertDto
  219. {
  220. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  221. public long CompanyRefId { get; set; }
  222. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  223. public long FactoryRefId { get; set; }
  224. [MaxLength(50)]
  225. public string? DomainCode { get; set; }
  226. [Required(ErrorMessage = "库位编码不能为空")]
  227. [MaxLength(100)]
  228. public string Location { get; set; } = string.Empty;
  229. [Required(ErrorMessage = "货架编码不能为空")]
  230. [MaxLength(100)]
  231. public string InvShelf { get; set; } = string.Empty;
  232. [MaxLength(255)]
  233. public string? Descr { get; set; }
  234. [MaxLength(100)]
  235. public string? Area { get; set; }
  236. [MaxLength(100)]
  237. public string? CreateUser { get; set; }
  238. [MaxLength(100)]
  239. public string? UpdateUser { get; set; }
  240. }