namespace Admin.NET.Plugin.AiDOP.Dto.S0.Sales; public class AdoS0ToggleEnabledDto { public bool IsEnabled { get; set; } } public class AdoS0ItemSubstituteDetailQueryDto { public string? Domain { get; set; } public string? Keyword { get; set; } public string? SubstituteType { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } /// /// 选择替代方案(ic_substitute)只读查询 /// public class AdoS0SubstituteSchemeQueryDto { /// 源平台 company_id;为空则不按公司过滤。 public long? CompanyId { get; set; } /// 源平台 factory_id;为空则不按工厂过滤。 public long? FactoryId { get; set; } /// 替代方案编码(模糊匹配) public string? SubstituteCode { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0ItemSubstituteDetailUpsertDto { [Required(ErrorMessage = "父级物料不能为空")] public string ParentItem { get; set; } = string.Empty; [Required(ErrorMessage = "物料编码不能为空")] public string ItemNum { get; set; } = string.Empty; [Required(ErrorMessage = "替代物料不能为空")] public string SubstituteItem { get; set; } = string.Empty; public decimal? SubstituteQty { get; set; } public string? SubstituteType { get; set; } public string? Remark { get; set; } [Required(ErrorMessage = "工厂域不能为空")] public string Domain { get; set; } = string.Empty; public string? CreateUser { get; set; } public DateTime? CreateTime { get; set; } public string? UpdateUser { get; set; } public DateTime? UpdateTime { get; set; } } /// 客户主数据启停(CustMaster / IsActive) public class AdoS0CustMasterToggleActiveDto { public bool IsActive { get; set; } } public class AdoS0CustMasterQueryDto { public long? CompanyRefId { get; set; } public long? FactoryRefId { get; set; } public string? DomainCode { get; set; } /// 同时匹配客户编码、客户简称 public string? Keyword { get; set; } public string? Cust { get; set; } public string? SortName { get; set; } public string? Curr { get; set; } public string? Slspsn1 { get; set; } public string? ShipTo { get; set; } public bool? IsActive { get; set; } public bool? IsConfirm { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0CustMasterUpsertDto { [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")] public long CompanyRefId { get; set; } [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")] public long FactoryRefId { get; set; } public string? DomainCode { get; set; } [Required(ErrorMessage = "客户编码不能为空")] public string Cust { get; set; } = string.Empty; [Required(ErrorMessage = "客户简称不能为空")] public string SortName { get; set; } = string.Empty; public string? CustFullName { get; set; } public string? Curr { get; set; } public string? Slspsn1 { get; set; } public string? Slspsn2 { get; set; } public string? ShipTo { get; set; } public string? TaxClass { get; set; } public bool TaxIn { get; set; } = true; public string? CustClass { get; set; } public string? Address { get; set; } public string? ShippingAddress { get; set; } public string? Contact { get; set; } public string? Position { get; set; } public string? ContactInfo { get; set; } public string? CreditRating { get; set; } public string? Remarks { get; set; } public bool IsActive { get; set; } = true; public bool IsConfirm { get; set; } public string? CreateUser { get; set; } public string? UpdateUser { get; set; } } /// 物料主数据启停(ItemMaster / IsActive) public class AdoS0ItemMasterToggleActiveDto { public bool IsActive { get; set; } } public class AdoS0ItemMasterQueryDto { public long? CompanyRefId { get; set; } public long? FactoryRefId { get; set; } public string? DomainCode { get; set; } /// 匹配物料编码、物料名称 public string? Keyword { get; set; } public string? ItemNum { get; set; } public string? Descr { get; set; } public string? Descr1 { get; set; } public string? ItemType { get; set; } public string? PurMfg { get; set; } public string? Location { get; set; } public string? Status { get; set; } public bool? IsActive { get; set; } public bool? IsConfirm { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0ItemMasterUpsertDto { [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 ItemNum { get; set; } = string.Empty; [Required(ErrorMessage = "物料名称不能为空")] [MaxLength(200)] public string Descr { get; set; } = string.Empty; [MaxLength(200)] public string? Descr1 { get; set; } [MaxLength(50)] public string? PkgCode { get; set; } [MaxLength(50)] public string? UM { get; set; } [MaxLength(100)] public string? PurMfg { get; set; } [MaxLength(100)] public string? Drawing { get; set; } [MaxLength(100)] public string? ItemType { get; set; } [MaxLength(100)] public string? Location { get; set; } [MaxLength(100)] public string? DefaultShelf { get; set; } public bool KeyItem { get; set; } // C2 技术护栏 + C1 负数拒绝:上界对齐 Entity 列类型 decimal(18,5)(max 9,999,999,999,999.99999); // 下界 0 与前端 el-input-number :min="0" 对齐(C0 §7 C1-Q1 选 a:后端拒绝负数)。 // 业务实际上限待 C0 业务签字(参见 lwb/C0-business-rule-scope-review-20260425.md C2-Q1/Q2)。 [Range(typeof(decimal), "0", "9999999999999.99999", ErrorMessage = "净重不能为负,且不能超过技术允许范围(decimal(18,5))")] public decimal? NetWeight { get; set; } [MaxLength(50)] public string? NetWeightUM { get; set; } public bool Inspect { get; set; } public int? PurLT { get; set; } public int? InsLT { get; set; } public int? MfgLT { get; set; } public decimal? Length { get; set; } public decimal? Size { get; set; } [MaxLength(50)] public string? SizeUM { get; set; } public bool IssuePolicy { get; set; } public int? MfgMttr { get; set; } [MaxLength(50)] public string? LocationType { get; set; } [MaxLength(100)] public string? CommodityCode { get; set; } [MaxLength(50)] public string? Rev { get; set; } public decimal? MaxOrd { get; set; } public decimal? MinOrd { get; set; } public decimal? OrdMult { get; set; } public decimal? MinOrdSales { get; set; } public bool AutoLotNums { get; set; } public bool Install { get; set; } public decimal? SafetyStk { get; set; } public int? DaysBetweenPM { get; set; } public int? ExpireAlarmDay { get; set; } public decimal? StockTurnOver { get; set; } public bool LotSerialControl { get; set; } public bool AllocateSingleLot { get; set; } [MaxLength(50)] public string? Status { get; set; } [MaxLength(100)] public string? Planner { get; set; } public bool TraceDetail { get; set; } public bool IsMainMas { get; set; } [MaxLength(1000)] public string? Remark { get; set; } [MaxLength(50)] public string? EMTType { get; set; } [MaxLength(100)] public string? OwnerApplication { get; set; } [MaxLength(50)] public string? BomVersion { get; set; } public bool EnableBomVersion { get; set; } public int? BOMDesign { get; set; } public int? RoutingDes { get; set; } public bool CustSupplied { get; set; } public int? DrawingDesign { get; set; } [MaxLength(100)] public string? DesignOwner { get; set; } public bool IsActive { get; set; } = true; public bool IsConfirm { get; set; } [MaxLength(100)] public string? CreateUser { get; set; } [MaxLength(100)] public string? UpdateUser { get; set; } } /// 订单优先级(PriorityCode / IsActive) public class AdoS0PriorityCodeToggleActiveDto { public bool IsActive { get; set; } } public class AdoS0PriorityCodeQueryDto { public string? DomainCode { get; set; } /// 匹配名称、来源表、工单字段 value public string? Keyword { get; set; } public string? Descr { get; set; } public int? Priority { get; set; } public bool? OrderBy { get; set; } public string? SourceTable { get; set; } public string? SourceColumn { get; set; } public string? Value { get; set; } public bool? IsActive { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0PriorityCodeUpsertDto { public string? DomainCode { get; set; } public string? Descr { get; set; } public string? Value { get; set; } public int Priority { get; set; } public bool? OrderBy { get; set; } public string? SourceTable { get; set; } public string? SourceColumn { get; set; } public string? SourceType { get; set; } public string? SourceId { get; set; } public string? ValueType { get; set; } public string? ValueId { get; set; } /// 客户类型编码(字典 s0_order_priority_customer_type 的 Value),可空 public string? CustomerTypeCode { get; set; } /// 订单类型编码(字典 s0_order_type 的 Value),可空 public string? OrderTypeCode { get; set; } public bool IsActive { get; set; } = true; public string? CreateUser { get; set; } public string? LegacyCreateUser { get; set; } public string? UpdateUser { get; set; } } // ── B1: 合同评审周期标准 ────────────────────────────────────────────── public class AdoS0ContractReviewCycleQueryDto { public long? CompanyRefId { get; set; } public long? FactoryRefId { get; set; } public string? DomainCode { get; set; } public bool? IsActive { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0ContractReviewCycleUpsertDto { [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")] public long CompanyRefId { get; set; } [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")] public long FactoryRefId { get; set; } public string? DomainCode { get; set; } [Required(ErrorMessage = "阶段编码不能为空")] public string StageCode { get; set; } = string.Empty; [Required(ErrorMessage = "阶段名称不能为空")] public string StageName { get; set; } = string.Empty; [Range(0, int.MaxValue, ErrorMessage = "标准时长不能为负")] public int StdHours { get; set; } public int OrderNo { get; set; } public bool IsActive { get; set; } = true; public string? CreateUser { get; set; } public string? UpdateUser { get; set; } } public class AdoS0ContractReviewCycleToggleActiveDto { public bool IsActive { get; set; } } // ── B2: 产品设计周期标准 ────────────────────────────────────────────── public class AdoS0ProductDesignCycleQueryDto { public long? CompanyRefId { get; set; } public long? FactoryRefId { get; set; } public string? DomainCode { get; set; } public string? ItemType { get; set; } public string? OwnerApplication { get; set; } public bool? IsActive { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0ProductDesignCycleUpsertDto { [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")] public long CompanyRefId { get; set; } [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")] public long FactoryRefId { get; set; } public string? DomainCode { get; set; } [Required(ErrorMessage = "物料类型不能为空")] public string ItemType { get; set; } = string.Empty; [Required(ErrorMessage = "物料属性不能为空")] public string OwnerApplication { get; set; } = string.Empty; [Range(0, int.MaxValue, ErrorMessage = "标准时长不能为负")] public int StdHours { get; set; } public bool IsActive { get; set; } = true; public string? CreateUser { get; set; } public string? UpdateUser { get; set; } } public class AdoS0ProductDesignCycleToggleActiveDto { public bool IsActive { get; set; } } /// /// 产品设计周期列表行响应(Entity 字段 + ItemMaster 命中校验字段)。 /// 不影响 Upsert / Query / ToggleActive DTO,仅 GetPagedAsync 列表返回使用。 /// public class AdoS0ProductDesignCycleRowDto { public long Id { get; set; } public long CompanyRefId { get; set; } public long FactoryRefId { get; set; } public string? DomainCode { get; set; } public string ItemType { get; set; } = string.Empty; public string OwnerApplication { get; set; } = string.Empty; public int StdHours { 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; } /// 该 (ItemType[, Domain]) 组合在 ItemMaster 命中的物料行数。 public int ItemMasterMatchedCount { get; set; } /// 前 3 个示例物料,格式 "ItemNum / Descr";无 Descr 时仅 ItemNum;无命中时空列表。 public List ItemMasterSampleItems { get; set; } = new(); } // ── B3: 订单评审周期标准 ────────────────────────────────────────────── public class AdoS0OrderReviewCycleQueryDto { public long? CompanyRefId { get; set; } public long? FactoryRefId { get; set; } public string? DomainCode { get; set; } public string? OrderType { get; set; } public bool? IsActive { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0OrderReviewCycleUpsertDto { [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")] public long CompanyRefId { get; set; } [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")] public long FactoryRefId { get; set; } public string? DomainCode { get; set; } /// 订单类型;留空表示默认/不限。 public string? OrderType { get; set; } [Range(0, int.MaxValue, ErrorMessage = "标准时长不能为负")] public int StdHours { get; set; } public string? Remarks { get; set; } public bool IsActive { get; set; } = true; public string? CreateUser { get; set; } public string? UpdateUser { get; set; } } public class AdoS0OrderReviewCycleToggleActiveDto { public bool IsActive { get; set; } } // ── B1.1: 合同评审周期下钻配置 ──────────────────────────────────────── public class AdoS0ContractReviewCycleBreakdownQueryDto { public long? CompanyRefId { get; set; } public long? FactoryRefId { get; set; } public string? DomainCode { get; set; } /// 父阶段编码(如 'feedback' 意见反馈) public string? ParentStageCode { get; set; } public bool? IsActive { get; set; } public int Page { get; set; } = 1; public int PageSize { get; set; } = 20; } public class AdoS0ContractReviewCycleBreakdownUpsertDto { [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")] public long CompanyRefId { get; set; } [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")] public long FactoryRefId { get; set; } public string? DomainCode { get; set; } [Required(ErrorMessage = "父阶段编码不能为空")] public string ParentStageCode { get; set; } = string.Empty; [Required(ErrorMessage = "组编码不能为空")] public string GroupCode { get; set; } = string.Empty; [Required(ErrorMessage = "组名称不能为空")] public string GroupName { get; set; } = string.Empty; [Range(typeof(decimal), "0", "9999.99", ErrorMessage = "标准时长必须在 0 ~ 9999.99 之间")] public decimal StdHours { get; set; } public int OrderNo { get; set; } = 1; public bool IsActive { get; set; } = true; public string? CreateUser { get; set; } public string? UpdateUser { get; set; } } public class AdoS0ContractReviewCycleBreakdownToggleActiveDto { public bool IsActive { get; set; } } // ── B1.2: 合同评审周期同步开关 ──────────────────────────────────────── /// 同步开关读取响应;行不存在时 IsSyncEnabled 默认 false。 public class AdoS0ContractReviewCycleSyncFlagDto { public long? Id { get; set; } public long? CompanyRefId { get; set; } public long FactoryRefId { get; set; } public string? DomainCode { get; set; } public bool IsSyncEnabled { get; set; } } public class AdoS0ContractReviewCycleSyncFlagUpsertDto { [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")] public long CompanyRefId { get; set; } [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")] public long FactoryRefId { get; set; } public string? DomainCode { get; set; } public bool IsSyncEnabled { get; set; } public string? CreateUser { get; set; } public string? UpdateUser { get; set; } } // ── B1.3: PI 只读配置(S8 后续可消费) ───────────────────────────────── public class AdoS0ContractReviewCyclePiConfigStageDto { public string StageCode { get; set; } = string.Empty; public string StageName { get; set; } = string.Empty; public int StdHours { get; set; } public int OrderNo { get; set; } } public class AdoS0ContractReviewCyclePiConfigBreakdownDto { public string GroupCode { get; set; } = string.Empty; public string GroupName { get; set; } = string.Empty; public decimal StdHours { get; set; } public int OrderNo { get; set; } } public class AdoS0ContractReviewCyclePiConfigDto { public long FactoryRefId { get; set; } public bool SyncEnabled { get; set; } public List MainStages { get; set; } = new(); public List OpinionFeedbackBreakdown { get; set; } = new(); }