AdoS0WarehouseBasicDtos.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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. /// <summary>
  16. /// 公司。**服务端忽略**:新增由 AdoS0OrgScope.ResolveAsync(tenantId) 在当前租户内解析后强制 stamp,
  17. /// 编辑 pin 既有原值。保留字段仅为 payload 向后兼容,不做校验——原 [Range(1, long.MaxValue)]
  18. /// 是失效前置门:值不参与落库,却会在模型绑定阶段把"租户未配置机构"误报成"公司不能为空",故移除。
  19. /// </summary>
  20. public long CompanyRefId { get; set; }
  21. /// <summary>工厂。**服务端忽略**,同 <see cref="CompanyRefId"/>。</summary>
  22. public long FactoryRefId { get; set; }
  23. [MaxLength(50)]
  24. public string? DomainCode { get; set; }
  25. [Required(ErrorMessage = "部门编码不能为空")]
  26. [MaxLength(100)]
  27. public string Department { get; set; } = string.Empty;
  28. [MaxLength(255)]
  29. public string? Descr { get; set; }
  30. public bool IsActive { get; set; } = true;
  31. [MaxLength(100)]
  32. public string? CreateUser { get; set; }
  33. [MaxLength(100)]
  34. public string? UpdateUser { get; set; }
  35. }
  36. // ========== 雇员 ==========
  37. public class AdoS0EmployeeQueryDto
  38. {
  39. public long? CompanyRefId { get; set; }
  40. public long? FactoryRefId { get; set; }
  41. public string? DomainCode { get; set; }
  42. public string? Keyword { get; set; }
  43. public string? Department { get; set; }
  44. public bool? IsActive { get; set; }
  45. public int Page { get; set; } = 1;
  46. public int PageSize { get; set; } = 20;
  47. }
  48. public class AdoS0EmployeeUpsertDto
  49. {
  50. /// <summary>
  51. /// 公司。**服务端忽略**:新增由 AdoS0OrgScope.ResolveAsync(tenantId) 在当前租户内解析后强制 stamp,
  52. /// 编辑 pin 既有原值。保留字段仅为 payload 向后兼容,不做校验——原 [Range(1, long.MaxValue)]
  53. /// 是失效前置门:值不参与落库,却会在模型绑定阶段把"租户未配置机构"误报成"公司不能为空",故移除。
  54. /// </summary>
  55. public long CompanyRefId { get; set; }
  56. /// <summary>工厂。**服务端忽略**,同 <see cref="CompanyRefId"/>。</summary>
  57. public long FactoryRefId { get; set; }
  58. [MaxLength(50)]
  59. public string? DomainCode { get; set; }
  60. [Required(ErrorMessage = "员工编码不能为空")]
  61. [MaxLength(100)]
  62. public string Employee { get; set; } = string.Empty;
  63. [MaxLength(200)]
  64. public string? Name { get; set; }
  65. [MaxLength(10)]
  66. public string? Sex { get; set; }
  67. [MaxLength(50)]
  68. public string? Phone { get; set; }
  69. [MaxLength(200)]
  70. public string? Email { get; set; }
  71. public DateTime? BirthDate { get; set; }
  72. [MaxLength(100)]
  73. public string? Department { get; set; }
  74. public DateTime? DateEmployed { get; set; }
  75. [MaxLength(50)]
  76. public string? EmploymentStatus { get; set; }
  77. [MaxLength(50)]
  78. public string? MaritalStatus { get; set; }
  79. [MaxLength(100)]
  80. public string? JobTitle { get; set; }
  81. public DateTime? DateTerminated { get; set; }
  82. [MaxLength(100)]
  83. public string? WorkCtr { get; set; }
  84. [MaxLength(100)]
  85. public string? CarId { get; set; }
  86. [MaxLength(100)]
  87. public string? DefaultWorkLocation { get; set; }
  88. [MaxLength(100)]
  89. public string? City { get; set; }
  90. [MaxLength(100)]
  91. public string? Country { get; set; }
  92. [MaxLength(50)]
  93. public string? BusinessPhone { get; set; }
  94. public bool IsActive { get; set; } = true;
  95. [MaxLength(100)]
  96. public string? CreateUser { get; set; }
  97. [MaxLength(100)]
  98. public string? UpdateUser { get; set; }
  99. }
  100. // ========== 成本中心 ==========
  101. public class AdoS0CostCtrQueryDto
  102. {
  103. public long? CompanyRefId { get; set; }
  104. public long? FactoryRefId { get; set; }
  105. public string? DomainCode { get; set; }
  106. public string? Keyword { get; set; }
  107. public int Page { get; set; } = 1;
  108. public int PageSize { get; set; } = 20;
  109. }
  110. public class AdoS0CostCtrUpsertDto
  111. {
  112. /// <summary>
  113. /// 公司。**服务端忽略**:新增由 AdoS0OrgScope.ResolveAsync(tenantId) 在当前租户内解析后强制 stamp,
  114. /// 编辑 pin 既有原值。保留字段仅为 payload 向后兼容,不做校验——原 [Range(1, long.MaxValue)]
  115. /// 是失效前置门:值不参与落库,却会在模型绑定阶段把"租户未配置机构"误报成"公司不能为空",故移除。
  116. /// </summary>
  117. public long CompanyRefId { get; set; }
  118. /// <summary>工厂。**服务端忽略**,同 <see cref="CompanyRefId"/>。</summary>
  119. public long FactoryRefId { get; set; }
  120. [MaxLength(50)]
  121. public string? DomainCode { get; set; }
  122. [Required(ErrorMessage = "成本中心编码不能为空")]
  123. [MaxLength(100)]
  124. public string CostCtr { get; set; } = string.Empty;
  125. [MaxLength(255)]
  126. public string? Descr { get; set; }
  127. [MaxLength(255)]
  128. public string? Ufld1 { get; set; }
  129. public DateTime? EffTime { get; set; }
  130. [MaxLength(100)]
  131. public string? CreateUser { get; set; }
  132. [MaxLength(100)]
  133. public string? UpdateUser { get; set; }
  134. }
  135. // ========== 库位 ==========
  136. public class AdoS0LocationQueryDto
  137. {
  138. public long? CompanyRefId { get; set; }
  139. public long? FactoryRefId { get; set; }
  140. public string? DomainCode { get; set; }
  141. public string? Keyword { get; set; }
  142. public string? Typed { get; set; }
  143. public bool? IsActive { get; set; }
  144. public int Page { get; set; } = 1;
  145. public int PageSize { get; set; } = 20;
  146. }
  147. public class AdoS0LocationUpsertDto
  148. {
  149. /// <summary>
  150. /// 公司。**服务端忽略**:新增由 AdoS0OrgScope.ResolveAsync(tenantId) 在当前租户内解析后强制 stamp,
  151. /// 编辑 pin 既有原值。保留字段仅为 payload 向后兼容,不做校验——原 [Range(1, long.MaxValue)]
  152. /// 是失效前置门:值不参与落库,却会在模型绑定阶段把"租户未配置机构"误报成"公司不能为空",故移除。
  153. /// </summary>
  154. public long CompanyRefId { get; set; }
  155. /// <summary>工厂。**服务端忽略**,同 <see cref="CompanyRefId"/>。</summary>
  156. public long FactoryRefId { get; set; }
  157. [MaxLength(50)]
  158. public string? DomainCode { get; set; }
  159. [Required(ErrorMessage = "库位编码不能为空")]
  160. [MaxLength(100)]
  161. public string Location { get; set; } = string.Empty;
  162. [MaxLength(255)]
  163. public string? Descr { get; set; }
  164. [MaxLength(300)]
  165. public string? Storer { get; set; }
  166. [MaxLength(50)]
  167. public string? Typed { get; set; }
  168. [MaxLength(500)]
  169. public string? PhysicalAddress { get; set; }
  170. public bool IsActive { get; set; } = true;
  171. [MaxLength(100)]
  172. public string? CreateUser { get; set; }
  173. [MaxLength(100)]
  174. public string? UpdateUser { get; set; }
  175. /// <summary>
  176. /// 货架明细(FULL Replace)。仅接受 InvShelf/Descr/Area(及可选 Id,本次不依赖);
  177. /// tenant/company/factory/domain/location/审计一律由服务端从库位主表 + 上下文赋值,不信任前端传值。
  178. /// </summary>
  179. public List<AdoS0LocationShelfInputDto> Shelves { get; set; } = new();
  180. }
  181. /// <summary>
  182. /// 库位货架明细入参(库位主从保存用)。前端仅允许提交货架编码/描述/区域,作用域字段由服务端统一赋值。
  183. /// </summary>
  184. public class AdoS0LocationShelfInputDto
  185. {
  186. /// <summary>回显用;FULL Replace 保存不依赖此 Id。</summary>
  187. public long? Id { get; set; }
  188. [Required(ErrorMessage = "货架编码不能为空")]
  189. [MaxLength(100)]
  190. public string InvShelf { get; set; } = string.Empty;
  191. [MaxLength(255)]
  192. public string? Descr { get; set; }
  193. [MaxLength(100)]
  194. public string? Area { get; set; }
  195. }
  196. /// <summary>
  197. /// 库位详情输出(含货架明细,供编辑回显)。
  198. /// </summary>
  199. public class AdoS0LocationDetailDto
  200. {
  201. public long Id { get; set; }
  202. public long CompanyRefId { get; set; }
  203. public long FactoryRefId { get; set; }
  204. public string DomainCode { get; set; } = string.Empty;
  205. public string Location { get; set; } = string.Empty;
  206. public string? Descr { get; set; }
  207. public string? Storer { get; set; }
  208. public string? Typed { get; set; }
  209. public string? PhysicalAddress { get; set; }
  210. public bool IsActive { get; set; }
  211. public string? CreateUser { get; set; }
  212. public DateTime? CreateTime { get; set; }
  213. public string? UpdateUser { get; set; }
  214. public DateTime? UpdateTime { get; set; }
  215. public List<AdoS0LocationShelfInputDto> Shelves { get; set; } = new();
  216. }
  217. /// <summary>
  218. /// 库位字典下拉项。供「供应商维护」等模块按 domainCode 过滤库位时使用,按 Location 作为业务值。
  219. /// </summary>
  220. public class S0LocationOptionRow
  221. {
  222. public string Value { get; set; } = string.Empty;
  223. public string Label { get; set; } = string.Empty;
  224. public string Code { get; set; } = string.Empty;
  225. public string? Name { get; set; }
  226. public string? DomainCode { get; set; }
  227. public bool IsActive { get; set; }
  228. }
  229. // ========== 货架 ==========
  230. public class AdoS0LocationShelfQueryDto
  231. {
  232. public long? CompanyRefId { get; set; }
  233. public long? FactoryRefId { get; set; }
  234. public string? DomainCode { get; set; }
  235. public string? Location { get; set; }
  236. public string? Keyword { get; set; }
  237. public int Page { get; set; } = 1;
  238. public int PageSize { get; set; } = 20;
  239. }
  240. public class AdoS0LocationShelfUpsertDto
  241. {
  242. [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
  243. public long CompanyRefId { get; set; }
  244. [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
  245. public long FactoryRefId { get; set; }
  246. [MaxLength(50)]
  247. public string? DomainCode { get; set; }
  248. [Required(ErrorMessage = "库位编码不能为空")]
  249. [MaxLength(100)]
  250. public string Location { get; set; } = string.Empty;
  251. [Required(ErrorMessage = "货架编码不能为空")]
  252. [MaxLength(100)]
  253. public string InvShelf { get; set; } = string.Empty;
  254. [MaxLength(255)]
  255. public string? Descr { get; set; }
  256. [MaxLength(100)]
  257. public string? Area { get; set; }
  258. [MaxLength(100)]
  259. public string? CreateUser { get; set; }
  260. [MaxLength(100)]
  261. public string? UpdateUser { get; set; }
  262. }