using Hanhe.iWCS.Business; using Hanhe.iWCS.Common; using Hanhe.iWCS.MData; using MongoDB.Bson; using MongoDB.Driver; using MongoDB.Driver.Builders; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Timers; using static Hanhe.iWCS.JingmenGEMTwoProtocol.MESHelper; using static Hanhe.iWCS.JingmenGEMTwoProtocol.PLCControl; using static Hanhe.iWCS.JingmenGEMTwoProtocol.ProcessHelper; using static Hanhe.iWCS.JingmenGEMTwoProtocol.ProtocolAnalysis; using static System.Runtime.CompilerServices.RuntimeHelpers; namespace Hanhe.iWCS.JingmenGEMTwoProtocol { /// /// ams接口辅助类 /// public class ApiHelper { private static ICallTaskProcessing callTaskProcessing = new ICallTaskProcessing(); static ApiHelper() { } internal static SimpleResult SendTask(AddTaskModel model) { SimpleResult result = new SimpleResult(); if (model.taskType == 1) { //PLan A.当WMS调AMS生成空托出库任务时,直接拦截存入中间表,待到线程循环读取推送电梯一段任务时,优先推送 //MongoDBSingleton.Instance.Insert(new ElevatorTask { taskNo = DateTime.Now.ToString(), wmsTaskNo = DateTime.Now.ToString(), startBit = model.startBit, endBit = PLCControl.DeviceBit8(), wmsEndBit = model.endBit, startFloor = 1, endFloor = 3, sendFlag = 0, create = DateTime.Now.ToString() }); //Plan B.当WMS调AMS生成空托出库任务时,接受并创建空托出库任务,待到任务推送时,根据任务类型进行拦截 var r = AMSHelper.CreateTask(DateTime.Now.ToString(), model.startBit, model.endBit, "空托出库", 1); result.success = r.success; } else if (model.taskType == 2) { //1楼成品货架区到1楼出库缓存位 --此任务需要添加虚拟终点,根据1楼出库缓存位的广电信号来分配AGV一个终点(四个点位,空的则可以入) //WMS不需要传输终点,终点由AMS根据光电PLC信号,判断哪个信号是空的,再通知AGV终点,在此之前先使用虚拟终点 var r = AMSHelper.CreateTask(DateTime.Now.ToString(), model.startBit, model.endBit, "3楼成品出库", 1); result.success = r.success; } else if (model.taskType == 3) { //PDA:1楼空托线边区到1楼成品空托位 ——应该有起点和终点位,直接推送——需反馈WMS任务状态 var r = AMSHelper.CreateTask(DateTime.Now.ToString(), model.startBit, model.endBit, "空托线边", 1); result.success = r.success; } return result; } public class AddTaskModel { /// /// 任务起点 /// public string startBit { get; set; } /// /// 任务终点 /// public string endBit { get; set; } /// /// 任务类别 1.1楼成品空托区到3楼补给成品空托区 /// 2.1楼成品货架区到1楼出库缓存位 /// 3.PDA:1楼空托线边区到1楼成品空托位 /// public int taskType { get; set; } } public class SimpleResult { public bool success { get; set; } public int errCode { get; set; } public string errMsg { get; set; } } #region NG任务设备状态 internal static SimpleResult NgTask(NgTaskModel model) { SimpleResult result = new SimpleResult(); if (model.fcBit == 0) { var setus = MongoDBSingleton.Instance.FindOne(Query.EQ("bzBit", model.bzBit), "NgTaskModel"); if (setus == null) { MongoDBSingleton.Instance.Insert(new NgTaskModel { fcBit = model.fcBit, fcSetus = model.fcSetus, bzBit = model.bzBit, bzSetus = model.bzSetus }); } else { var updateBuider = Update.Set("fcBit", model.fcBit).Set("fcSetus", model.fcSetus).Set("bzBit", model.bzBit).Set("bzSetus", model.bzSetus); MongoDBSingleton.Instance.Update(Query.EQ("bzBit", model.bzBit), updateBuider, UpdateFlags.None); } } else { var setus = MongoDBSingleton.Instance.FindOne(Query.EQ("fcBit", model.fcBit), "NgTaskModel"); if (setus == null) { //SecondWeighState MongoDBSingleton.Instance.Insert(new NgTaskModel { fcBit = model.fcBit, fcSetus = model.fcSetus, bzBit = model.bzBit, bzSetus = model.bzSetus }); MongoDBSingleton.Instance.Update(Query.EQ("location", GetSecondWeighBit()), Update.Set("ng", 2), UpdateFlags.None); } else { var updateBuider = Update.Set("fcBit", model.fcBit).Set("fcSetus", model.fcSetus).Set("bzBit", model.bzBit).Set("bzSetus", model.bzSetus); MongoDBSingleton.Instance.Update(Query.EQ("fcBit", model.fcBit), updateBuider, UpdateFlags.None); MongoDBSingleton.Instance.Update(Query.EQ("location", GetSecondWeighBit()), Update.Set("ng", model.fcSetus), UpdateFlags.None); } } return result; } public class NgTaskModel { /// /// 默认情况下全都都传0 /// public ObjectId _id { get; set; } /// /// 复称平台点位 复称平台有问题,就传值1 /// public int fcBit { get; set; } /// /// 复称平台状态 复称平台有问题的情况下,传值2 /// public int fcSetus { get; set; } /// /// 包装点位 包装机有问题,传包装机数字编号,例如1~9 /// public int bzBit { get; set; } /// /// 包装状态 包装机有问题的情况下,传值2 /// public int bzSetus { get; set; } } #endregion #region MES接口模拟测试 internal static MESData MESTest(MESSendData model) { MESData result = new MESData(); var mesRequst = MongoDBSingleton.Instance.FindOne(Query.EQ("machineNo", model.machineNo), "MESReSult"); if (mesRequst != null) { result.machineNo = mesRequst.machineNo; result.lotNo = mesRequst.lotNo; result.bagNo = mesRequst.bagNo; result.productType = mesRequst.productType; result.materialCode = mesRequst.materialCode; result.overlappingLayers = mesRequst.overlappingLayers; } else { MongoDBSingleton.Instance.Insert(new MESReSult { machineNo = "T1" }); } return result; } public class MESSendData { /// /// 包装机号 /// public string machineNo { get; set; } } public class MESTaskData { /// /// 包装补空点 /// public string emptyPoint { get; set; } } public class MESReSult { public ObjectId _id { get; set; } /// /// mes返回的包装机号(T1,T2,......,T9) /// public string machineNo { get; set; } /// /// mes返回的成品批次号 /// public string lotNo { get; set; } /// /// mes返回的袋号 /// public string bagNo { get; set; } /// /// mes返回的产品型号 /// public string productType { get; set; } /// /// mes返回的物料编码 /// public string materialCode { get; set; } /// /// mes返回的叠包层数 (例1,2,3:1代表不叠包,2代表叠2层,3代表叠3层) /// public string overlappingLayers { get; set; } } public class MESData { /// /// mes返回的包装机号(T1,T2,......,T9) /// public string machineNo { get; set; } /// /// mes返回的成品批次号 /// public string lotNo { get; set; } /// /// mes返回的袋号 /// public string bagNo { get; set; } /// /// mes返回的产品型号 /// public string productType { get; set; } /// /// mes返回的物料编码 /// public string materialCode { get; set; } /// /// mes返回的叠包层数 (例1,2,3:1代表不叠包,2代表叠2层,3代表叠3层) /// public string overlappingLayers { get; set; } } #endregion #region Json数据写入写出中间表测试 public static int[] machinedown = new int[16]; internal static JsonData Json(JsonData model) { JsonData result = new JsonData(); for (int i = 0; i <= 15; i++) { machinedown[i] = i; } var json = JsonConvert.SerializeObject(machinedown); //Console.WriteLine("json数据" + json); var jsonMachine = MongoDBSingleton.Instance.FindOne(Query.EQ("order", model.order), "JsonDataMod"); var arr = JsonConvert.DeserializeObject(jsonMachine.jsonOne); //Console.WriteLine("var数据" + arr); if (jsonMachine != null) { result.jsonOne = jsonMachine.jsonOne; result.jsonTwo = jsonMachine.jsonTwo; result.jsonThree = jsonMachine.jsonThree; } else { MongoDBSingleton.Instance.Insert(new JsonDataMod { order = model.order, jsonOne = json }); } var arr1 = JsonConvert.DeserializeObject>(jsonMachine.jsonOne); //Console.WriteLine("数组数据:" + arr1); for (int i = 0; i <= 15; i++) { //Console.WriteLine($"循环打印数组单个数据{arr1[i]}"); } return result; } public class JsonData { public int order { get; set; } public string jsonOne { get; set; } public JsonConverter jsonTwo { get; set; } public JsonData jsonThree { get; set; } } public class JsonDataMod { public ObjectId _id { get; set; } public int order { get; set; } public string jsonOne { get; set; } public JsonConverter jsonTwo { get; set; } public JsonData jsonThree { get; set; } } #endregion public class AgvStateModel { /// /// X坐标 /// public int XCoordinates { get; set; } /// /// Y坐标 /// public string YCoordinates { get; set; } /// /// 方向 /// public int direction { get; set; } } public class bzxxModel { public string machineNo { get; set; } public string mesCode { get; set; } } #region 教称流程,人工PDA返回复称平台,包装机复称信息 internal static SimpleResult SecondResult(secondResultCache model) { SimpleResult result = new SimpleResult(); var weigh = MongoDBSingleton.Instance.FindOne(Query.EQ("Bit", model.Bit), "secondResult"); if (weigh != null) { MongoDBSingleton.Instance.Update(Query.EQ("Bit", model.Bit), Update.Set("Bit", model.Bit).Set("Status", model.Status), UpdateFlags.None); result.success = true; CMMLog.Info($"返回状态接口调用成功,当前点位:{model.Bit},点位状态:{model.Status}"); //Console.WriteLine($"返回状态接口调用成功,当前点位:{model.Bit},点位状态:{model.Status}"); } else { MongoDBSingleton.Instance.Insert(new secondResult { Bit = model.Bit, Status = model.Status }); result.success = true; CMMLog.Info($"返回状态接口调用成功,当前点位:{model.Bit},点位状态:{model.Status}"); //Console.WriteLine($"返回状态接口调用成功,当前点位:{model.Bit},点位状态:{model.Status}"); } if(model.Bit == GetSecondWeighBit()) { int i = model.Status == "OK" ? 1 : 2; MongoDBSingleton.Instance.Update(Query.EQ("location", GetSecondWeighBit()), Update.Set("secondNg", i)); } return result; } internal static SimpleResult AgvState(AgvStateModel model) { SimpleResult result = new SimpleResult(); return result; } /// /// AGV状态处理 /// /// internal static void AGVDeviceReceiveSet(AgvDeviceStatus a) { if (!string.IsNullOrEmpty(a.forkliftNo)) { var agvStateInfo = MongoDBSingleton.Instance.FindOne(Query.EQ("forkliftNo", a.forkliftNo), "AGV_STATE"); if (agvStateInfo != null) { if (string.IsNullOrEmpty(a.xPos)) a.xPos = "0"; if (string.IsNullOrEmpty(a.yPos)) a.yPos = "0"; if(agvStateInfo.xPos != a.xPos || agvStateInfo.yPos != a.yPos || agvStateInfo.errCode != a.errCode || agvStateInfo.errCode2 != a.errCode2 || agvStateInfo.faildCode != a.faildCode || agvStateInfo.Degree != a.Degree) { var query1 = Query.EQ("forkliftNo", a.forkliftNo); UpdateBuilder updateBuider = Update.Set("forkliftNo", a.forkliftNo). Set("errCode", a.errCode).Set("errCode2", a.errCode2). Set("faildCode", a.faildCode).Set("xPos", a.xPos). Set("yPos", a.yPos).Set("battery", a.battery).Set("goods_visible", a.goods_visible). Set("Degree", a.Degree); MongoDBSingleton.Instance.Update(query1, updateBuider, UpdateFlags.None); writeAGVInfo(a.forkliftNo); } } else { MongoDBSingleton.Instance.Insert(new AGV_STATE { forkliftNo = a.forkliftNo, errCode = a.errCode, errCode2 = a.errCode2, faildCode = a.faildCode, xPos = a.xPos, yPos = a.yPos, battery = a.battery, goods_visible = a.goods_visible, Degree = a.Degree }); writeAGVInfo(a.forkliftNo); } } } internal static ErrInfoResult getErrInfo(string factory) { ErrInfoResult result = new ErrInfoResult() { sucess = false }; try { if (factory.Contains("sanyuan")) { var errList = MongoDBSingleton.Instance.FindAll("errInfoTable"); if (errList.Count > 0) { result.sucess = true; result.errInfo = new List(); errList.ForEach(r => { result.errInfo.Add(new errInfo { taskName = r.taskName, errMsg = r.errMsg, time = r.dateTime }); }); } } else { } } catch(Exception ex) { CMMLog.Info("getErrInfo err:"+ex.Message); } return result; } internal static ZZTPWNumResult ZZTPWNum(string factory) { ZZTPWNumResult result = new ZZTPWNumResult() { sucess = false }; if(factory.Contains("sanyuan")) { var bzEmpInfo = MongoDBSingleton.Instance.FindAll("BZEmptyPoint"); if (bzEmpInfo.Count > 0) { result.sucess = true; result.zztpwInfo = new List(); bzEmpInfo.ForEach(r => { result.zztpwInfo.Add(new zztpwInfo { S_LOC_CODE = r.Bit, N_QTY = r.Quantity }); }); } } else { } return result; } internal static BZXXResult Bzxx(bzxxModel models) { BZXXResult result = new BZXXResult() {success = false }; if(models != null && !string.IsNullOrEmpty(models.mesCode)) { //通过mesCode获取mes的物料信息 var res = helper.WebGet(Settings.MESUrl2 + "?mesCode=" + models.mesCode); CMMLog.Info($"Bzxx ReqMsg:{JsonConvert.SerializeObject(res)},url:{Settings.MESUrl2}"); try { if (!string.IsNullOrEmpty(res)) { var req = JsonConvert.DeserializeObject(res); if(req != null) { var timeCuo = MongoDBSingleton.Instance.FindOne(Query.EQ("packingMachineNumber", models.machineNo), "TimeCuoInfoCom"); if (timeCuo == null) { MongoDBSingleton.Instance.Insert(new TimeCuoInfoCom { isFold = 1, packingMachineNumber = models.machineNo, needWeight = (int)req.data.FMustQty, realWeight = (int)req.data.FMustQty, totalWeight = (int)req.data.FMustQty, batchNumber = req.data.Flot, productModel = req.data.materialSpec, bagNumber_1 = req.data.bagNum, totalCount = 1, timeStamp = req.data.mesCode, photoURL = req.data.barCode, ProductionDate = req.data.ywDate, // ERP变更-照相机新增字段 materialCode = req.data.FMaterialNumber, materialName = req.data.materialName, measurementUnit = req.data.FUnit, createOrganization = req.data.FPrdOrgNumber, WarehouseCode = req.data.FStockNumber, workshopCode = req.data.FWorkShopNumber, BusinessDate = req.data.ywDate, barcode = req.data.barCode, employeeID1 = req.data.jycjj, //变更注释 totalNeedWeight = (int)req.data.FMustQty, FEntryID_1 = 0, }); } else { var query = Query.EQ("packingMachineNumber", models.machineNo); //变更注释 UpdateBuilder update = Update.Set("isFold", 1).Set("packingMachineNumber",models.machineNo).Set("needWeight", (int)req.data.FMustQty) .Set("realWeight", (int)req.data.FMustQty).Set("totalWeight", (int)req.data.FMustQty).Set("batchNumber", req.data.Flot) .Set("productModel", req.data.materialSpec).Set("bagNumber_1", req.data.bagNum).Set("totalCount", 1).Set("timeStamp", req.data.mesCode) .Set("photoURL", req.data.barCode).Set("ProductionDate", req.data.ywDate).Set("materialCode", req.data.FMaterialNumber) .Set("materialName", req.data.materialName).Set("measurementUnit", req.data.FUnit) .Set("createOrganization", req.data.FPrdOrgNumber).Set("WarehouseCode", req.data.FStockNumber).Set("workshopCode", req.data.FWorkShopNumber) .Set("BusinessDate", req.data.ywDate).Set("barcode", req.data.barCode).Set("employeeID1", req.data.jycjj) .Set("totalNeedWeight", (int)req.data.FMustQty).Set("FEntryID_1", 0); MongoDBSingleton.Instance.Update(query, update, UpdateFlags.None); } //生成到接驳平台的任务 string traycode = DateTime.Now.ToString("yyyy-MM-dd").Replace("-", ""); string timeCuo2 = req.data.mesCode.ToString(); var CBInfo = Settings.GetConnectingbitsList().Where(a => a.enable == 1).ToList(); if (CBInfo != null) { AMSHelper.HHAmsExecuteResult amsResult = null; foreach (var a in CBInfo) { if (!string.IsNullOrEmpty(a.locCode)) { //在中间表中查找点位 var CBTable = MongoDBSingleton.Instance.FindOne(Query.EQ("Bit", a.locCode), "ConnectingBits"); if (CBTable != null) { if (string.IsNullOrEmpty(CBTable.trayCode)) { //生成任务,并且将点位写入中间表 amsResult = AMSHelper.CreateTask(DateTime.Now.Ticks.ToString(), models.machineNo, a.locCode, "PDA打包下线", 0, traycode); if (amsResult.success) { result.success = true; CMMLog.Debug($"PDA打包下线:AMS调用API成功!"); MongoDBSingleton.Instance.Update(Query.EQ("Bit", a.locCode), Update.Set("trayCode", traycode).Set("timeCuo", timeCuo2), UpdateFlags.None); //上报条码表 CMMLog.Info($" INSERT INTO T_JY_BARCODESync (FBarCode, FBarCodeRule,FMaterialNumber,FCreateOrgNumber,FLot,FUnit,FQty,FStockNumber,FDept,FBillDate,F_JY_CZZ,FOpStatus) VALUES ('{req.data.barCode}','01','{req.data.materialName}','02','{req.data.Flot}','{req.data.FUnit}','{req.data.FMustQty}','CK020','BM000161','{req.data.ywDate}','{req.data.jycjj}','0')"); new SqlHelper().ExecuteSql($" INSERT INTO T_JY_BARCODESync (FBarCode, FBarCodeRule,FMaterialNumber,FCreateOrgNumber,FLot,FUnit,FQty,FStockNumber,FDept,FBillDate,F_JY_CZZ,FOpStatus) VALUES ('{req.data.barCode}','01','{req.data.materialName}','02','{req.data.Flot}','{req.data.FUnit}','{req.data.FMustQty}','CK020','BM000161','{req.data.ywDate}','{req.data.jycjj}','0')", false); break; } else CMMLog.Debug($"PDA打包下线:AMS调用API失败,开始重新调用!"); } } else { //生成任务,并且将点位写入中间表 amsResult = AMSHelper.CreateTask(DateTime.Now.Ticks.ToString(), models.machineNo, a.locCode, "PDA打包下线", 0, traycode); if (amsResult.success) { result.success = true; CMMLog.Debug($"PDA打包下线:AMS调用API成功!"); //打包下线任务生成成功,向中间表插入数据 MongoDBSingleton.Instance.Insert(new ConnectingBits { Bit = a.locCode, trayCode = traycode, state = "0", timeCuo = timeCuo2 }); //上报条码表 CMMLog.Info($" INSERT INTO T_JY_BARCODESync (FBarCode, FBarCodeRule,FMaterialNumber,FCreateOrgNumber,FLot,FUnit,FQty,FStockNumber,FDept,FBillDate,F_JY_CZZ,FOpStatus) VALUES ('{req.data.barCode}','01','{req.data.materialName}','02','{req.data.Flot}','{req.data.FUnit}','{req.data.FMustQty}','CK020','BM000161','{req.data.ywDate}','{req.data.jycjj}','0')"); new SqlHelper().ExecuteSql($" INSERT INTO T_JY_BARCODESync (FBarCode, FBarCodeRule,FMaterialNumber,FCreateOrgNumber,FLot,FUnit,FQty,FStockNumber,FDept,FBillDate,F_JY_CZZ,FOpStatus) VALUES ('{req.data.barCode}','01','{req.data.materialName}','02','{req.data.Flot}','{req.data.FUnit}','{req.data.FMustQty}','CK020','BM000161','{req.data.ywDate}','{req.data.jycjj}','0')", false); break; } else CMMLog.Debug($"PDA打包下线:AMS调用API失败,开始重新调用!"); } } else CMMLog.Debug("打包下线口接驳位点位未配置"); } if(amsResult == null || amsResult.success == false) { result.errMsg = "任务生成失败,接驳位有任务占用"; } } else CMMLog.Debug("打包下线口接驳位未配置"); } else { result.errMsg = $"数据解析失败"; } } else { result.errMsg = $"查询mes信息失败,mesCode:{models.mesCode}"; } } catch(Exception ex) { result.errMsg = ex.Message; } } else { result.errMsg = "参数输入错误"; } return result; } /// /// 电钴车间包装下线获取wms传入的托盘 /// /// /// /// internal static SimpleResult DGPackingLineFull(string trayCode) { SimpleResult result = new SimpleResult() { success = false,errCode = -1 }; if (!string.IsNullOrEmpty(trayCode)){ var DGInfo = MongoDBSingleton.Instance.FindOne(Query.EQ("trayCode", trayCode), "DGPackingLineFullModel"); if (DGInfo == null) { MongoDBSingleton.Instance.Insert(new DGPackingLineFullModel() { trayCode = trayCode, createTime = DateTime.Now }, "DGPackingLineFullModel"); result.success = true; result.errCode = 0; } else { result.errMsg = $"当前托盘号,已存在于ams中间表中,托盘号:{trayCode}"; } } else { result.errMsg = $"当前托盘号为空"; } return result; } public class mesInfo { public int code { get; set; } public string msg { get; set; } public mesData data { get; set; } public bool isSucess { get; set; } } public class mesData { /// /// 入库组织 /// public string FStockOrgNumber { get; set;} /// /// 生产组织 /// public string FPrdOrgNumber { get; set; } /// /// 入库类型 /// public string FInStockType { get; set; } /// /// 仓库编码 /// public string FStockNumber { get; set; } /// /// 生产车间 /// public string FWorkShopNumber { get; set; } /// /// 库存状态 /// public string FStockStatus { get; set; } /// /// 单位 /// public string FUnit { get; set; } /// /// 物料编码 /// public string FMaterialNumber { get; set; } /// /// 物料名称 /// public string materialName { get; set; } /// /// 物料规格 /// public string materialSpec { get; set; } /// /// 批号 /// public string Flot { get; set; } /// /// 需求重量 /// public double FMustQty { get; set; } /// /// 退库时间 /// public string FProduceDate { get; set; } /// /// 唯一标识 /// public string FExpiryDate { get; set; } /// /// 唯一码 /// public int mesCode { get; set; } /// /// 完整条码 /// public string barCode { get; set; } /// /// 袋号 /// public string bagNum { get; set; } /// /// mes包号 /// public string bagCode { get; set; } /// /// 员工编码 /// public string jycjj { get; set; } /// /// 业务日期 /// public string ywDate { get; set; } } public class AGV_STATE { public ObjectId _id { get; set; } public string forkliftNo { get; set; } /// /// 停止状态码 /// public string errCode { get; set; } = ""; /// /// 停止状态码2 /// public string errCode2 { get; set; } = ""; /// /// 失败状态码 /// public string faildCode { get; set; } = ""; /// /// 车辆X坐标(CM) /// public string xPos { get; set; } = "0"; /// /// 车辆Y坐标(Y) /// public string yPos { get; set; } = "0"; /// /// 电池电量 /// public string battery { get; set; } = ""; public string detail { get; set; } /// /// 是否有货状态码 /// public string goods_visible { get; set; } = ""; /// /// 方向 /// public string Degree { get; set; } = ""; /// /// 小车状态 /// public int agvState { get; set; } /// /// 是否有货 /// public int haveItem { get; set; } } public class DGPackingLineFullModel { public ObjectId _id { get; set; } public string trayCode { get; set; } public DateTime createTime { get; set; } } public class secondResultCache { /// /// 教称点位 /// public string Bit { get; set; } /// /// 教称点位状态 /// public string Status { get; set; } } public class secondResult { public ObjectId _id { get; set; } /// /// 教称点位 /// public string Bit { get; set; } /// /// 教称点位状态 /// public string Status { get; set; } } public class ReturnResult { public int ResultCode { get; set; } public string ResultMsg { get; set; } } public class ErrInfoResult { public bool sucess { get; set; } public List errInfo { get; set; } } public class errInfo { public string taskName { get; set; } public string errMsg { get; set; } public DateTime time { get; set; } } public class ZZTPWNumResult { public bool sucess { get; set; } public List zztpwInfo { get; set; } } public class zztpwInfo { public string S_LOC_CODE { get; set; } public int N_QTY { get; set; } } public class BZXXResult { public bool success { get; set;} public string errMsg { get; set; } } /// /// hosttoagv上报车辆状态(参数在hosttoagv服务配置,可修改) /// public class AgvDeviceStatus { public string infoType { get; set; } public string inMapRoute { get; set; } //public string detail { get; set; } public string CumInfo { get; set; } public string forkliftNo { get; set; } /// /// 停止状态码 /// public string errCode { get; set; } = ""; /// /// 停止状态码2 /// public string errCode2 { get; set; } = ""; /// /// 失败状态码 /// public string faildCode { get; set; } = ""; /// /// 车辆X坐标(CM) /// public string xPos { get; set; } = ""; /// /// 车辆Y坐标(Y) /// public string yPos { get; set; } = ""; /// /// 电池电量 /// public string battery { get; set; } = ""; /// /// 是否有货状态码 /// public string goods_visible { get; set; } = ""; /// /// 方向 /// public string Degree { get; set; } = ""; } #endregion } }