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.exec.clothes.create /// public class OapiRhinoMosExecClothesCreateRequest : BaseDingTalkRequest { /// /// 工序信息 /// public string AdditionalOperations { get; set; } public List AdditionalOperations_ { set { this.AdditionalOperations = TopUtils.ObjectToJson(value); } } /// /// 衣服状态是否自动开启 /// public Nullable AutoStart { get; set; } /// /// 业务类型 /// public string BizType { get; set; } /// /// 衣服详情 /// public string Clothes { get; set; } public List Clothes_ { set { this.Clothes = TopUtils.ObjectToJson(value); } } /// /// 实体类型 /// public string EntityType { get; set; } /// /// 订单ID /// public Nullable OrderId { get; set; } /// /// 来源 /// public string Source { get; set; } public SourceDomain Source_ { set { this.Source = TopUtils.ObjectToJson(value); } } /// /// 租户ID /// public string TenantId { get; set; } /// /// 业务参数[这里先预留],这里是用户ID,比如钉钉用户ID /// public string Userid { get; set; } #region IDingTalkRequest Members public override string GetApiName() { return "dingtalk.oapi.rhino.mos.exec.clothes.create"; } public override string GetApiCallType() { return DingTalkConstants.CALL_TYPE_OAPI; } public override IDictionary GetParameters() { TopDictionary parameters = new TopDictionary(); parameters.Add("additional_operations", this.AdditionalOperations); parameters.Add("auto_start", this.AutoStart); parameters.Add("biz_type", this.BizType); parameters.Add("clothes", this.Clothes); parameters.Add("entity_type", this.EntityType); parameters.Add("order_id", this.OrderId); parameters.Add("source", this.Source); parameters.Add("tenant_id", this.TenantId); parameters.Add("userid", this.Userid); if (this.otherParams != null) { parameters.AddAll(this.otherParams); } return parameters; } public override void Validate() { RequestValidator.ValidateObjectMaxListSize("additional_operations", this.AdditionalOperations, 500); RequestValidator.ValidateObjectMaxListSize("clothes", this.Clothes, 20); RequestValidator.ValidateRequired("entity_type", this.EntityType); RequestValidator.ValidateRequired("order_id", this.OrderId); RequestValidator.ValidateRequired("source", this.Source); } /// /// AddtionalOperationDomain Data Structure. /// [Serializable] public class AddtionalOperationDomain : TopObject { /// /// 上下文 /// [XmlElement("context")] public string Context { get; set; } /// /// 设备ID列表 /// [XmlArray("device_ids")] [XmlArrayItem("number")] public List DeviceIds { get; set; } /// /// 排位布局版本 /// [XmlElement("flow_version")] public Nullable FlowVersion { get; set; } /// /// 工序类型 /// [XmlElement("operation_type")] public string OperationType { get; set; } /// /// 工序ID /// [XmlElement("operation_uid")] public Nullable OperationUid { get; set; } /// /// 工序执行状态 /// [XmlElement("perform_status")] public string PerformStatus { get; set; } /// /// 优先级 /// [XmlElement("priority")] public Nullable Priority { get; set; } /// /// 工序执行完成时间 /// [XmlElement("process_end_time")] public Nullable ProcessEndTime { get; set; } /// /// 工序执行开始时间 /// [XmlElement("process_start_time")] public Nullable ProcessStartTime { get; set; } /// /// 工序能力类型 /// [XmlElement("process_type_code")] public string ProcessTypeCode { get; set; } /// /// 工段 /// [XmlElement("section_code")] public string SectionCode { get; set; } /// /// 执行人 /// [XmlArray("work_nos")] [XmlArrayItem("string")] public List WorkNos { get; set; } /// /// 工位 /// [XmlElement("workstation_code")] public string WorkstationCode { get; set; } } /// /// SourceDomain Data Structure. /// [Serializable] public class SourceDomain : TopObject { /// /// 来源ID /// [XmlElement("source_id")] public string SourceId { get; set; } /// /// 来源类型 /// [XmlElement("source_type")] public string SourceType { get; set; } } /// /// ClothesInfoReqDomain Data Structure. /// [Serializable] public class ClothesInfoReqDomain : TopObject { /// /// 颜色code /// [XmlElement("color_code")] public string ColorCode { get; set; } /// /// 颜色名 /// [XmlElement("color_name")] public string ColorName { get; set; } /// /// 数量 /// [XmlElement("count")] public Nullable Count { get; set; } /// /// 衣服完成时间 /// [XmlElement("finish_time")] public Nullable FinishTime { get; set; } /// /// 尺码code /// [XmlElement("size_code")] public string SizeCode { get; set; } /// /// 尺码名称 /// [XmlElement("size_name")] public string SizeName { get; set; } /// /// 衣服开始时间 /// [XmlElement("start_time")] public Nullable StartTime { get; set; } } #endregion } }