using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HH.WCS.DaYang.api { /// /// 通用model /// public class ApiModel { #region hosttoagv 相关 /// /// 返回给hosttoagv /// public class ReturnResult { public int ResultCode { get; set; } public string ResultMsg { get; set; } } /// /// hosttoagv上报任务状态 /// public class AgvTaskState { public int State { get; set; } public string No { get; set; } public string ForkliftNo { get; set; } public string ErrCode { get; set; } public string LockNo { get; set; } public string Ext1 { get; set; } public string Ext2 { get; set; } public string N_CNTR_COUNT { get; set; } public string ExtData { get; set; } } /// /// hosttoagv上报车辆状态(参数在hosttoagv服务配置,可修改) /// public class AgvDeviceStatus { public string forkliftNo { get; set; } public string errCode { get; set; } public string errCode2 { get; set; } public string faildCode { get; set; } public string xPos { get; set; } public string yPos { get; set; } public string battery { get; set; } public string detail { get; set; } public string infoType { get; set; } public string inMapRoute { get; set; } public string CumInfo { get; set; } } /// /// osttoagv上报其它事件信息 /// public class AgvEventInfo { public int Code { get; set; } public string CarID { get; set; } public string Param1 { get; set; } public string Param2 { get; set; } public string Param3 { get; set; } } #endregion #region mobox 相关 /// /// mobox 取消任务、标记完成任务 /// public class MoboxTaskBase { public string TaskNo { get; set; } } /// /// 叠盘机状态切换 /// public class MoboxChangeStatus { public string Type { get; set; } } /// /// mobox 接口返回 /// public class SimpleResult { public int resultCode { get; set; } public string resultMsg { get; set; } public List result { get; set; } = new List(); } public class Result { public int resultCode { get; set; } public string resultMsg { get; set; } } /// /// 分拣确认 /// public class SortingResultCheck { public string sortNo { get; set; } public string cntrCode { get; set; } public string itemCode { get; set; } public float qty { get; set; } } public class CheckSortingWholeCntr { public string cntr { get; set; } /// /// 默认0,1表示自动生成分拣结果 /// public int autoSort { get; set; } } public class InstockInfo { public string start { get; set; } public string cntr { get; set; } } /// /// lua调用接口,码盘信息 /// public class PalletSorting { public string cntr_code { get; set; } public string item_code { get; set; } public float qty { get; set; } public string arrival_no { get; set; } } public class PalletSorting1 { public string cntr_code { get; set; } public string bar_code { get; set; } public string org { get; set; } public float qty { get; set; } } public class ShippingOrderCheck { /// /// 多个发货单号 /// public string out_nos { get; set; } } public class SortingOrderCheck { public string s_no { get; set; } } /// /// 创建任务 /// public class CreateTaskModel { /// /// 任务类型 /// public string TaskType { get; set; }//创建任务 1:空托回库 2:物料呼叫 /// /// 起点货位 /// public string startBit { get; set; } /// /// 终点货位 /// public string endBit { get; set; } /// /// 托盘编码 /// public string ItemCode { get; set; } } public class BindCntr { public string LocCode { get; set; } public string ItemCode { get; set; } } public class UntieCntr { public string LocCode { get; set; } public string CntrCode { get; set; } } #endregion #region 大洋立库接口接收请求参数 /// /// 任务下发 /// public partial class TaskPushModel { /// /// 托盘号 /// [JsonProperty("cntrNo", NullValueHandling = NullValueHandling.Ignore)] public string CntrNo { get; set; } /// /// 托盘类型 /// [JsonProperty("cntrType", NullValueHandling = NullValueHandling.Ignore)] public string CntrType { get; set; } [JsonProperty("extData", NullValueHandling = NullValueHandling.Ignore)] public string[] ExtData { get; set; } /// /// 起点 /// [JsonProperty("from", NullValueHandling = NullValueHandling.Ignore)] public string From { get; set; } /// /// 任务分组 /// [JsonProperty("groupNo", NullValueHandling = NullValueHandling.Ignore)] public string GroupNo { get; set; } /// /// 任务号 /// [JsonProperty("taskNo", NullValueHandling = NullValueHandling.Ignore)] public string TaskNo { get; set; } /// /// 任务类型 /// [JsonProperty("taskType", NullValueHandling = NullValueHandling.Ignore)] public string TaskType { get; set; } /// /// 终点 /// [JsonProperty("to", NullValueHandling = NullValueHandling.Ignore)] public string To { get; set; } } /// /// 设备信号反馈 /// public partial class NotifyDeviceSignalModel { /// /// 托盘号,可空,多个托盘号可以拼接 /// [JsonProperty("cntrNo")] public string CntrNo { get; set; } /// /// 设备编号 /// [JsonProperty("deviceNo")] public string DeviceNo { get; set; } [JsonProperty("extData")] public Dictionary[] ExtData { get; set; } /// /// 货位,上料点、下料点、读码位、称重位 /// [JsonProperty("loc")] public string Loc { get; set; } /// /// 请求类型,1:入库申请 /// [JsonProperty("signalType")] public int SignalType { get; set; } } /// /// 任务状态反馈 /// public partial class NotifyTaskStatusModel { /// /// 设备号 /// [JsonProperty("deviceNo")] public string DeviceNo { get; set; } /// /// 异常代码,主要是针对各种异常取消的描述 /// [JsonProperty("errCode")] public int ErrCode { get; set; } /// /// 当前托盘位置 /// [JsonProperty("loc")] public string Loc { get; set; } /// /// 任务状态,1:开始/执行中;2:完成;3:准备取货;4:取货完成;5:准备卸货;6:卸货完成;7:异常取消;8:强制完成 /// [JsonProperty("status")] public int Status { get; set; } /// /// wcs的子任务号,如果wcs任务拆分了,可以一起上报子任务号,方便日志追踪 /// [JsonProperty("subTaskNo")] public string SubTaskNo { get; set; } /// /// 任务号 /// [JsonProperty("taskNo")] public string TaskNo { get; set; } } /// /// 获取托盘物料信息 /// public partial class GetCntrInfoModel { /// /// 托盘号 /// [JsonProperty("cntrNo")] public string CntrNo { get; set; } } #endregion #region 大洋立库接口接收返回参数 /// /// 设备信息返回 /// public partial class Results { [JsonProperty("code")] public long Code { get; set; } [JsonProperty("data")] public List Data { get; set; } [JsonProperty("msg")] public string Msg { get; set; } } public partial class Result { [JsonProperty("code")] public int Code { get; set; } [JsonProperty("data")] public T Data { get; set; } [JsonProperty("msg")] public string Msg { get; set; } } /// /// 设备信息 /// public partial class DeviceStatusModel { /// /// 当前数量,叠盘机当前托盘数量 /// [JsonProperty("cntrQty")] public string CntrQty { get; set; } /// /// 设备编号或者线体编号 /// [JsonProperty("deviceNo")] public string DeviceNo { get; set; } /// /// 人工设置状态,1启用,0禁用 /// [JsonProperty("manualStatus")] public int ManualStatus { get; set; } /// /// 光电状态,1是有载,0是空载 /// [JsonProperty("photoStatus")] public int PhotoStatus { get; set; } /// /// 工作状态,1可用,0不可用 /// [JsonProperty("workStatus")] public int WorkStatus { get; set; } } /// /// 申请终点 /// public partial class ApplyDestModel { /// /// 申请类型,1:堆垛机放货异常申请新终点;2:输送线到达接驳位申请终点; /// [JsonProperty("applyType")] public long ApplyType { get; set; } /// /// 当前位置,wcs自行控制托盘到特定的入口时,wms根据位置计算终点 /// [JsonProperty("loc")] public string Loc { get; set; } /// /// 任务号 /// [JsonProperty("taskNo")] public string TaskNo { get; set; } } /// /// 申请终点返回 /// public partial class ReseltApplyDestModel { [JsonProperty("loc")] public string Loc { get; set; } } public partial class Empty { } /// /// 设备状态切换 /// public partial class ChangeStatusModel { /// /// 设备编码 /// [JsonProperty("deviceNo")] public string DeviceNo { get; set; } /// /// 模式类型,1:叠托模式/2:拆托模式 /// 叠托模式,不需要拆分托盘到入库口。 /// 拆托模式,需要拆分托盘到入库口 /// [JsonProperty("Type")] public string Type { get; set; } } #endregion } /// /// 项目订制model /// public class OtherModel { /// /// mobox3接口替代,入库单信息 /// public class Putaway_Order_In { public DataInfo Data { get; set; } public class DataInfo { /// /// 入库单号(唯一) /// public string arrival_no { get; set; } /// /// 单据类型 /// public string op_type { get; set; } public List items { get; set; } } public class Detail { public string item_code { get; set; } /// /// 保留4位小数 /// public float qty { get; set; } public string batch_no { get; set; } } } public class OutboundOrder { public DataInfo1 Data { get; set; } public class DataInfo1 { /// /// 出库单号(唯一) /// public string out_no { get; set; } /// /// 单据类型 /// public string op_type { get; set; } /// /// 生产出库的需要指定线边库区 /// public string line_area { get; set; } public List items { get; set; } } public class Detail1 { public string item_code { get; set; } /// /// 保留4位小数 /// public float qty { get; set; } public string batch_no { get; set; } } } public class ApiBaseModel { public string Name { get; set; } public string Source { get; set; } } } }