AdoS0WarehouseBasicDtos.cs 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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. [MaxLength(100)]
  81. public string? City { get; set; }
  82. [MaxLength(100)]
  83. public string? Country { get; set; }
  84. [MaxLength(50)]
  85. public string? BusinessPhone { get; set; }
  86. public bool IsActive { get; set; } = true;
  87. [MaxLength(100)]
  88. public string? CreateUser { get; set; }
  89. [MaxLength(100)]
  90. public string? UpdateUser { get; set; }
  91. }
  92. // ========== 成本中心 ==========
  93. public class AdoS0CostCtrQueryDto
  94. {
  95. public long? CompanyRefId { get; set; }
  96. public long? FactoryRefId { get; set; }
  97. public string? DomainCode { get; set; }
  98. public string? Keyword { get; set; }
  99. public int Page { get; set; } = 1;
  100. public int PageSize { get; set; } = 20;
  101. }
  102. public class AdoS0CostCtrUpsertDto
  103. {
  104. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  105. public long CompanyRefId { get; set; }
  106. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  107. public long FactoryRefId { get; set; }
  108. [MaxLength(50)]
  109. public string? DomainCode { get; set; }
  110. [Required(ErrorMessage = "成本中心编码不能为空")]
  111. [MaxLength(100)]
  112. public string CostCtr { get; set; } = string.Empty;
  113. [MaxLength(255)]
  114. public string? Descr { get; set; }
  115. [MaxLength(255)]
  116. public string? Ufld1 { get; set; }
  117. public DateTime? EffTime { get; set; }
  118. [MaxLength(100)]
  119. public string? CreateUser { get; set; }
  120. [MaxLength(100)]
  121. public string? UpdateUser { get; set; }
  122. }
  123. // ========== 库位 ==========
  124. public class AdoS0LocationQueryDto
  125. {
  126. public long? CompanyRefId { get; set; }
  127. public long? FactoryRefId { get; set; }
  128. public string? DomainCode { get; set; }
  129. public string? Keyword { get; set; }
  130. public string? Typed { get; set; }
  131. public bool? IsActive { get; set; }
  132. public int Page { get; set; } = 1;
  133. public int PageSize { get; set; } = 20;
  134. }
  135. public class AdoS0LocationUpsertDto
  136. {
  137. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  138. public long CompanyRefId { get; set; }
  139. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  140. public long FactoryRefId { get; set; }
  141. [MaxLength(50)]
  142. public string? DomainCode { get; set; }
  143. [Required(ErrorMessage = "库位编码不能为空")]
  144. [MaxLength(100)]
  145. public string Location { get; set; } = string.Empty;
  146. [MaxLength(255)]
  147. public string? Descr { get; set; }
  148. [MaxLength(300)]
  149. public string? Storer { get; set; }
  150. [MaxLength(50)]
  151. public string? Typed { get; set; }
  152. [MaxLength(500)]
  153. public string? PhysicalAddress { get; set; }
  154. public bool IsActive { get; set; } = true;
  155. [MaxLength(100)]
  156. public string? CreateUser { get; set; }
  157. [MaxLength(100)]
  158. public string? UpdateUser { get; set; }
  159. /// <summary>
  160. /// 货架明细(FULL Replace)。仅接受 InvShelf/Descr/Area(及可选 Id,本次不依赖);
  161. /// tenant/company/factory/domain/location/审计一律由服务端从库位主表 + 上下文赋值,不信任前端传值。
  162. /// </summary>
  163. public List<AdoS0LocationShelfInputDto> Shelves { get; set; } = new();
  164. }
  165. /// <summary>
  166. /// 库位货架明细入参(库位主从保存用)。前端仅允许提交货架编码/描述/区域,作用域字段由服务端统一赋值。
  167. /// </summary>
  168. public class AdoS0LocationShelfInputDto
  169. {
  170. /// <summary>回显用;FULL Replace 保存不依赖此 Id。</summary>
  171. public long? Id { get; set; }
  172. [Required(ErrorMessage = "货架编码不能为空")]
  173. [MaxLength(100)]
  174. public string InvShelf { get; set; } = string.Empty;
  175. [MaxLength(255)]
  176. public string? Descr { get; set; }
  177. [MaxLength(100)]
  178. public string? Area { get; set; }
  179. }
  180. /// <summary>
  181. /// 库位详情输出(含货架明细,供编辑回显)。
  182. /// </summary>
  183. public class AdoS0LocationDetailDto
  184. {
  185. public long Id { get; set; }
  186. public long CompanyRefId { get; set; }
  187. public long FactoryRefId { get; set; }
  188. public string DomainCode { get; set; } = string.Empty;
  189. public string Location { get; set; } = string.Empty;
  190. public string? Descr { get; set; }
  191. public string? Storer { get; set; }
  192. public string? Typed { get; set; }
  193. public string? PhysicalAddress { get; set; }
  194. public bool IsActive { get; set; }
  195. public string? CreateUser { get; set; }
  196. public DateTime? CreateTime { get; set; }
  197. public string? UpdateUser { get; set; }
  198. public DateTime? UpdateTime { get; set; }
  199. public List<AdoS0LocationShelfInputDto> Shelves { get; set; } = new();
  200. }
  201. /// <summary>
  202. /// 库位字典下拉项。供「供应商维护」等模块按 domainCode 过滤库位时使用,按 Location 作为业务值。
  203. /// </summary>
  204. public class S0LocationOptionRow
  205. {
  206. public string Value { get; set; } = string.Empty;
  207. public string Label { get; set; } = string.Empty;
  208. public string Code { get; set; } = string.Empty;
  209. public string? Name { get; set; }
  210. public string? DomainCode { get; set; }
  211. public bool IsActive { get; set; }
  212. }
  213. // ========== 货架 ==========
  214. public class AdoS0LocationShelfQueryDto
  215. {
  216. public long? CompanyRefId { get; set; }
  217. public long? FactoryRefId { get; set; }
  218. public string? DomainCode { get; set; }
  219. public string? Location { get; set; }
  220. public string? Keyword { get; set; }
  221. public int Page { get; set; } = 1;
  222. public int PageSize { get; set; } = 20;
  223. }
  224. public class AdoS0LocationShelfUpsertDto
  225. {
  226. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  227. public long CompanyRefId { get; set; }
  228. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  229. public long FactoryRefId { get; set; }
  230. [MaxLength(50)]
  231. public string? DomainCode { get; set; }
  232. [Required(ErrorMessage = "库位编码不能为空")]
  233. [MaxLength(100)]
  234. public string Location { get; set; } = string.Empty;
  235. [Required(ErrorMessage = "货架编码不能为空")]
  236. [MaxLength(100)]
  237. public string InvShelf { get; set; } = string.Empty;
  238. [MaxLength(255)]
  239. public string? Descr { get; set; }
  240. [MaxLength(100)]
  241. public string? Area { get; set; }
  242. [MaxLength(100)]
  243. public string? CreateUser { get; set; }
  244. [MaxLength(100)]
  245. public string? UpdateUser { get; set; }
  246. }