namespace Admin.NET.Plugin.AiDOP.Dto.S0.Warehouse;
// ========== 部门 ==========
public class AdoS0DepartmentQueryDto
{
public long? CompanyRefId { get; set; }
public long? FactoryRefId { get; set; }
public string? DomainCode { get; set; }
public string? Keyword { get; set; }
public bool? IsActive { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class AdoS0DepartmentUpsertDto
{
[Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
public long CompanyRefId { get; set; }
[Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
public long FactoryRefId { get; set; }
[MaxLength(50)]
public string? DomainCode { get; set; }
[Required(ErrorMessage = "部门编码不能为空")]
[MaxLength(100)]
public string Department { get; set; } = string.Empty;
[MaxLength(255)]
public string? Descr { get; set; }
public bool IsActive { get; set; } = true;
[MaxLength(100)]
public string? CreateUser { get; set; }
[MaxLength(100)]
public string? UpdateUser { get; set; }
}
// ========== 雇员 ==========
public class AdoS0EmployeeQueryDto
{
public long? CompanyRefId { get; set; }
public long? FactoryRefId { get; set; }
public string? DomainCode { get; set; }
public string? Keyword { get; set; }
public string? Department { get; set; }
public bool? IsActive { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class AdoS0EmployeeUpsertDto
{
[Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
public long CompanyRefId { get; set; }
[Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
public long FactoryRefId { get; set; }
[MaxLength(50)]
public string? DomainCode { get; set; }
[Required(ErrorMessage = "员工编码不能为空")]
[MaxLength(100)]
public string Employee { get; set; } = string.Empty;
[MaxLength(200)]
public string? Name { get; set; }
[MaxLength(10)]
public string? Sex { get; set; }
[MaxLength(50)]
public string? Phone { get; set; }
[MaxLength(200)]
public string? Email { get; set; }
public DateTime? BirthDate { get; set; }
[MaxLength(100)]
public string? Department { get; set; }
public DateTime? DateEmployed { get; set; }
[MaxLength(50)]
public string? EmploymentStatus { get; set; }
[MaxLength(50)]
public string? MaritalStatus { get; set; }
[MaxLength(100)]
public string? JobTitle { get; set; }
public DateTime? DateTerminated { get; set; }
[MaxLength(100)]
public string? WorkCtr { get; set; }
[MaxLength(100)]
public string? CarId { get; set; }
[MaxLength(100)]
public string? DefaultWorkLocation { get; set; }
public bool IsActive { get; set; } = true;
[MaxLength(100)]
public string? CreateUser { get; set; }
[MaxLength(100)]
public string? UpdateUser { get; set; }
}
// ========== 成本中心 ==========
public class AdoS0CostCtrQueryDto
{
public long? CompanyRefId { get; set; }
public long? FactoryRefId { get; set; }
public string? DomainCode { get; set; }
public string? Keyword { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class AdoS0CostCtrUpsertDto
{
[Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
public long CompanyRefId { get; set; }
[Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
public long FactoryRefId { get; set; }
[MaxLength(50)]
public string? DomainCode { get; set; }
[Required(ErrorMessage = "成本中心编码不能为空")]
[MaxLength(100)]
public string CostCtr { get; set; } = string.Empty;
[MaxLength(255)]
public string? Descr { get; set; }
[MaxLength(255)]
public string? Ufld1 { get; set; }
public DateTime? EffTime { get; set; }
[MaxLength(100)]
public string? CreateUser { get; set; }
[MaxLength(100)]
public string? UpdateUser { get; set; }
}
// ========== 库位 ==========
public class AdoS0LocationQueryDto
{
public long? CompanyRefId { get; set; }
public long? FactoryRefId { get; set; }
public string? DomainCode { get; set; }
public string? Keyword { get; set; }
public string? Typed { get; set; }
public bool? IsActive { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class AdoS0LocationUpsertDto
{
[Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
public long CompanyRefId { get; set; }
[Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
public long FactoryRefId { get; set; }
[MaxLength(50)]
public string? DomainCode { get; set; }
[Required(ErrorMessage = "库位编码不能为空")]
[MaxLength(100)]
public string Location { get; set; } = string.Empty;
[MaxLength(255)]
public string? Descr { get; set; }
[MaxLength(300)]
public string? Storer { get; set; }
[MaxLength(50)]
public string? Typed { get; set; }
[MaxLength(500)]
public string? PhysicalAddress { get; set; }
public bool IsActive { get; set; } = true;
[MaxLength(100)]
public string? CreateUser { get; set; }
[MaxLength(100)]
public string? UpdateUser { get; set; }
///
/// 货架明细(FULL Replace)。仅接受 InvShelf/Descr/Area(及可选 Id,本次不依赖);
/// tenant/company/factory/domain/location/审计一律由服务端从库位主表 + 上下文赋值,不信任前端传值。
///
public List Shelves { get; set; } = new();
}
///
/// 库位货架明细入参(库位主从保存用)。前端仅允许提交货架编码/描述/区域,作用域字段由服务端统一赋值。
///
public class AdoS0LocationShelfInputDto
{
/// 回显用;FULL Replace 保存不依赖此 Id。
public long? Id { get; set; }
[Required(ErrorMessage = "货架编码不能为空")]
[MaxLength(100)]
public string InvShelf { get; set; } = string.Empty;
[MaxLength(255)]
public string? Descr { get; set; }
[MaxLength(100)]
public string? Area { get; set; }
}
///
/// 库位详情输出(含货架明细,供编辑回显)。
///
public class AdoS0LocationDetailDto
{
public long Id { get; set; }
public long CompanyRefId { get; set; }
public long FactoryRefId { get; set; }
public string DomainCode { get; set; } = string.Empty;
public string Location { get; set; } = string.Empty;
public string? Descr { get; set; }
public string? Storer { get; set; }
public string? Typed { get; set; }
public string? PhysicalAddress { get; set; }
public bool IsActive { get; set; }
public string? CreateUser { get; set; }
public DateTime? CreateTime { get; set; }
public string? UpdateUser { get; set; }
public DateTime? UpdateTime { get; set; }
public List Shelves { get; set; } = new();
}
///
/// 库位字典下拉项。供「供应商维护」等模块按 domainCode 过滤库位时使用,按 Location 作为业务值。
///
public class S0LocationOptionRow
{
public string Value { get; set; } = string.Empty;
public string Label { get; set; } = string.Empty;
public string Code { get; set; } = string.Empty;
public string? Name { get; set; }
public string? DomainCode { get; set; }
public bool IsActive { get; set; }
}
// ========== 货架 ==========
public class AdoS0LocationShelfQueryDto
{
public long? CompanyRefId { get; set; }
public long? FactoryRefId { get; set; }
public string? DomainCode { get; set; }
public string? Location { get; set; }
public string? Keyword { get; set; }
public int Page { get; set; } = 1;
public int PageSize { get; set; } = 20;
}
public class AdoS0LocationShelfUpsertDto
{
[Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
public long CompanyRefId { get; set; }
[Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
public long FactoryRefId { get; set; }
[MaxLength(50)]
public string? DomainCode { get; set; }
[Required(ErrorMessage = "库位编码不能为空")]
[MaxLength(100)]
public string Location { get; set; } = string.Empty;
[Required(ErrorMessage = "货架编码不能为空")]
[MaxLength(100)]
public string InvShelf { get; set; } = string.Empty;
[MaxLength(255)]
public string? Descr { get; set; }
[MaxLength(100)]
public string? Area { get; set; }
[MaxLength(100)]
public string? CreateUser { get; set; }
[MaxLength(100)]
public string? UpdateUser { get; set; }
}