using System.Collections.Generic;
using Newtonsoft.Json;
namespace HH.WCS.Mobox3.AnGang.api
{
///
/// 通用model
///
public class ApiModel
{
#region mobox 相关
public class SimpleResult {
public int resultCode { get; set; }
public string resultMsg { get; set; }
public List result { get; set; } = new List();
}
public static SimpleResult BuildSimpleResult(int code, string message) {
LogHelper.Info(message);
return new SimpleResult { resultCode = code, resultMsg = message };
}
#endregion
///
/// hosttoagv上报任务状态
///
public class AgvTaskState {
public int state { get; set; }
public string task_no { get; set; }
public string forklift_no { get; set; }
///
/// 安全门编号
///
public string lock_no { get; set; }
public string ext_data { get; set; }
}
public class SafetyInteractionInfo {
//public int station_id { get; set; }
///
/// 请求上线/下线的的站台库位名称,例如work6、work8
///
public string station_name { get; set; }
///
/// 请求码
///
public string apply_code { get; set; }
//public string task_no { set; get; }
}
public class orderStatusReportParme {
public int id { get; set; }
///
/// 订单ID
///
public int orderID { get; set; }
///
/// 订单名
///
public string orderName { get; set; }
///
/// 订单状态
///
public string orderStatus { get; set; }
///
/// agv车号列表
///
public string agvIDList { get; set; }
///
/// 优先级
///
public string priority { get; set; }
///
/// 订单当前的目的地
///
public string currentDes { get; set; }
///
/// 当前指令
///
public string currentCmd { get; set; }
///
/// 错误码
///
public int errorCode { get; set; }
///
/// 额外信息1
///
public string extraInfo1 { get; set; }
///
/// 额外信息2
///
public string extraInfo2 { get; set; }
///
/// 订单的截至时间
///
public string deadLine { get; set; }
///
/// 订单的创建时间
///
public string createdTime { get; set; }
///
/// 创建用户
///
public string createUser { get; set; }
///
/// 状态更改时间
///
public string statusChangeTime { get; set; }
}
///
/// 返回给hosttoagv
///
public class ReturnResult {
public int ResultCode { get; set; }
public string ResultMsg { get; set; }
}
public class gzResult {
public int code { get; set; } = 0;
public string msg { get; set; } = "success";
}
///
/// 返回给GZ
///
public class GzResult {
public int resultCode { get; set; }
public string msg { get; set; }
public int orderID { get; set; }
}
public class EmptyGzResult {
}
public class agvRealtimeStateReportInfo {
public int agvID { get; set; }
public int agvStatusID { get; set; }
public bool netConnected { get; set; }
public string agv_speed { get; set; }
public object node_information_of_traffic { get; set; }
public int dispatchTaskActive { get; set; }
public double position_x { get; set; }
public double position_y { get; set; }
public double angle { get; set; }
public double battery_percentage { get; set; }
public double safetyTriggered { get; set; }
public bool isBlocked { get; set; }
public bool faultHappened { get; set; }
public bool isCharging { get; set; }
public bool hang_agv { get; set; }
public string extroInfo1 { get; set; }
public string extroInfo2 { get; set; }
}
}
public class OtherModel {
public class InboundInfo {
///
/// 起点货位
///
[JsonProperty("StartLoc")]
public string StartLoc { get; set; }
///
/// 终点货架(可选)
///
[JsonProperty("Nrow")]
public string Row { get; set; }
}
public class InboundDataInfo {
///
/// 起点货位
///
[JsonProperty("StartLoc")]
public string StartLoc { get; set; }
///
/// 终点货架(可选)
///
[JsonProperty("Nrow")]
public string Row { get; set; }
public string ItemCode { get; set; }
//public string ItemName { get; set; }
}
public class SelectLocationInfo {
///
/// AGV小车号:NOTE 后期可能省略,因为只有一辆车
///
//public string forklift_no { get; set; }
public string TaskNo { get; set; }
public string EndLoc { get; set; }
}
///
/// 产品部分回库信息
///
public class PartInboundInfo {
///
/// 起点位置
///
public string startLoc { get; set; }
///
/// 终点位置
///
public string endLoc { get; set; }
}
public class CancelTaskInfo {
public string TaskNo { get; set; }
}
///
/// 产品部分出库信息
///
public class PartOutboundInfo {
///
/// 起点位置
///
public string startLoc { get; set; }
///
/// 终点位置
///
public string endLoc { get; set; }
}
public class CreateCountPlanInfo {
public string countType { get; set; }
public string targetId { get; set; }
}
public class CreateCountOrderInfo {
public string planId { get; set; }
}
public class CountProductInfo {
//public string cntrCode { get; set; }
public string locCode { get; set; }
public float qty { get; set; }
}
public class CheckOutboundOnceInfo {
public string cntrCode { get; set; }
public string endLoc { get; set; }
}
///
/// 盘点理货出库信息
///
public class CheckOutboundInfo {
///
/// 起点位置
///
public string startLoc { get; set; }
///
/// 终点位置
///
public string endLoc { get; set; }
}
///
/// 盘点理货回库信息
///
public class CheckInboundInfo {
///
/// 起点位置
///
public string startLoc { get; set; }
///
/// 终点位置
///
public string endLoc { get; set; }
}
public class ErpResult {
///
/// 接口反馈码
///
public int errCode { get; set; }
///
/// 错误说明
///
public string errMsg { get; set; }
}
public static ErpResult BuildErpResult(int code, string message, bool printLog = true) {
if (printLog) {
LogHelper.Info(message);
}
return new ErpResult { errCode = code, errMsg = message };
}
///
/// 入库数据同步信息
///
public class InboundDataSyncInfo {
///
/// 库存明细(列表)
///
public List stockTransactions { get; set; }
///
/// 总记录数
///
public string totalRecords { get; set; }
///
/// 数据生成时间戳
///
public string timestamp { get; set; }
}
///
/// 库存明细信息
///
public class StockTransaction {
///
/// 储位码
///
public string locationCode { get; set; }
///
/// 库存明细交易号
///
public string stockTransactionId { get; set; }
///
/// 物料编码
///
public string itemCode { get; set; }
///
/// 物料名称
///
public string itemName { get; set; }
///
/// 物料短描述
///
public string itemShortDesc { get; set; }
///
/// 库存数量
///
public string stockQuantity { get; set; }
///
/// 入库数量
///
public string inQuantity { get; set; }
///
/// 库存总价
///
public string totalPrice { get; set; }
///
/// 入库时间
///
public string stockInTime { get; set; }
///
/// 保管员
///
public string storeKeeper { get; set; }
///
/// 产线部门代码
///
public string lineCode { get; set; }
///
/// 送货单行号
///
public string deliveryItemNo { get; set; }
///
/// 供应商名称
///
public string supplierName { get; set; }
///
/// 库存责任人姓名
///
public string inventoryManager { get; set; }
///
/// 备用字段1
///
public string ext1 { get; set; }
///
/// 备用字段2
///
public string ext2 { get; set; }
///
/// 备用字段3
///
public string ext3 { get; set; }
///
/// 备用字段4
///
public string ext4 { get; set; }
///
/// 备用字段5
///
public string ext5 { get; set; }
}
///
/// 出库发料同步信息
///
public class OutboundDataSyncInfo {
///
/// 发料记录明细列表
///
public List materialIssues { get; set; }
///
/// 总记录数
///
public string totalRecords { get; set; }
///
/// 数据生成时间戳
///
public string timestamp { get; set; }
}
///
/// 发料记录明细信息
///
public class MaterialIssue {
///
/// 储位码
///
public string locationCode { get; set; }
///
/// 领用单号
///
public string withdrawalOrderNo { get; set; }
///
/// 物料编码
///
public string itemCode { get; set; }
///
/// 物料名称
///
public string itemName { get; set; }
///
/// 物料短描述
///
public string itemShortDesc { get; set; }
///
/// 实发数量
///
public string actualIssuedQty { get; set; }
///
/// 实发金额
///
public string issuedAmount { get; set; }
///
/// 供应商名称
///
public string supplierName { get; set; }
///
/// 实发人
///
public string issuer { get; set; }
///
/// 发料日期
///
public string issueDate { get; set; }
///
/// 保管员
///
public string storeKeeper { get; set; }
///
/// 产线部门代码
///
public string lineCode { get; set; }
///
/// 批次
///
public string batchNo { get; set; }
///
/// 备用字段1
///
public string ext1 { get; set; }
///
/// 备用字段2
///
public string ext2 { get; set; }
///
/// 备用字段3
///
public string ext3 { get; set; }
///
/// 备用字段4
///
public string ext4 { get; set; }
///
/// 备用字段5
///
public string ext5 { get; set; }
}
public class KanbanAgvState {
public string AgvState { get; set; }
}
}
}