| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067 |
- namespace Admin.NET.Plugin.AiDOP.Dto.S0.Manufacturing;
- /// <summary>
- /// 制造列表查询公共段:公司/工厂、keyword、isEnabled、分页。
- /// S0 使用 pageNo 时可通过 <see cref="PageNo"/> 绑定,控制器内取 EffectivePage。
- /// </summary>
- public class AdoS0MfgPagedQueryBase
- {
- public long? CompanyRefId { get; set; }
- public long? FactoryRefId { get; set; }
- public string? Keyword { get; set; }
- public bool? IsEnabled { get; set; }
- /// <summary>与 Gitee Demo 一致的页码(默认 1)。</summary>
- public int Page { get; set; } = 1;
- /// <summary>S0 PagedQuery.pageNo;若传入则优先于 <see cref="Page"/>。</summary>
- public int? PageNo { get; set; }
- public int PageSize { get; set; } = 20;
- public int EffectivePage => PageNo is > 0 ? PageNo.Value : (Page < 1 ? 1 : Page);
- }
- #region 附录 F 扩展 Query
- /// <summary>标准工序主数据列表(StdOpMaster 语义)。</summary>
- public class AdoS0StdOpMasterQueryDto : AdoS0MfgPagedQueryBase
- {
- /// <summary>按标准工序编码(std_op_code)模糊过滤。</summary>
- public string? StdOpCode { get; set; }
- /// <summary>按标准工序名称(std_op)模糊过滤。</summary>
- public string? StdOp { get; set; }
- public string? MilestoneOp { get; set; }
- }
- /// <summary>生产线主数据列表(LineMaster 语义)。</summary>
- public class AdoS0LineMasterQueryDto : AdoS0MfgPagedQueryBase
- {
- /// <summary>按生产线编码(line)模糊过滤。</summary>
- public string? Line { get; set; }
- public string? Workshop { get; set; }
- }
- public class AdoS0MfgPreprocessElementQueryDto : AdoS0MfgPagedQueryBase
- {
- public string? Domain { get; set; }
- public string? MaterialCode { get; set; }
- public string? MaterialName { get; set; }
- public string? Op { get; set; }
- public string? ElementCode { get; set; }
- }
- public class AdoS0MfgPreprocessElementUpsertDto
- {
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [Required(ErrorMessage = "物料编码不能为空")]
- [MaxLength(100)]
- public string ItemNum { get; set; } = string.Empty;
- [MaxLength(100)]
- public string? Op { get; set; }
- [MaxLength(100)]
- public string? Line { get; set; }
- [MaxLength(100)]
- public string? Typed { get; set; }
- [MaxLength(100)]
- public string? ItemCode { get; set; }
- [MaxLength(255)]
- public string? Descr { get; set; }
- public bool IsMain { get; set; }
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- }
- public class AdoS0MfgMaterialProcessElementQueryDto : AdoS0MfgPagedQueryBase
- {
- public string? MaterialCode { get; set; }
- public string? MaterialName { get; set; }
- public string? ElementType { get; set; }
- public string? ElementCode { get; set; }
- }
- /// <summary>
- /// SOP 维护(源平台 QualitySegmentImage):列表查询
- /// </summary>
- public class AdoS0MfgSopDocumentQueryDto
- {
- // 去 domain 化(S0-SOP-DOMAIN-DECOUPLING-FIX):查询不再要求 Domain,放宽 [Required] 为可空;
- // 租户隔离由 tenant_id 保证,Domain 仅保留为兼容字段,不参与列表可见性判定。
- [MaxLength(50)]
- public string? Domain { get; set; }
- public string? Keyword { get; set; }
- public int Page { get; set; } = 1;
- public int PageSize { get; set; } = 20;
- }
- /// <summary>列表须支持 elementCategory 过滤(§7 / 附录 F)。</summary>
- public class AdoS0MfgElementParamQueryDto : AdoS0MfgPagedQueryBase
- {
- public string? ElementCategory { get; set; }
- }
- #endregion
- #region 仅 PagedQuery 等价的列表 Query
- /// <summary>标准 BOM 行级列表(ProductStructureMaster 路线 A)。</summary>
- public class AdoS0ProductStructureQueryDto : AdoS0MfgPagedQueryBase;
- public class AdoS0MfgRoutingOpDetailQueryDto : AdoS0MfgPagedQueryBase;
- public class AdoS0MfgLinePostQueryDto : AdoS0MfgPagedQueryBase;
- public class AdoS0MfgPersonSkillQueryDto : AdoS0MfgPagedQueryBase;
- public class AdoS0MfgPersonSkillAssignmentQueryDto : AdoS0MfgPagedQueryBase;
- public class AdoS0MfgWorkOrderControlQueryDto : AdoS0MfgPagedQueryBase;
- public class AdoS0MfgWorkCenterQueryDto : AdoS0MfgPagedQueryBase;
- public class AdoS0MfgLineMaterialQueryDto : AdoS0MfgPagedQueryBase;
- /// <summary>
- /// SOP 文件类型(源平台 ImageType):列表查询
- /// </summary>
- public class AdoS0MfgSopFileTypeQueryDto
- {
- // 去 domain 化(S0-DOMAIN-FILTER-REMOVAL-READONLY-1):查询不再要求 Domain,放宽 [Required] 为可空;租户隔离由实体保证。
- [MaxLength(50)]
- public string? Domain { get; set; }
- public string? Keyword { get; set; }
- public int Page { get; set; } = 1;
- public int PageSize { get; set; } = 20;
- }
- #endregion
- #region 标准资源 Upsert(12 个非聚合)
- public class AdoS0StdOpMasterUpsertDto
- {
- [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
- public long CompanyRefId { get; set; }
- [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
- public long FactoryRefId { get; set; }
- [Required(ErrorMessage = "工厂域编码不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [Required(ErrorMessage = "标准工序名称不能为空")]
- [MaxLength(100)]
- public string StdOp { get; set; } = string.Empty;
- [Required(ErrorMessage = "标准工序编码不能为空")]
- [MaxLength(100)]
- public string StdOpCode { get; set; } = string.Empty;
- [MaxLength(20)]
- public string? MilestoneOp { get; set; }
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- }
- public class AdoS0LineMasterUpsertDto
- {
- [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
- public long CompanyRefId { get; set; }
- [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
- public long FactoryRefId { get; set; }
- [Required(ErrorMessage = "工厂域编码不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [Required(ErrorMessage = "生产线编码不能为空")]
- [MaxLength(100)]
- public string Line { get; set; } = string.Empty;
- [MaxLength(255)]
- public string? Describe { get; set; }
- [MaxLength(50)]
- public string? LineType { get; set; }
- [MaxLength(50)]
- public string? LineCategory { get; set; }
- [MaxLength(50)]
- public string? Location { get; set; }
- [MaxLength(50)]
- public string? Workshop { get; set; }
- [MaxLength(50)]
- public string? VLocation { get; set; }
- [MaxLength(50)]
- public string? Location2 { get; set; }
- [MaxLength(50)]
- public string? Location3 { get; set; }
- [MaxLength(50)]
- public string? PickingLocation { get; set; }
- [MaxLength(50)]
- public string? MidLocation { get; set; }
- public bool IsActive { get; set; } = true;
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- }
- public class AdoS0MfgSopFileTypeUpsertDto
- {
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [Required(ErrorMessage = "文件类型编码不能为空")]
- [MaxLength(100)]
- public string ImageTypeID { get; set; } = string.Empty;
- [MaxLength(255)]
- public string? Descr { get; set; }
- }
- public class AdoS0MfgElementParamUpsertDto
- {
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- public string? ElementCode { get; set; }
- public string? ElementName { get; set; }
- public string? ElementCategory { get; set; }
- public string Code { get; set; } = string.Empty;
- public string Name { get; set; } = string.Empty;
- public string? ParamType { get; set; }
- public string? Unit { get; set; }
- public string? StdValue { get; set; }
- public decimal? UpperLimit { get; set; }
- public decimal? LowerLimit { get; set; }
- public string? EnumOptions { get; set; }
- public string? Remark { get; set; }
- public bool IsEnabled { get; set; } = true;
- }
- /// <summary>
- /// 生产要素参数(DevMonitor;固定 CodeType='Prod'):列表查询
- /// </summary>
- public class AdoS0DevMonitorQueryDto
- {
- // 去 domain 化(S0-DOMAIN-FILTER-REMOVAL-READONLY-1):查询不再要求 Domain,放宽 [Required] 为可空;租户隔离由实体保证。
- [MaxLength(50)]
- public string? Domain { get; set; }
- public string? Keyword { get; set; }
- public int Page { get; set; } = 1;
- public int PageSize { get; set; } = 20;
- }
- public class AdoS0MfgPreprocessElementParamQueryDto
- {
- // 去 domain 化(S0-DOMAIN-FILTER-REMOVAL-READONLY-1):查询不再要求 Domain,放宽 [Required] 为可空;租户隔离由实体保证。
- [MaxLength(50)]
- public string? Domain { get; set; }
- public string? Keyword { get; set; }
- public int Page { get; set; } = 1;
- public int PageSize { get; set; } = 20;
- }
- public class AdoS0DevMonitorUpsertDto
- {
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [Required(ErrorMessage = "要素编码不能为空")]
- [MaxLength(100)]
- public string DeviceNumber { get; set; } = string.Empty;
- public string? DeviceDescr { get; set; }
- [Required(ErrorMessage = "参数编码不能为空")]
- [MaxLength(100)]
- public string MessageCode { get; set; } = string.Empty;
- public string? CodeDescr { get; set; }
- public string? ValueType { get; set; }
- public string? UM { get; set; }
- public string? StdValue { get; set; }
- public decimal? TopLimit { get; set; }
- public decimal? LowLimit { get; set; }
- public string? Ufld1 { get; set; }
- /// <summary>固定为 Prod</summary>
- public string CodeType { get; set; } = "Prod";
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- }
- public class AdoS0MfgPreprocessElementParamUpsertDto
- {
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [Required(ErrorMessage = "要素编码不能为空")]
- [MaxLength(100)]
- public string DeviceNumber { get; set; } = string.Empty;
- public string? DeviceDescr { get; set; }
- [Required(ErrorMessage = "参数编码不能为空")]
- [MaxLength(100)]
- public string MessageCode { get; set; } = string.Empty;
- public string? CodeDescr { get; set; }
- public string? ValueType { get; set; }
- public string? UM { get; set; }
- public string? StdValue { get; set; }
- public decimal? TopLimit { get; set; }
- public decimal? LowLimit { get; set; }
- public string? Ufld1 { get; set; }
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- }
- /// <summary>
- /// 物料工序生产要素(ItemOpCondition;固定 CodeType='Prod'):列表查询
- /// </summary>
- public class AdoS0ItemOpConditionQueryDto
- {
- // 去 domain 化(S0-DOMAIN-FILTER-REMOVAL-READONLY-1):查询不再要求 Domain,放宽 [Required] 为可空;租户隔离由实体保证。
- [MaxLength(50)]
- public string? Domain { get; set; }
- public string? Keyword { get; set; }
- public string? ItemNum { get; set; }
- public string? Op { get; set; }
- public string? Line { get; set; }
- public string? Typed { get; set; }
- public string? ItemCode { get; set; }
- public int Page { get; set; } = 1;
- public int PageSize { get; set; } = 20;
- }
- public class AdoS0ItemOpConditionUpsertDto
- {
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [Required(ErrorMessage = "物料编码不能为空")]
- [MaxLength(100)]
- public string ItemNum { get; set; } = string.Empty;
- public string? Op { get; set; }
- public string? Line { get; set; }
- public string? Typed { get; set; }
- public string? ItemCode { get; set; }
- public string? Descr { get; set; }
- public bool IsMain { get; set; }
- /// <summary>固定为 Prod</summary>
- public string CodeType { get; set; } = "Prod";
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- }
- public class AdoS0MfgPersonSkillUpsertDto
- {
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- [MaxLength(100)]
- public string Code { get; set; } = string.Empty;
- [MaxLength(200)]
- public string Name { get; set; } = string.Empty;
- [MaxLength(50)]
- public string? SkillLevel { get; set; }
- [MaxLength(500)]
- public string? Remark { get; set; }
- public bool IsEnabled { get; set; } = true;
- }
- /// <summary>
- /// 人员技能字典下拉项。供「人员技能分配」页 SkillNo 字段联动使用,按 PersonSkill.Code 作为业务值。
- /// </summary>
- public class S0PersonSkillOptionRow
- {
- 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; } = string.Empty;
- public string? SkillLevel { get; set; }
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- public bool IsEnabled { get; set; }
- }
- public class AdoS0MfgPersonSkillAssignmentUpsertDto
- {
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- public string PersonCode { get; set; } = string.Empty;
- public string? WorkGroup { get; set; }
- public long SkillId { get; set; }
- public int SkillLevel { get; set; }
- public decimal ProductionEfficiency { get; set; } = 1m;
- public string? Remark { get; set; }
- public bool IsEnabled { get; set; } = true;
- }
- /// <summary>
- /// 人员技能维护(EmpSkills):列表查询。
- /// </summary>
- public class AdoS0EmpSkillsQueryDto : AdoS0MfgPagedQueryBase
- {
- /// <summary>工厂域(Domain)</summary>
- public string? Domain { get; set; }
- /// <summary>人员编号(Employee)</summary>
- public string? Employee { get; set; }
- /// <summary>工作组(Site)</summary>
- public string? Site { get; set; }
- /// <summary>技能编码(SkillNo)</summary>
- public string? SkillNo { get; set; }
- }
- public class AdoS0EmpSkillsUpsertDto
- {
- [Required(ErrorMessage = "人员编号不能为空")]
- [MaxLength(100)]
- public string Employee { get; set; } = string.Empty;
- [MaxLength(100)]
- public string? EmployeeId { get; set; }
- [MaxLength(100)]
- public string? EmployeeName { get; set; }
- [MaxLength(100)]
- public string? Site { get; set; }
- [Required(ErrorMessage = "技能编码不能为空")]
- [MaxLength(100)]
- public string SkillNo { get; set; } = string.Empty;
- [MaxLength(255)]
- public string? SkillDescription { get; set; }
- [MaxLength(50)]
- public string? SkillLevel { get; set; }
- public decimal? EfficiencyCoefficient { get; set; }
- public DateTime? DateSkill { get; set; }
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- }
- public class AdoS0MfgWorkCenterUpsertDto
- {
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- public string Code { get; set; } = string.Empty;
- public string Name { get; set; } = string.Empty;
- public string? CenterType { get; set; }
- public decimal? Capacity { get; set; }
- public long? DepartmentId { get; set; }
- public string? Remark { get; set; }
- public bool IsEnabled { get; set; } = true;
- }
- public class AdoS0MfgLineMaterialUpsertDto
- {
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- public long? ProductionLineId { get; set; }
- public long MaterialId { get; set; }
- public long? OperationId { get; set; }
- public long? WorkCenterId { get; set; }
- public string? EquipmentCode { get; set; }
- public decimal? StdCapacityPerUnit { get; set; }
- public decimal? ChangeoverTime { get; set; }
- public string? EquipmentTypeCode { get; set; }
- public string? MoldTypeCode { get; set; }
- public string? RequiredSkillCode { get; set; }
- public string? MaterialRole { get; set; }
- public string? Remark { get; set; }
- public bool IsEnabled { get; set; } = true;
- }
- /// <summary>
- /// 工作中心(WorkCtrMaster):列表查询
- /// </summary>
- public class AdoS0WorkCtrMasterQueryDto
- {
- // 去 domain 化(S0-DOMAIN-FILTER-REMOVAL-READONLY-1):查询不再要求 Domain,放宽 [Required] 为可空;租户隔离由实体保证。
- [MaxLength(50)]
- public string? Domain { get; set; }
- public string? Keyword { get; set; }
- public int Page { get; set; } = 1;
- public int PageSize { get; set; } = 20;
- }
- public class AdoS0WorkCtrMasterUpsertDto
- {
- [Required(ErrorMessage = "工作中心编码不能为空")]
- [MaxLength(100)]
- public string WorkCtr { get; set; } = string.Empty;
- [MaxLength(255)]
- public string? Descr { get; set; }
- [MaxLength(100)]
- public string? Department { get; set; }
- public bool IsActive { get; set; } = true;
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- }
- /// <summary>
- /// 生产线物料(ProdLineDetail):列表查询
- /// </summary>
- public class AdoS0ProdLineDetailQueryDto : AdoS0MfgPagedQueryBase
- {
- public string? Domain { get; set; }
- public string? Part { get; set; }
- public int? Op { get; set; }
- public string? Site { get; set; }
- public string? Line { get; set; }
- }
- public class AdoS0ProdLineDetailUpsertDto
- {
- [Required(ErrorMessage = "物料编码不能为空")]
- [MaxLength(100)]
- public string Part { get; set; } = string.Empty;
- public int Op { get; set; }
- [MaxLength(100)]
- public string? Site { get; set; }
- [MaxLength(100)]
- public string? Line { get; set; }
- public decimal? Rate { get; set; }
- public decimal? SetupTime { get; set; }
- public string? SkillNo { get; set; }
- public string? InternalEquipmentTypeCode { get; set; }
- public string? MoldTypeCode { get; set; }
- /// <summary>标准人数。可空:前端 el-input-number 清空时传 null,反序列化不报错;控制器写入时 null 视为 0(与字段省略行为一致)。</summary>
- public decimal? StandardStaffCount { get; set; }
- public int? Start { get; set; }
- public bool IsActive { get; set; } = true;
- public bool IsConfirm { get; set; }
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- }
- public class AdoS0MfgWorkOrderControlUpsertDto
- {
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- public string Code { get; set; } = string.Empty;
- public string Name { get; set; } = string.Empty;
- public string? ControlType { get; set; }
- public string? ParamValue { get; set; }
- public string? Remark { get; set; }
- public bool IsEnabled { get; set; } = true;
- }
- /// <summary>
- /// 工单控制参数设置(WorkOrdControl):每个租户一套配置。
- ///
- /// 业务模型(S0-WORKORD-CONTROL-TENANT-UX-FIX):
- /// 隔离边界只有 tenant_id;Domain 降级为历史兼容业务字段,可空,
- /// 不参与可见性判定,页面初始加载也不依赖它。
- /// </summary>
- public class AdoS0WorkOrdControlGetDto
- {
- /// <summary>工厂域(可选业务筛选,留空表示取当前租户的配置)。</summary>
- [MaxLength(50)]
- public string? Domain { get; set; }
- }
- public class AdoS0WorkOrdControlUpsertDto
- {
- /// <summary>RecID → Id;存在则按 Id 更新(Id 必须属于当前租户,否则 404)。</summary>
- public long? Id { get; set; }
- /// <summary>工厂域(可选历史兼容字段,留空则沿用既有值)。</summary>
- [MaxLength(50)]
- public string? Domain { get; set; }
- public decimal? EnteringPer { get; set; }
- public decimal? PaintingPer { get; set; }
- public decimal? IssuedInterval { get; set; }
- public bool PostVarsatSFC { get; set; }
- public bool IsIssued { get; set; }
- public bool IsPrintRejectBarcode { get; set; }
- public bool IsPrintScrapBarcode { get; set; }
- public bool IsQualityConfirm { get; set; }
- public bool IsActive { get; set; } = true;
- public bool IsConfirm { get; set; }
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- }
- public class AdoS0MfgMaterialProcessElementUpsertDto
- {
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- public long MaterialId { get; set; }
- public long OperationId { get; set; }
- public long? ProductionLineId { get; set; }
- public string? ElementType { get; set; }
- public string? ElementCode { get; set; }
- public string? ElementName { get; set; }
- public long ElementParamId { get; set; }
- public string? ParamValue { get; set; }
- public bool IsKeyElement { get; set; }
- public string? Remark { get; set; }
- public bool IsEnabled { get; set; } = true;
- }
- public class AdoS0MfgSopDocumentUpsertDto
- {
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [MaxLength(100)]
- public string? Line { get; set; }
- [MaxLength(100)]
- public string? ItemNum { get; set; }
- [MaxLength(100)]
- public string? Op { get; set; }
- [MaxLength(100)]
- public string? ImageTypeID { get; set; }
- [MaxLength(1000)]
- public string? Path { get; set; }
- [MaxLength(255)]
- public string? Descr { get; set; }
- [MaxLength(50)]
- public string? Rev { get; set; }
- public int? SortID { get; set; }
- }
- #endregion
- #region 聚合 Upsert(步骤 9)
- /// <summary>标准 BOM 行维护 Upsert(含多工序号,对应 ProductStructureOp)。</summary>
- /// <summary>
- /// 工序覆盖明细行(ProductStructureOp)的无损 DTO。
- ///
- /// 业务身份:(ParentItem, ComponentItem, ProductItem) —— 与生产端
- /// ProductDesignService.GetBomAndRouting 的 join 键完全一致;
- /// 技术身份:RecID(这里的 Id,long 序列化为 string 以防 JS 精度丢失)。
- /// Op 可编辑,**不可**作为身份键。
- /// </summary>
- public class AdoS0ProductStructureOpDto
- {
- /// <summary>已有明细的技术主键(RecID)。为空表示新增行。服务端会校验其归属租户与主表。</summary>
- public string? Id { get; set; }
- /// <summary>工序号(覆盖 master.Op)。可编辑。</summary>
- public int Op { get; set; }
- /// <summary>成品物料编码。可编辑,取值须属于该父件的 BOM 顶层成品候选集。</summary>
- public string ProductItem { get; set; } = string.Empty;
- /// <summary>是否有效(旧系统字段)。现阶段只读回显,新增行由服务端置 true。</summary>
- public bool? IsActive { get; set; }
- /// <summary>确认(旧系统字段)。现阶段只读回显,新增行由服务端置 false。</summary>
- public bool? IsConfirm { get; set; }
- /// <summary>参考(旧系统字段)。只读保留。</summary>
- public string? Refs { get; set; }
- /// <summary>预留字段 1(旧系统)。只读保留。</summary>
- public string? Ufld1 { get; set; }
- /// <summary>预留字段 2(旧系统)。只读保留。</summary>
- public string? Ufld2 { get; set; }
- }
- public class AdoS0ProductStructureUpsertDto
- {
- [Range(1, long.MaxValue, ErrorMessage = "公司不能为空")]
- public long CompanyRefId { get; set; }
- [Range(1, long.MaxValue, ErrorMessage = "工厂不能为空")]
- public long FactoryRefId { get; set; }
- [Range(1, long.MaxValue, ErrorMessage = "父项物料不能为空")]
- public long ParentMaterialId { get; set; }
- [Range(1, long.MaxValue, ErrorMessage = "子项物料不能为空")]
- public long ComponentMaterialId { get; set; }
- public decimal Qty { get; set; } = 1m;
- public string? UM { get; set; }
- public decimal Scrap { get; set; }
- public decimal QtyConsumed { get; set; }
- public int? LineOp { get; set; }
- public string? Refs { get; set; }
- public string? Remark { get; set; }
- public DateTime? StartEff { get; set; }
- public DateTime? EndEff { get; set; }
- public string? StructureType { get; set; }
- public bool IsEnabled { get; set; } = true;
- /// <summary>多工序号(去重排序后落 ProductStructureOp)。</summary>
- /// <summary>
- /// 工序覆盖明细(ProductStructureOp)。无损契约:每行代表「某顶层成品 ProductItem
- /// 上下文中,对本 BOM edge 的工序号覆盖」,故必须逐行携带 ProductItem,
- /// 不能再退化成 List<int> 的工序号集合(会丢 ProductItem 并压缩行数)。
- /// </summary>
- public List<AdoS0ProductStructureOpDto> Ops { get; set; } = new();
- }
- /// <summary>标准工艺路线明细行(RoutingOpDetail 复刻)Upsert。</summary>
- public class AdoS0MfgRoutingOpDetailUpsertDto
- {
- // 行级工艺路线(legacy RoutingOpDetail 复刻)不建模组织作用域:全表 company/factory 多为 0,
- // 前端已不展示公司/工厂,故此处放行 0,按原值透传,不强制非零。
- public long CompanyRefId { get; set; }
- public long FactoryRefId { get; set; }
- [Required(ErrorMessage = "工艺路线编码不能为空")]
- public string RouteCode { get; set; } = string.Empty;
- [Required(ErrorMessage = "工艺路线名称不能为空")]
- public string RouteName { get; set; } = string.Empty;
- [Required(ErrorMessage = "物料编码不能为空")]
- public string MaterialCode { get; set; } = string.Empty;
- [Required(ErrorMessage = "工序编码不能为空")]
- public string OperationCode { get; set; } = string.Empty;
- public string? OperationDescription { get; set; }
- public string? WorkCenterCode { get; set; }
- public string? MilestoneOperation { get; set; }
- public string? Ufld1 { get; set; }
- public string? Ufld2 { get; set; }
- public decimal? UDeci1 { get; set; }
- public string? Ufld3 { get; set; }
- public string? Ufld4 { get; set; }
- public string? Ufld5 { get; set; }
- public decimal? UDeci2 { get; set; }
- public string? Ufld6 { get; set; }
- public string? Ufld7 { get; set; }
- public string? Ufld8 { get; set; }
- public decimal? UDeci3 { get; set; }
- public string? Ufld9 { get; set; }
- public decimal? UDeci4 { get; set; }
- public decimal? UDeci5 { get; set; }
- public string? SupplierCode { get; set; }
- public int OutsourcedLeadTime { get; set; }
- public int SortNo { get; set; }
- public bool IsEnabled { get; set; } = true;
- public bool IsConfirm { get; set; }
- public int? CommentIndex { get; set; }
- public string? CreateUser { get; set; }
- public string? UpdateUser { get; set; }
- }
- /// <summary>
- /// 产线岗位维护(LineSkillMaster):列表查询。
- /// Domain 为旧系统遗留字段,仅在请求显式传入时按相等过滤;新系统数据隔离以 ITenantIdFilter 为准。
- /// </summary>
- public class AdoS0LineSkillMasterQueryDto
- {
- /// <summary>旧系统遗留字段;不传或空字符串时不参与过滤。</summary>
- [MaxLength(50)]
- public string? Domain { get; set; }
- /// <summary>匹配生产线/岗位编码/岗位描述</summary>
- public string? Keyword { get; set; }
- public int Page { get; set; } = 1;
- public int PageSize { get; set; } = 20;
- }
- public class AdoS0LineSkillDetailUpsertDto
- {
- /// <summary>
- /// 人员技能【业务编码】(PersonSkill.Code),如 "102"。
- /// 客户端只提交业务编码;服务端按当前登录租户解析出 PersonSkill.Id 再落库,
- /// **不信任客户端提交的内部主键**(避免越权引用他租户主数据)。
- /// </summary>
- [Required(ErrorMessage = "人员技能不能为空")]
- [MaxLength(100)]
- public string PersonSkillCode { get; set; } = string.Empty;
- public string? RequiredLevel { get; set; }
- public string? Remark { get; set; }
- public DateTime? EffectiveDate { get; set; }
- public bool IsEnabled { get; set; } = true;
- }
- public class AdoS0LineSkillMasterUpsertDto
- {
- [Required(ErrorMessage = "工厂域不能为空")]
- [MaxLength(50)]
- public string Domain { get; set; } = string.Empty;
- [Required(ErrorMessage = "生产线不能为空")]
- [MaxLength(100)]
- public string ProdLine { get; set; } = string.Empty;
- [Required(ErrorMessage = "岗位编码不能为空")]
- [MaxLength(100)]
- public string JOBNo { get; set; } = string.Empty;
- [MaxLength(255)]
- public string? JOBDescr { get; set; }
- [MaxLength(12)]
- public string? Site { get; set; }
- public int? Orderby { get; set; }
- [MaxLength(20)]
- public string? WType { get; set; }
- public decimal? RunCrew { get; set; }
- [MaxLength(64)]
- public string? CreateUser { get; set; }
- public DateTime? CreateTime { get; set; }
- [MaxLength(64)]
- public string? UpdateUser { get; set; }
- public DateTime? UpdateTime { get; set; }
- public List<AdoS0LineSkillDetailUpsertDto> Skills { get; set; } = new();
- }
- public class AdoS0ProcessFlowCardQueryDto : AdoS0MfgPagedQueryBase
- {
- public string? DomainCode { get; set; }
- public string? WorkOrderNo { get; set; }
- public string? FlowCardNo { get; set; }
- public string? ItemNum { get; set; }
- public bool? IsActive { get; set; }
- }
- public class AdoS0ProcessFlowCardUpsertDto
- {
- /// <summary>
- /// 公司。**服务端忽略**:新增由 AdoS0ProcessFlowCardsController.ResolveDefaultOrgAsync(tenantId)
- /// 在当前租户内解析后强制 stamp,编辑由 IgnoreColumns pin 既有原值。
- /// 保留字段仅为 payload 向后兼容(前端 useS0MfgOrgScope 仍会带值),不做校验——
- /// 原 [Range(1, long.MaxValue)] 是失效前置门:值不参与落库,却会在模型绑定阶段
- /// 把"租户未配置机构"误报成"公司不能为空",故移除。
- /// </summary>
- public long CompanyRefId { get; set; }
- /// <summary>工厂。**服务端忽略**,同 <see cref="CompanyRefId"/>。</summary>
- public long FactoryRefId { get; set; }
- [MaxLength(50)]
- public string? DomainCode { get; set; }
- [Required(ErrorMessage = "工单不能为空")]
- [MaxLength(100)]
- public string WorkOrderNo { get; set; } = string.Empty;
- [MaxLength(100)]
- public string? WorkOrderBatchNo { get; set; }
- [Required(ErrorMessage = "流转卡号不能为空")]
- [MaxLength(100)]
- public string FlowCardNo { get; set; } = string.Empty;
- [MaxLength(100)]
- public string? Nature { get; set; }
- [Required(ErrorMessage = "物料编码不能为空")]
- [MaxLength(100)]
- public string ItemNum { get; set; } = string.Empty;
- [MaxLength(200)]
- public string? ItemName { get; set; }
- [MaxLength(100)]
- public string? DrawingNo { get; set; }
- [MaxLength(50)]
- public string? BomVersion { get; set; }
- [MaxLength(100)]
- public string? RoutingCode { get; set; }
- [MaxLength(500)]
- public string? Remarks { get; set; }
- public bool IsActive { get; set; } = true;
- public string? CreateUser { get; set; }
- public string? UpdateUser { get; set; }
- }
- public class AdoS0ProcessFlowCardToggleActiveDto
- {
- public bool IsEnabled { get; set; }
- }
- public class AdoS0OrderScheduleCycleQueryDto : AdoS0MfgPagedQueryBase
- {
- public string? DomainCode { get; set; }
- public string? OrderType { get; set; }
- public bool? IsActive { get; set; }
- }
- public class AdoS0OrderScheduleCycleUpsertDto
- {
- [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; }
- /// <summary>订单类型;留空表示默认/不限。</summary>
- [MaxLength(100)]
- public string? OrderType { get; set; }
- [Range(0, int.MaxValue, ErrorMessage = "标准时长不能为负")]
- public int StdHours { get; set; }
- [MaxLength(500)]
- public string? Remarks { get; set; }
- public bool IsActive { get; set; } = true;
- public string? CreateUser { get; set; }
- public string? UpdateUser { get; set; }
- }
- public class AdoS0OrderScheduleCycleToggleActiveDto
- {
- public bool IsEnabled { get; set; }
- }
- #endregion
|