using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; namespace HH.WCS.Mobox3.DSZSH.api { public class ApiModel { /// /// Mobox 接口返回数据类 /// public class SimpleResult { public int resultCode { get; set; } public string resultMsg { get; set; } public List result { get; set; } = new List(); } /// /// 构建 返回值 /// /// /// /// public static SimpleResult NewSimpleResult(int code, string message) { return new SimpleResult { resultCode = code, resultMsg = message }; } /// /// HostToAGV 上报任务状态 /// public class AgvTaskState { /// /// AGV 回报状态号 /// public int state { get; set; } /// /// 任务号 /// public string task_no { get; set; } /// /// AGV 车号 /// 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; } } /// /// 返回给 HostToAgv /// public class ReturnResult { public int ResultCode { get; set; } public string ResultMsg { get; set; } } public static ReturnResult NewReturnResult(int code, string message) { return new ReturnResult { ResultCode = code, ResultMsg = message }; } public class orderStatusReportParme { /// /// 订单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; } /// /// 订单的截至时间 /// public string deadLine { get; set; } /// /// 订单的创建时间 /// public string createdTime { get; set; } /// /// 额外信息1 /// public string extraInfo1 { get; set; } /// /// 额外信息2 /// public string extraInfo2 { get; set; } } /// /// 返回给GZ /// public class GzResult { public int resultCode { get; set; } public string msg { get; set; } public int orderID { get; set; } } } public class OtherModel { /// /// 好运箱-满箱下线入库(PDA)数据类 /// public class GoodpackOfflineInfo { /// /// 物料编码 /// [JsonProperty("s_item_code")] public string ItemCode { get; set; } /// /// 批次号 /// [JsonProperty("s_batch")] public string BatchNo { get; set; } /// /// 物料规格 /// [JsonProperty("s_spec")] public string Spec { get; set; } /// /// 数量 /// [JsonProperty("n_num")] public int Num { get; set; } /// /// 起点货位信息(起点货位货区要求:MXCZQ 满箱操作区) /// [JsonProperty("s_start_loc")] public string StartLoc { get; set; } } /// /// 空托/空箱入库(PDA)数据类 /// public class EmptyInboundInfo { /// /// 容器编码 /// [JsonProperty("cntr_code")] public string CntrCode { get; set; } /// /// 容器类型(必须为 '空托盘’ 或 ‘空好运箱') /// [JsonProperty("cntr_type")] public string CntrType { get; set; } /// /// 终点库区编码(托盘是 KTCFQ 空托存放区;好运箱是 CXHJQ 空箱货架区) /// [JsonProperty("end_area")] public string EndArea { get; set; } /// /// 起点货位(托盘是 KTJBQ 空托入库接驳区;好运箱是 KXJBQ 空箱入库接驳区) /// [JsonProperty("start_loc")] public string StartLoc { get; set; } } /// /// 空托上线信息 /// public class EmptyOnlinePalletInfo { /// /// 物料编码 /// [JsonProperty("item_code")] public string ItemCode { get; set; } /// /// 批次号 /// [JsonProperty("batch_no")] public string BatchNo { get; set; } /// /// 物料规格 /// [JsonProperty("spe")] public string Spec { get; set; } /// /// 容器号 /// [JsonProperty("cnt_id")] public string CntId { get; set; } // 容器类型 = 托盘 } /// /// 空好运箱上线信息 /// public class EmptyOnlineGoodpackInfo { /// /// 容器号 /// [JsonProperty("cnt_id")] public string CntId { get; set; } // 容器类型 = 好运箱 } /// /// 抽检-合格回库(PDA) 数据类 /// public class QualifiedBackInfo { /// /// 物料编码 /// [JsonProperty("item_code")] public string ItemCode { get; set; } /// /// 容器编码 /// [JsonProperty("cntr_code")] public string CntrCode { get; set; } } /// /// 不合格移库数据类 /// public class UnqualifiedShiftInfo { /// /// 物料编码 /// [JsonProperty("item_code")] public string ItemCode { get; set; } /// /// 容器编码 /// [JsonProperty("cntr_code")] public string CntrCode { get; set; } /// /// 不合格移库终点库区(必须是 CJYCQ 抽检异常区) /// [JsonProperty("end_area")] public string EndArea { get; set; } } /// /// 成品胶出库(PDA) /// public class FinishedOutboundInfo { /// /// 物料编码 /// [JsonProperty("item_code")] public string ItemCode { get; set; } /// /// 物料规格 /// [JsonProperty("spe")] public string Spe { get; set; } /// /// 批次号 /// [JsonProperty("batch_no")] public string BatchNo { get; set; } /// /// 需出库数量 /// [JsonProperty("qty")] public int Qty { get; set; } /// /// 容器类型 /// [JsonProperty("cntr_type")] public string CntrType { get; set; } /// /// 出库终点货区 /// [JsonProperty("end_area")] public string EndArea { get; set; } /// /// 是否强制出库 /// [JsonProperty("force_out")] public bool ForcedOut { get; set; } } /// /// 余料尾箱回库(PDA)数据类 /// public class RestBackInfo { /// /// 起点货位 /// [JsonProperty("start_loc")] public string StartLoc { get; set; } } /// /// 物料信息下发同步 数据类 /// public class CgInfoSyncInfo { /// /// 物料名称 /// [JsonProperty("itemName")] public string ItemName { get; set; } /// /// 物料编码 /// [JsonProperty("itemCode")] public string ItemCode { get; set; } /// /// 批次号 /// [JsonProperty("batchNo")] public string BatchNo { get; set; } /// /// 执行标准 /// [JsonProperty("standard")] public string Standard { get; set; } /// /// 净含量 /// [JsonProperty("netWeight")] public string NetWeight { get; set; } /// /// 质量等级 /// [JsonProperty("qualityGrade")] public string QualityGrade { get; set; } /// /// 料箱编号(待定) /// [JsonProperty("cntrCode")] public string CntrCode { get; set; } /// /// 物料数量(待定) /// [JsonProperty("itemNum")] public int ItemNum { get; set; } ///// ///// 产线号(待定,好运箱有2条产线,对应2个下线货位,这里暂定为:3和4) ///// //[JsonProperty("prodLineId")] //public string ProdLineId { get; set; } } /// /// MES API 响应结果类 /// public class MesResult { /// /// 接口调用结果 1-成功 0-失败 /// [JsonProperty("result")] public int Result { get; set; } /// /// 是否成功 True-成功,False:失败 /// [JsonProperty("success")] public bool Success { get; set; } /// /// 这里是string类型,对结果的描述 /// [JsonProperty("data")] public string Data { get; set; } } /// /// 仅当 Code = 0 表示成功 /// /// /// /// /// public static MesResult NewMesResult(int code, string message = "", bool printLog = true) { return new MesResult { Result = code, Success = code == 0, // 仅当code=0时,success=true Data = message, }; } /// /// 反馈 ERP 的数据类型 /// public class ErpResult { [JsonProperty("code")] public int Code { get; set; } [JsonProperty("message")] public string Message { get; set; } } public static ErpResult NewErpResult(int code, string message) { return new ErpResult { Code = code, Message = message }; } /// /// ERP 下发出库任务的数据类型 /// public class ErpSendOutboundPlanInfo { /// /// 计划单号(唯一标识) /// public string jhdh { get; set; } = string.Empty; /// /// 出库状态 /// public string ckzt { get; set; } = string.Empty;// 需要返回 /// /// 计划类别 /// public string jhlb { get; set; } = string.Empty; /// /// 参考单号 /// public string ckdh { get; set; } = string.Empty; /// /// 车牌号 /// public string cph { get; set; } = string.Empty; /// /// 运输方式 /// public string ysfs { get; set; } = string.Empty; /// /// 产品状态 /// public string cpzt { get; set; } = string.Empty; /// /// 买断单位 /// public string mddw { get; set; } = string.Empty; /// /// 产品代码 /// public string cpdm { get; set; } = string.Empty; /// /// 产品类别 /// public string cplb { get; set; } = string.Empty; /// /// 产品类别明细 /// public string cplbmx { get; set; } = string.Empty; /// /// 品牌 /// public string pp { get; set; } = string.Empty; /// /// 等级 /// public string dj { get; set; } = string.Empty;// 需要返回 /// /// 罐号 /// public string gh { get; set; } = string.Empty; /// /// 批号 /// public string ph { get; set; } = string.Empty;// 需要返回 /// /// 包装类型 /// public string bzlx { get; set; } = string.Empty; /// /// 派装单号 /// public string pzdh { get; set; } = string.Empty; /// /// 派装单单位 /// public string pzd_dw { get; set; } = string.Empty; /// /// 派装单调运编号 /// public string pzd_dybh { get; set; } = string.Empty; /// /// 派装件数 /// public double pzjs { get; set; } = 0; /// /// 派装数量 /// public decimal pzsl { get; set; } = 0; /// /// 派装日期(yyyy-mm-dd) /// public string pz_rq { get; set; } = string.Empty; /// /// 派装操作日期 /// public long pz_czrq { get; set; } = 0; /// /// 派装作废标记 /// public int pz_zfbj { get; set; } = 0; /// /// 派装作废日期 /// public long pz_zfrq { get; set; } = 0; /// /// 派装备注 /// public string pz_bz { get; set; } = string.Empty; /// /// 出库单编号 /// public string ckdbh { get; set; } = string.Empty; /// /// 实发件数 /// public double sfjs { get; set; } = 0; // 需要返回 /// /// 实发数量 /// public decimal sfsl { get; set; } = 0; // 需要返回 /// /// 实发车数 /// public int sfcs { get; set; } = 0; // 需要返回 /// /// 装车时间 /// public string zcsj { get; set; } = string.Empty; // 需要返回 /// /// 计量单位 /// public string jldw { get; set; } = string.Empty;// 需要返回 /// /// 发货日期 /// public long fhrq { get; set; } = 0; // 需要返回 /// /// 仓库代码 /// public string ckdm { get; set; } = string.Empty; // 需要返回 /// /// 发货人 /// public string fhr { get; set; } = string.Empty; // 需要返回 /// /// 操作员 /// public string czydm { get; set; } = string.Empty; // 需要返回 /// /// 审核人 /// public string shr_username { get; set; } = string.Empty; /// /// 审核日期 /// public long shrq { get; set; } = 0; /// /// 作废标记 /// public long zfbj { get; set; } = 0; /// /// 作废日期 /// public long zfrq { get; set; } = 0; /// /// 结算单位 /// public string jsdw { get; set; } = string.Empty; /// /// 收货单位 /// public string shdw { get; set; } = string.Empty; /// /// 运输单位 /// public string ysdw { get; set; } = string.Empty; /// /// 联系人 /// public string lxr { get; set; } = string.Empty; /// /// 装卸工 /// public string ry_zxg { get; set; } = string.Empty; // 需要返回 /// /// 叉车司机 /// public string ry_ccsj { get; set; } = string.Empty; // 需要返回 /// /// erp交货单号 /// public string erphx_jhdh { get; set; } = string.Empty; /// /// erp物料编码 /// public string erphx_wlbm { get; set; } = string.Empty; /// /// erp物料名称 /// public string erphx_wlmc { get; set; } = string.Empty; /// /// erp创建日期 /// public string erphx_cjrq { get; set; } = string.Empty; /// /// 货位 /// public string hw { get; set; } = string.Empty; // 需要返回 /// /// 货位状态 /// public string hwzt { get; set; } = string.Empty; // 需要返回 } public class PickUpReturnErpInfo { /// /// 计划单号(唯一标识) /// public string jhdh { get; set; } /// /// 出库状态 /// public string ckzt { get; set; } // 需要返回 /// /// 计划类别 /// public string jhlb { get; set; } /// /// 参考单号 /// public string ckdh { get; set; } /// /// 车牌号 /// public string cph { get; set; } /// /// 运输方式 /// public string ysfs { get; set; } /// /// 产品状态 /// public string cpzt { get; set; } /// /// 买断单位 /// public string mddw { get; set; } /// /// 产品代码 /// public string cpdm { get; set; } /// /// 产品类别 /// public string cplb { get; set; } /// /// 产品类别明细 /// public string cplbmx { get; set; } /// /// 品牌 /// public string pp { get; set; } /// /// 等级 /// public string dj { get; set; } // 需要返回 /// /// 罐号 /// public string gh { get; set; } /// /// 批号 /// public string ph { get; set; } // 需要返回 /// /// 包装类型 /// public string bzlx { get; set; } /// /// 派装单号 /// public string pzdh { get; set; } /// /// 派装单单位 /// public string pzd_dw { get; set; } /// /// 派装单调运编号 /// public string pzd_dybh { get; set; } /// /// 派装件数 /// public double pzjs { get; set; } /// /// 派装数量 /// public decimal pzsl { get; set; } /// /// 派装日期(yyyy-mm-dd) /// public string pz_rq { get; set; } /// /// 派装操作日期 /// public long pz_czrq { get; set; } /// /// 派装作废标记 /// public int pz_zfbj { get; set; } /// /// 派装作废日期 /// public long pz_zfrq { get; set; } /// /// 派装备注 /// public string pz_bz { get; set; } /// /// 出库单编号 /// public string ckdbh { get; set; } /// /// 实发件数 /// public double sfjs { get; set; } // 需要返回 /// /// 实发数量 /// public decimal sfsl { get; set; } // 需要返回 ///// ///// 实发车数 ///// //public int sfcs { get; set; } // 需要返回 ///// ///// 装车时间 ///// //public string zcsj { get; set; } // 需要返回 ///// ///// 计量单位 ///// //public string jldw { get; set; } // 需要返回 ///// ///// 发货日期 ///// //public long fhrq { get; set; } // 需要返回 ///// ///// 仓库代码 ///// //public string ckdm { get; set; } // 需要返回 ///// ///// 发货人 ///// //public string fhr { get; set; } // 需要返回 ///// ///// 操作员 ///// //public string czydm { get; set; } // 需要返回 /// /// 审核人 /// public string shr_username { get; set; } /// /// 审核日期 /// public long shrq { get; set; } /// /// 作废标记 /// public long zfbj { get; set; } /// /// 作废日期 /// public long zfrq { get; set; } /// /// 结算单位 /// public string jsdw { get; set; } /// /// 收货单位 /// public string shdw { get; set; } /// /// 运输单位 /// public string ysdw { get; set; } /// /// 联系人 /// public string lxr { get; set; } ///// ///// 装卸工 ///// //public string ry_zxg { get; set; } // 需要返回 ///// ///// 叉车司机 ///// //public string ry_ccsj { get; set; } // 需要返回 /// /// erp交货单号 /// public string erphx_jhdh { get; set; } /// /// erp物料编码 /// public string erphx_wlbm { get; set; } /// /// erp物料名称 /// public string erphx_wlmc { get; set; } /// /// erp创建日期 /// public string erphx_cjrq { get; set; } /// /// 货位 /// public string hw { get; set; } // 需要返回 /// /// 货位状态 /// public string hwzt { get; set; } // 需要返回 } public class CreateTaskReturnErpInfo { /// /// 计划单号(唯一标识) /// public string jhdh { get; set; } /// /// 出库状态 /// public string ckzt { get; set; } // 需要返回 /// /// 计划类别 /// public string jhlb { get; set; } /// /// 参考单号 /// public string ckdh { get; set; } /// /// 车牌号 /// public string cph { get; set; } /// /// 运输方式 /// public string ysfs { get; set; } /// /// 产品状态 /// public string cpzt { get; set; } /// /// 买断单位 /// public string mddw { get; set; } /// /// 产品代码 /// public string cpdm { get; set; } /// /// 产品类别 /// public string cplb { get; set; } /// /// 产品类别明细 /// public string cplbmx { get; set; } /// /// 品牌 /// public string pp { get; set; } /// /// 等级 /// public string dj { get; set; } // 需要返回 /// /// 罐号 /// public string gh { get; set; } /// /// 批号 /// public string ph { get; set; } // 需要返回 /// /// 包装类型 /// public string bzlx { get; set; } /// /// 派装单号 /// public string pzdh { get; set; } /// /// 派装单单位 /// public string pzd_dw { get; set; } /// /// 派装单调运编号 /// public string pzd_dybh { get; set; } /// /// 派装件数 /// public double pzjs { get; set; } /// /// 派装数量 /// public decimal pzsl { get; set; } /// /// 派装日期(yyyy-mm-dd) /// public string pz_rq { get; set; } /// /// 派装操作日期 /// public long pz_czrq { get; set; } /// /// 派装作废标记 /// public int pz_zfbj { get; set; } /// /// 派装作废日期 /// public long pz_zfrq { get; set; } /// /// 派装备注 /// public string pz_bz { get; set; } /// /// 出库单编号 /// public string ckdbh { get; set; } ///// ///// 实发件数 ///// //public double sfjs { get; set; } // 需要返回 ///// ///// 实发数量 ///// //public decimal sfsl { get; set; } // 需要返回 ///// ///// 实发车数 ///// //public int sfcs { get; set; } // 需要返回 ///// ///// 装车时间 ///// //public string zcsj { get; set; } // 需要返回 ///// ///// 计量单位 ///// //public string jldw { get; set; } // 需要返回 ///// ///// 发货日期 ///// //public long fhrq { get; set; } // 需要返回 ///// ///// 仓库代码 ///// //public string ckdm { get; set; } // 需要返回 ///// ///// 发货人 ///// //public string fhr { get; set; } // 需要返回 ///// ///// 操作员 ///// //public string czydm { get; set; } // 需要返回 /// /// 审核人 /// public string shr_username { get; set; } /// /// 审核日期 /// public long shrq { get; set; } /// /// 作废标记 /// public long zfbj { get; set; } /// /// 作废日期 /// public long zfrq { get; set; } /// /// 结算单位 /// public string jsdw { get; set; } /// /// 收货单位 /// public string shdw { get; set; } /// /// 运输单位 /// public string ysdw { get; set; } /// /// 联系人 /// public string lxr { get; set; } ///// ///// 装卸工 ///// //public string ry_zxg { get; set; } // 需要返回 ///// ///// 叉车司机 ///// //public string ry_ccsj { get; set; } // 需要返回 /// /// erp交货单号 /// public string erphx_jhdh { get; set; } /// /// erp物料编码 /// public string erphx_wlbm { get; set; } /// /// erp物料名称 /// public string erphx_wlmc { get; set; } /// /// erp创建日期 /// public string erphx_cjrq { get; set; } /// /// 货位 /// public string hw { get; set; } // 需要返回 /// /// 货位状态 /// public string hwzt { get; set; } // 需要返回 } } }