using System; using System.Xml.Serialization; using System.Collections.Generic; using Top.Api.Util; using Top.Api; using Top.Api.DingTalk; namespace DingTalk.Api.Request { /// /// TOP API: dingtalk.oapi.rhino.mos.layout.operationdef.saveflow /// public class OapiRhinoMosLayoutOperationdefSaveflowRequest : BaseDingTalkRequest { /// /// 是否生效 /// public Nullable Active { get; set; } /// /// 工序版本(指定版本时版本如果已经存在则幂等) /// public Nullable FlowVersion { get; set; } /// /// 工序定义列表 /// public string OperationDefs { get; set; } public List OperationDefs_ { set { this.OperationDefs = TopUtils.ObjectToJson(value); } } /// /// 订单ID /// public Nullable OrderId { get; set; } /// /// 来源系统 /// public string Source { get; set; } /// /// 租户ID /// public string TenantId { get; set; } /// /// 是否暂存 /// public Nullable TmpSave { get; set; } /// /// 用户ID /// public string Userid { get; set; } #region IDingTalkRequest Members public override string GetApiName() { return "dingtalk.oapi.rhino.mos.layout.operationdef.saveflow"; } public override string GetApiCallType() { return DingTalkConstants.CALL_TYPE_OAPI; } public override IDictionary GetParameters() { TopDictionary parameters = new TopDictionary(); parameters.Add("active", this.Active); parameters.Add("flow_version", this.FlowVersion); parameters.Add("operation_defs", this.OperationDefs); parameters.Add("order_id", this.OrderId); parameters.Add("source", this.Source); parameters.Add("tenant_id", this.TenantId); parameters.Add("tmp_save", this.TmpSave); parameters.Add("userid", this.Userid); if (this.otherParams != null) { parameters.AddAll(this.otherParams); } return parameters; } public override void Validate() { RequestValidator.ValidateRequired("active", this.Active); RequestValidator.ValidateRequired("operation_defs", this.OperationDefs); RequestValidator.ValidateObjectMaxListSize("operation_defs", this.OperationDefs, 500); RequestValidator.ValidateRequired("order_id", this.OrderId); RequestValidator.ValidateRequired("tenant_id", this.TenantId); } /// /// OperationExecutorAssignDtoDomain Data Structure. /// [Serializable] public class OperationExecutorAssignDtoDomain : TopObject { /// /// 工序执行器ID /// [XmlElement("executor_id")] public string ExecutorId { get; set; } /// /// 排序值 /// [XmlElement("order_num")] public Nullable OrderNum { get; set; } } /// /// DeviceAssignDtoDomain Data Structure. /// [Serializable] public class DeviceAssignDtoDomain : TopObject { /// /// 设备ID /// [XmlElement("device_id")] public Nullable DeviceId { get; set; } /// /// 设备模型ID /// [XmlElement("device_model_id")] public string DeviceModelId { get; set; } /// /// 设备模型名称 /// [XmlElement("device_model_name")] public string DeviceModelName { get; set; } /// /// 设备模型版本 /// [XmlElement("device_model_version")] public string DeviceModelVersion { get; set; } } /// /// WorkerAssignDtoDomain Data Structure. /// [Serializable] public class WorkerAssignDtoDomain : TopObject { /// /// 姓名 /// [XmlElement("name")] public string Name { get; set; } /// /// 工号 /// [XmlElement("work_no")] public string WorkNo { get; set; } } /// /// WorkstationAssignDtoDomain Data Structure. /// [Serializable] public class WorkstationAssignDtoDomain : TopObject { /// /// 站位编码 /// [XmlElement("workstation_code")] public string WorkstationCode { get; set; } } /// /// WorkUnitDtoDomain Data Structure. /// [Serializable] public class WorkUnitDtoDomain : TopObject { /// /// 设备分配列表 /// [XmlArray("device_assigns")] [XmlArrayItem("device_assign_dto")] public List DeviceAssigns { get; set; } /// /// 人员分配列表 /// [XmlArray("worker_assigns")] [XmlArrayItem("worker_assign_dto")] public List WorkerAssigns { get; set; } /// /// 站位分配 /// [XmlArray("workstation_assigns")] [XmlArrayItem("workstation_assign_dto")] public List WorkstationAssigns { get; set; } } /// /// OperationDefDtoDomain Data Structure. /// [Serializable] public class OperationDefDtoDomain : TopObject { /// /// 适用尺码 /// [XmlElement("applicable_size_code")] public string ApplicableSizeCode { get; set; } /// /// 是否需要自动调度 /// [XmlElement("auto_schedule")] public Nullable AutoSchedule { get; set; } /// /// 业务编码 /// [XmlElement("biz_code")] public string BizCode { get; set; } /// /// 业务来源 /// [XmlElement("biz_source")] public string BizSource { get; set; } /// /// 进入条件:ANY_MATCH/ALL_MATCH /// [XmlElement("enter_condition")] public string EnterCondition { get; set; } /// /// 执行系统 /// [XmlElement("exec_system")] public string ExecSystem { get; set; } /// /// PaaSflowID(只用于返回,保存会自增) /// [XmlElement("flow_id")] public Nullable FlowId { get; set; } /// /// 工序版本(指定版本时版本如果已经存在则幂等) /// [XmlElement("flow_version")] public Nullable FlowVersion { get; set; } /// /// 工序名称 /// [XmlElement("name")] public string Name { get; set; } /// /// 后续工序外部ID列表 /// [XmlArray("next_operation_external_ids")] [XmlArrayItem("string")] public List NextOperationExternalIds { get; set; } /// /// 后续工序ID列表(只用于返回,保存请设置nextVirtualIds) /// [XmlArray("next_operation_uids")] [XmlArrayItem("number")] public List NextOperationUids { get; set; } /// /// 工序执行器分配 /// [XmlArray("operation_executor_assigns")] [XmlArrayItem("operation_executor_assign_dto")] public List OperationExecutorAssigns { get; set; } /// /// 工序外部ID /// [XmlElement("operation_external_id")] public string OperationExternalId { get; set; } /// /// 工序类型:ASSIST/QUALITY_INSPECT/TECHNOLOGY /// [XmlElement("operation_type")] public string OperationType { get; set; } /// /// 工序唯一ID(保存时已存在则复用,不存在会自增) /// [XmlElement("operation_uid")] public Nullable OperationUid { get; set; } /// /// 工序能力类型:SJ/PP/TR等 /// [XmlElement("process_type_code")] public string ProcessTypeCode { get; set; } /// /// 工段CODE:F-SL/C.. /// [XmlElement("section_code")] public string SectionCode { get; set; } /// /// 工段名称:缝制-碎料/裁床.. /// [XmlElement("section_name")] public string SectionName { get; set; } /// /// 是否跳过(不生产) /// [XmlElement("skip")] public Nullable Skip { get; set; } /// /// 标准工时/秒 /// [XmlElement("std_cost")] public string StdCost { get; set; } /// /// 分配单元列表 /// [XmlArray("work_units")] [XmlArrayItem("work_unit_dto")] public List WorkUnits { get; set; } } #endregion } }