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.perform.create
///
public class OapiRhinoMosExecPerformCreateRequest : BaseDingTalkRequest
{
///
/// 工序执行记录
///
public string Operations { get; set; }
public List Operations_ { set { this.Operations = TopUtils.ObjectToJson(value); } }
///
/// 订单ID
///
public Nullable OrderId { get; set; }
///
/// 租户ID
///
public string TenantId { get; set; }
///
/// 用户ID
///
public string Userid { get; set; }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.oapi.rhino.mos.exec.perform.create";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_OAPI;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("operations", this.Operations);
parameters.Add("order_id", this.OrderId);
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.ValidateRequired("operations", this.Operations);
RequestValidator.ValidateObjectMaxListSize("operations", this.Operations, 500);
RequestValidator.ValidateRequired("tenant_id", this.TenantId);
}
///
/// OperationReqDomain Data Structure.
///
[Serializable]
public class OperationReqDomain : TopObject
{
///
/// 执行上下文
///
[XmlElement("context")]
public string Context { get; set; }
///
/// 设备ID列表
///
[XmlArray("device_ids")]
[XmlArrayItem("number")]
public List DeviceIds { get; set; }
///
/// 实体ID
///
[XmlElement("entity_id")]
public Nullable EntityId { get; set; }
///
/// 实体类型
///
[XmlElement("entity_type")]
public string EntityType { 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; }
///
/// 订单ID
///
[XmlElement("order_id")]
public Nullable OrderId { get; set; }
///
/// 执行状态
///
[XmlElement("perform_status")]
public string PerformStatus { get; set; }
///
/// 执行类型
///
[XmlElement("perform_type")]
public string PerformType { get; set; }
///
/// 优先级
///
[XmlElement("priority")]
public Nullable Priority { get; set; }
///
/// 工序执行耗时,单位秒
///
[XmlElement("process_cost_time")]
public string ProcessCostTime { 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; }
///
/// 来源ID
///
[XmlElement("source_id")]
public string SourceId { get; set; }
///
/// 来源类型
///
[XmlElement("source_type")]
public string SourceType { get; set; }
///
/// 执行人工号
///
[XmlArray("work_nos")]
[XmlArrayItem("string")]
public List WorkNos { get; set; }
///
/// 执行工位
///
[XmlElement("workstation_code")]
public string WorkstationCode { get; set; }
}
#endregion
}
}