From c2bb91a7d7aaf050235a85387363325f794bc44b Mon Sep 17 00:00:00 2001 From: taoye Date: Wed, 12 Oct 2022 17:05:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.AGV/AGVHelper.cs | 872 +++++++++--------- BPASmartClient.AGV/AGVLoadInteracteModel.cs | 4 +- BPASmartClient.AGV/AGVModel.cs | 4 +- BPASmartClient.AGV/AGVTaskCancelModel.cs | 4 +- .../AGVTaskCompleteNotifyModel.cs | 4 +- BPASmartClient.AGV/AGV_PointRollerJobData.cs | 4 +- BPASmartClient.AGV/AGV_SlotRollerJobData.cs | 4 +- BPASmartClient.AGV/HttpRequestHeaderModel.cs | 4 +- .../Pages/View/MainView.xaml.cs | 2 +- .../App.config | 5 +- FryPot_DosingSystem/Control/DeviceOperate.cs | 210 +++-- .../Control/DosingLogicControl.cs | 36 +- 12 files changed, 610 insertions(+), 543 deletions(-) rename {BPASmartClient.AGV => FryPot_DosingSystem}/App.config (77%) diff --git a/BPASmartClient.AGV/AGVHelper.cs b/BPASmartClient.AGV/AGVHelper.cs index 29a8c7ce..5d030a3b 100644 --- a/BPASmartClient.AGV/AGVHelper.cs +++ b/BPASmartClient.AGV/AGVHelper.cs @@ -17,28 +17,15 @@ namespace BPASmartClient.AGV public static AGVHelper _Instance { get; set; } public static AGVHelper GetInstance => _Instance ?? (_Instance = new AGVHelper()); + Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + //根据Key读取元素的Value + // string name = config.AppSettings.Settings["name"].Value; + public AGVHelper() { } - /// - /// 获取配置文件信息 - /// - /// - /// - public string GetAppSettingValue(string strKey) - { - string file = System.Environment.CurrentDirectory; - Configuration config = ConfigurationManager.OpenExeConfiguration(file); - foreach (string key in config.AppSettings.Settings.AllKeys) - { - if (key == strKey) - { - return config.AppSettings.Settings[strKey].Value.ToString(); - } - } - return null; - } + public string HttpRequest(string url, string head, string body) { return PostData(url, head, body); @@ -50,7 +37,7 @@ namespace BPASmartClient.AGV request.Headers["header"] = head; request.Proxy = null; byte[] bytes = Encoding.UTF8.GetBytes(body); - request.ContentType = "application/json; charset=UTF-8"; ;//窗体数据被编码为名称/值对形式 + request.ContentType = "application/json; charset=UTF-8"; //窗体数据被编码为名称/值对形式 //request.ContentType = "application/json"; request.ContentLength = bytes.Length; Stream myResponseStream = request.GetRequestStream(); @@ -95,49 +82,54 @@ namespace BPASmartClient.AGV /// public string AgvToLineOneLoadRoller(string robotJobId) { - //string url = AGVRequestUrl.GetInstance.TaskSendUrl; - ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); - ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE - ////详细任务数据 - ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); - //// string newBody = String.Join(",\r\n", body.Split(','));//格式处理,看需求 + //bool b = Convert.ToBoolean(config.AppSettings.Settings["appKey"].Value);//配置文件信息读取 + string url = AGVRequestUrl.GetInstance.TaskSendUrl; + //请求报文头 + HttpRequestHeaderModel httpHeader=new HttpRequestHeaderModel(); + httpHeader.appKey = ""; + httpHeader.appSecret = ""; + httpHeader.requestId = ""; + httpHeader.timestamp = ""; + httpHeader.version = "2.8"; + string head = JsonConvert.SerializeObject(httpHeader); + //请求报文体 + AGVModel httpModel = new AGVModel(); + httpModel.robotJobId = robotJobId;//上游提供 + httpModel.warehouseId = 123; //仓库编号 + httpModel.jobPriority = 1;//任务执行的优先级 + httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //详细任务数据 + //点到点 + AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + httpJobData.startPoint = "";//起点点位 + httpJobData.endPoint = "";//目的点位 + httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + httpModel.jobData = httpJobData; + string body = JsonConvert.SerializeObject(httpModel); + // string newBody = String.Join(",\r\n", body.Split(','));//格式处理,看需求 - ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); - ////启用签名 - ////url = url + "?sign=" + MD5Deal(body); - //string data = HttpRequest(url, head, body); - //object objData = JsonConvert.DeserializeObject(data); - //if (objData != null && objData is HttpResponseBodyModel response) - //{ - // return response.code; - //} + //货位到货位 + //AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + //httpSlotJobData.startSlotCode = "";//起点槽位编号 + //httpSlotJobData.endSlotCode = "";//目的槽位编号 + //httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpSlotJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpSlotJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpSlotJobData; + //string body = JsonConvert.SerializeObject(httpModel); + //启用签名 + //url = url + "?sign=" + MD5Deal(body); + string data = HttpRequest(url, head, body); + object objData = JsonConvert.DeserializeObject(data); + if (objData != null && objData is HttpResponseBodyModel response) + { + return response.code; + } return "Analysis Error"; } /// @@ -148,37 +140,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + // HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + // AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data= HttpRequest(url, head, body); @@ -197,37 +193,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel=new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData=new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -246,37 +246,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -295,37 +299,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -344,37 +352,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -393,37 +405,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -442,37 +458,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -491,37 +511,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -541,37 +565,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -590,37 +618,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -639,37 +671,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -688,37 +724,41 @@ namespace BPASmartClient.AGV { //string url = AGVRequestUrl.GetInstance.TaskSendUrl; ////请求报文头 - //HttpRequestHeaderModel.GetInstance.appKey = ""; - //HttpRequestHeaderModel.GetInstance.appSecret = ""; - //HttpRequestHeaderModel.GetInstance.requestId = ""; - //HttpRequestHeaderModel.GetInstance.timestamp = ""; - //HttpRequestHeaderModel.GetInstance.version = "2.8"; - //string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + //HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + //httpHeader.appKey = ""; + //httpHeader.appSecret = ""; + //httpHeader.requestId = ""; + //httpHeader.timestamp = ""; + //httpHeader.version = "2.8"; + //string head = JsonConvert.SerializeObject(httpHeader); ////请求报文体 - //AGVModel.GetInstance.robotJobId = robotJobId;//上游提供 - //AGVModel.GetInstance.warehouseId = 123; //仓库编号 - //AGVModel.GetInstance.jobPriority = 1;//任务执行的优先级 - //AGVModel.GetInstance.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 - //AGVModel.GetInstance.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE + //AGVModel httpModel = new AGVModel(); + //httpModel.robotJobId = robotJobId;//上游提供 + //httpModel.warehouseId = 123; //仓库编号 + //httpModel.jobPriority = 1;//任务执行的优先级 + //httpModel.jobPriorityType = 1;//0:根据优先级来执行,1:强制执行 + //httpModel.jobType = "POINT_ROLLER_MOVE"; //SLOT_ROLLER_MOVE / POINT_ROLLER_MOVE ////详细任务数据 ////点到点 - //AGV_PointRollerJobData.GetInstance.startPoint = "";//起点点位 - //AGV_PointRollerJobData.GetInstance.endPoint = "";//目的点位 - //AGV_PointRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - //AGV_PointRollerJobData.GetInstance.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 - //AGV_PointRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - //AGV_PointRollerJobData.GetInstance.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 - //AGVModel.GetInstance.jobData = AGV_PointRollerJobData.GetInstance; - //string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + //AGV_PointRollerJobData httpJobData = new AGV_PointRollerJobData(); + //httpJobData.startPoint = "";//起点点位 + //httpJobData.endPoint = "";//目的点位 + //httpJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + //httpJobData.enableIOLoad = true;//上料交互方式 false:接口交互 true:光电交互 + //httpJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + //httpJobData.enableIOUnload = true;//下料交互方式 false:接口交互 true:光电交互 + //httpModel.jobData = httpJobData; + //string body = JsonConvert.SerializeObject(httpModel); ////货位到货位 - ////AGV_SlotRollerJobData.GetInstance.startSlotCode = "";//起点槽位编号 - ////AGV_SlotRollerJobData.GetInstance.endSlotCode = "";//目的槽位编号 - ////AGV_SlotRollerJobData.GetInstance.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 - ////AGV_SlotRollerJobData.GetInstance.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 - ////AGV_SlotRollerJobData.GetInstance.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 - ////AGV_SlotRollerJobData.GetInstance.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 - ////AGVModel.GetInstance.jobData = AGV_SlotRollerJobData.GetInstance; - ////string body = JsonConvert.SerializeObject(AGVModel.GetInstance); + ////AGV_SlotRollerJobData httpSlotJobData = new AGV_SlotRollerJobData(); + ////httpSlotJobData.startSlotCode = "";//起点槽位编号 + ////httpSlotJobData.endSlotCode = "";//目的槽位编号 + ////httpSlotJobData.autoLoad = true;//是否自动上料 true:自动上料 false:人工上料 + ////httpSlotJobData.enableIOLoad=true;//上料交互方式 false:接口交互 true:光电交互 + ////httpSlotJobData.autoUnload = true;//是否自动下料 true:自动下料 false:人工下料 + ////httpSlotJobData.enableIOUnload=true;//下料交互方式 false:接口交互 true:光电交互 + ////httpModel.jobData = httpSlotJobData; + ////string body = JsonConvert.SerializeObject(httpModel); ////启用签名 ////url = url + "?sign=" + MD5Deal(body); //string data = HttpRequest(url, head, body); @@ -737,16 +777,18 @@ namespace BPASmartClient.AGV { string url = AGVRequestUrl.GetInstance.TaskCancelUrl; //请求报文头 - HttpRequestHeaderModel.GetInstance.appKey = ""; - HttpRequestHeaderModel.GetInstance.appSecret = ""; - HttpRequestHeaderModel.GetInstance.requestId = ""; - HttpRequestHeaderModel.GetInstance.timestamp = ""; - HttpRequestHeaderModel.GetInstance.version = "2.8"; - string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + httpHeader.appKey = ""; + httpHeader.appSecret = ""; + httpHeader.requestId = ""; + httpHeader.timestamp = ""; + httpHeader.version = "2.8"; + string head = JsonConvert.SerializeObject(httpHeader); //请求报文体 - AGVTaskCancelModel.GetInstance.robotJobId = robotJobId; - AGVTaskCancelModel.GetInstance.warehouseId = 123;//仓库编号 - string body = JsonConvert.SerializeObject(AGVTaskCancelModel.GetInstance); + AGVTaskCancelModel cancel = new AGVTaskCancelModel(); + cancel.robotJobId = robotJobId; + cancel.warehouseId = 123;//仓库编号 + string body = JsonConvert.SerializeObject(cancel); //启用签名 //url = url + "?sign=" + MD5Deal(body); string data = HttpRequest(url, head, body); @@ -765,16 +807,18 @@ namespace BPASmartClient.AGV { string url = AGVRequestUrl.GetInstance.TaskCompleteUrl; //请求报文头 - HttpRequestHeaderModel.GetInstance.appKey = ""; - HttpRequestHeaderModel.GetInstance.appSecret = ""; - HttpRequestHeaderModel.GetInstance.requestId = ""; - HttpRequestHeaderModel.GetInstance.timestamp = ""; - HttpRequestHeaderModel.GetInstance.version = "2.8"; - string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + httpHeader.appKey = ""; + httpHeader.appSecret = ""; + httpHeader.requestId = ""; + httpHeader.timestamp = ""; + httpHeader.version = "2.8"; + string head = JsonConvert.SerializeObject(httpHeader); //请求报文体 - AGVTaskCompleteNotifyModel.GetInstance.robotJobId = robotJobId; - AGVTaskCompleteNotifyModel.GetInstance.warehouseId = 123;//仓库编号 - string body = JsonConvert.SerializeObject(AGVTaskCompleteNotifyModel.GetInstance); + AGVTaskCompleteNotifyModel notify = new AGVTaskCompleteNotifyModel(); + notify.robotJobId = robotJobId; + notify.warehouseId = 123;//仓库编号 + string body = JsonConvert.SerializeObject(notify); //启用签名 //url = url + "?sign=" + MD5Deal(body); string data = HttpRequest(url, head, body); @@ -796,17 +840,19 @@ namespace BPASmartClient.AGV { string url = AGVRequestUrl.GetInstance.TaskCompleteUrl; //请求报文头 - HttpRequestHeaderModel.GetInstance.appKey = ""; - HttpRequestHeaderModel.GetInstance.appSecret = ""; - HttpRequestHeaderModel.GetInstance.requestId = ""; - HttpRequestHeaderModel.GetInstance.timestamp = ""; - HttpRequestHeaderModel.GetInstance.version = "2.8"; - string head = JsonConvert.SerializeObject(HttpRequestHeaderModel.GetInstance); + HttpRequestHeaderModel httpHeader = new HttpRequestHeaderModel(); + httpHeader.appKey = ""; + httpHeader.appSecret = ""; + httpHeader.requestId = ""; + httpHeader.timestamp = ""; + httpHeader.version = "2.8"; + string head = JsonConvert.SerializeObject(httpHeader); //请求报文体 - AGVLoadInteracteModel.GetInstance.agvCode = agvCode; - AGVLoadInteracteModel.GetInstance.jobId = jobId; - AGVLoadInteracteModel.GetInstance.msgId = msgId; - string body = JsonConvert.SerializeObject(AGVLoadInteracteModel.GetInstance); + AGVLoadInteracteModel load = new AGVLoadInteracteModel(); + load.agvCode = agvCode; + load.jobId = jobId; + load.msgId = msgId; + string body = JsonConvert.SerializeObject(load); //启用签名 //url = url + "?sign=" + MD5Deal(body); string data = HttpRequest(url, head, body); diff --git a/BPASmartClient.AGV/AGVLoadInteracteModel.cs b/BPASmartClient.AGV/AGVLoadInteracteModel.cs index ec1c6a8c..6124009d 100644 --- a/BPASmartClient.AGV/AGVLoadInteracteModel.cs +++ b/BPASmartClient.AGV/AGVLoadInteracteModel.cs @@ -11,8 +11,8 @@ namespace BPASmartClient.AGV /// internal class AGVLoadInteracteModel { - private static AGVLoadInteracteModel _instance; - public static AGVLoadInteracteModel GetInstance=>_instance ??= new AGVLoadInteracteModel(); + //private static AGVLoadInteracteModel _instance; + //public static AGVLoadInteracteModel GetInstance=>_instance ??= new AGVLoadInteracteModel(); public string agvCode { get; set;} public string jobId { get; set; } public string msgId { get; set; } diff --git a/BPASmartClient.AGV/AGVModel.cs b/BPASmartClient.AGV/AGVModel.cs index e58a17ff..4853f227 100644 --- a/BPASmartClient.AGV/AGVModel.cs +++ b/BPASmartClient.AGV/AGVModel.cs @@ -11,8 +11,8 @@ namespace BPASmartClient.AGV /// internal class AGVModel { - private static AGVModel _instance; - public static AGVModel GetInstance => _instance ??= new AGVModel(); + //private static AGVModel _instance; + //public static AGVModel GetInstance => _instance ??= new AGVModel(); /// /// 必填项 diff --git a/BPASmartClient.AGV/AGVTaskCancelModel.cs b/BPASmartClient.AGV/AGVTaskCancelModel.cs index b1a0edf1..b0c8fa90 100644 --- a/BPASmartClient.AGV/AGVTaskCancelModel.cs +++ b/BPASmartClient.AGV/AGVTaskCancelModel.cs @@ -11,8 +11,8 @@ namespace BPASmartClient.AGV /// internal class AGVTaskCancelModel { - private static AGVTaskCancelModel _instance; - public static AGVTaskCancelModel GetInstance => _instance ??= new AGVTaskCancelModel(); + //private static AGVTaskCancelModel _instance; + //public static AGVTaskCancelModel GetInstance => _instance ??= new AGVTaskCancelModel(); public string robotJobId { get; set; } public long warehouseId { get; set; } public string? executeMode { get; set; } diff --git a/BPASmartClient.AGV/AGVTaskCompleteNotifyModel.cs b/BPASmartClient.AGV/AGVTaskCompleteNotifyModel.cs index 80f918f3..b65d4ad0 100644 --- a/BPASmartClient.AGV/AGVTaskCompleteNotifyModel.cs +++ b/BPASmartClient.AGV/AGVTaskCompleteNotifyModel.cs @@ -11,8 +11,8 @@ namespace BPASmartClient.AGV /// internal class AGVTaskCompleteNotifyModel { - private static AGVTaskCompleteNotifyModel _instance; - public static AGVTaskCompleteNotifyModel GetInstance=>_instance ??= new AGVTaskCompleteNotifyModel(); + //private static AGVTaskCompleteNotifyModel _instance; + //public static AGVTaskCompleteNotifyModel GetInstance=>_instance ??= new AGVTaskCompleteNotifyModel(); public string? robotJobId { get; set; } public string? bucketCode { get; set; } public string? bucketslotCode { get; set; } diff --git a/BPASmartClient.AGV/AGV_PointRollerJobData.cs b/BPASmartClient.AGV/AGV_PointRollerJobData.cs index c54766ed..4f765b7b 100644 --- a/BPASmartClient.AGV/AGV_PointRollerJobData.cs +++ b/BPASmartClient.AGV/AGV_PointRollerJobData.cs @@ -11,8 +11,8 @@ namespace BPASmartClient.AGV /// internal class AGV_PointRollerJobData:IJobData { - private static AGV_PointRollerJobData _instance; - public static AGV_PointRollerJobData GetInstance => _instance ??= new AGV_PointRollerJobData(); + //private static AGV_PointRollerJobData _instance; + //public static AGV_PointRollerJobData GetInstance => _instance ??= new AGV_PointRollerJobData(); public string? containerCode { get; set; } public string startPoint { get; set; } public string endPoint { get; set; } diff --git a/BPASmartClient.AGV/AGV_SlotRollerJobData.cs b/BPASmartClient.AGV/AGV_SlotRollerJobData.cs index 28aab53d..c5ff93b2 100644 --- a/BPASmartClient.AGV/AGV_SlotRollerJobData.cs +++ b/BPASmartClient.AGV/AGV_SlotRollerJobData.cs @@ -11,8 +11,8 @@ namespace BPASmartClient.AGV /// internal class AGV_SlotRollerJobData:IJobData { - private static AGV_SlotRollerJobData _instance; - public static AGV_SlotRollerJobData GetInstance => _instance ??= new AGV_SlotRollerJobData(); + //private static AGV_SlotRollerJobData _instance; + //public static AGV_SlotRollerJobData GetInstance => _instance ??= new AGV_SlotRollerJobData(); public string? containerCode { get; set; } public string startSlotCode { get; set; } public string endSlotCode { get; set; } diff --git a/BPASmartClient.AGV/HttpRequestHeaderModel.cs b/BPASmartClient.AGV/HttpRequestHeaderModel.cs index f512f103..b4a0340f 100644 --- a/BPASmartClient.AGV/HttpRequestHeaderModel.cs +++ b/BPASmartClient.AGV/HttpRequestHeaderModel.cs @@ -8,8 +8,8 @@ namespace BPASmartClient.AGV { internal class HttpRequestHeaderModel { - private static HttpRequestHeaderModel _instance; - public static HttpRequestHeaderModel GetInstance => _instance ??= new HttpRequestHeaderModel(); + //private static HttpRequestHeaderModel _instance; + //public static HttpRequestHeaderModel GetInstance => _instance ??= new HttpRequestHeaderModel(); public string? appKey { get; set; } public string? appSecret { get; set; } public string? requestId { get; set; } diff --git a/BPASmartClient.CustomResource/Pages/View/MainView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/MainView.xaml.cs index d6f8e0f2..28876874 100644 --- a/BPASmartClient.CustomResource/Pages/View/MainView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/MainView.xaml.cs @@ -30,7 +30,7 @@ namespace BPASmartClient.CustomResource.Pages.View this.WindowState = WindowState.Maximized; this.ButMin.Click += (o, e) => { this.WindowState = WindowState.Minimized; }; this.ButMax.Click += (o, e) => { this.WindowState = this.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; }; - this.ButClose.Click += (o, e) => { this.Close(); }; + this.ButClose.Click += (o, e) => { this.Close(); Application.Current.Shutdown(); }; this.MoveBorder.MouseLeftButtonDown += (o, e) => { if (e.ClickCount > 1) diff --git a/BPASmartClient.AGV/App.config b/FryPot_DosingSystem/App.config similarity index 77% rename from BPASmartClient.AGV/App.config rename to FryPot_DosingSystem/App.config index 68751874..22fcd894 100644 --- a/BPASmartClient.AGV/App.config +++ b/FryPot_DosingSystem/App.config @@ -2,12 +2,11 @@ - + - - + \ No newline at end of file diff --git a/FryPot_DosingSystem/Control/DeviceOperate.cs b/FryPot_DosingSystem/Control/DeviceOperate.cs index 19f821eb..0b97b402 100644 --- a/FryPot_DosingSystem/Control/DeviceOperate.cs +++ b/FryPot_DosingSystem/Control/DeviceOperate.cs @@ -69,13 +69,13 @@ namespace FryPot_DosingSystem.Control { try { - if (Json.Data.VariablesInfo["滚筒输送线"].Count>0) + if (Json.Data.VariablesInfo["滚筒输送线"].Count > 0) { //foreach (var item in Json.Data.VariablesInfo["滚筒运输线"]) //{ // Variables.Add(new PlcVariableModel { Address = item.PlcAddress, Length = (ushort)(item.Length == null ? 0 : item.Length) }); //} - foreach (KeyValuePair> dic in Json.Data.VariablesInfo) + foreach (KeyValuePair> dic in Json.Data.VariablesInfo) { if (string.Equals(dic.Key, "滚筒输送线")) { @@ -134,7 +134,7 @@ namespace FryPot_DosingSystem.Control else { IsConfig = false; - MessageLog.GetInstance.ShowRunLog("PLC变量配置失败:文件无数据,请重新配置"); + MessageLog.GetInstance.ShowRunLog("PLC变量配置失败:文件无数据,请重新配置并重启软件"); } //Variables.Add(new PlcVariableModel() { Address = "D2001", Length = 8 });//1号线体滚筒工位号 //Variables.Add(new PlcVariableModel() { Address = "D2011", Length = 8 });//2号线体滚筒工位号 @@ -208,103 +208,123 @@ namespace FryPot_DosingSystem.Control Thread.Sleep(50); } - //炒锅1 - FryOneConnected = fryOneModbus.Connected; - while (FryOneConnected) - { - foreach (var item in FryOneVariables) - { - var res = fryOneModbus.Read(item.Address, item.Length);//读取plc数据 - if (FryOneData.ContainsKey(item.Address)) - { - FryOneData[item.Address] = res; - } - else - { - FryOneData.TryAdd(item.Address, res); - } - } - Thread.Sleep(50); + Thread.Sleep(10); + }), $"滚筒线实时数据读取线程"); + ThreadManage.GetInstance().StartLong(new Action(() => + { + //炒锅1 + FryOneConnected = fryOneModbus.Connected; + while (FryOneConnected) + { + foreach (var item in FryOneVariables) + { + var res = fryOneModbus.Read(item.Address, item.Length);//读取plc数据 + if (FryOneData.ContainsKey(item.Address)) + { + FryOneData[item.Address] = res; + } + else + { + FryOneData.TryAdd(item.Address, res); + } + } + Thread.Sleep(50); - } - //炒锅2 - FryTwoConnected = fryTwoModbus.Connected; - while (FryTwoConnected) - { - foreach (var item in FryTwoVariables) - { - var res = fryTwoModbus.Read(item.Address, item.Length);//读取plc数据 - if (FryTwoData.ContainsKey(item.Address)) - { - FryTwoData[item.Address] = res; - } - else - { - FryTwoData.TryAdd(item.Address, res); - } - } - Thread.Sleep(50); + } + Thread.Sleep(10); + }), $"炒锅1实时数据读取线程"); + ThreadManage.GetInstance().StartLong(new Action(() => + { + //炒锅2 + FryTwoConnected = fryTwoModbus.Connected; + while (FryTwoConnected) + { + foreach (var item in FryTwoVariables) + { + var res = fryTwoModbus.Read(item.Address, item.Length);//读取plc数据 + if (FryTwoData.ContainsKey(item.Address)) + { + FryTwoData[item.Address] = res; + } + else + { + FryTwoData.TryAdd(item.Address, res); + } + } + Thread.Sleep(50); - } - //炒锅3 - FryThreeConnected = fryThreeModbus.Connected; - while (FryThreeConnected) - { - foreach (var item in FryThreeVariables) - { - var res = fryThreeModbus.Read(item.Address, item.Length);//读取plc数据 - if (FryThreeData.ContainsKey(item.Address)) - { - FryThreeData[item.Address] = res; - } - else - { - FryThreeData.TryAdd(item.Address, res); - } - } - Thread.Sleep(50); + } + Thread.Sleep(10); + }), $"炒锅2实时数据读取线程"); + ThreadManage.GetInstance().StartLong(new Action(() => + { + //炒锅3 + FryThreeConnected = fryThreeModbus.Connected; + while (FryThreeConnected) + { + foreach (var item in FryThreeVariables) + { + var res = fryThreeModbus.Read(item.Address, item.Length);//读取plc数据 + if (FryThreeData.ContainsKey(item.Address)) + { + FryThreeData[item.Address] = res; + } + else + { + FryThreeData.TryAdd(item.Address, res); + } + } + Thread.Sleep(50); - } - //炒锅4 - FryFourConnected = fryFourModbus.Connected; - while (FryFourConnected) - { - foreach (var item in FryFourVariables) - { - var res = fryFourModbus.Read(item.Address, item.Length);//读取plc数据 - if (FryFourData.ContainsKey(item.Address)) - { - FryFourData[item.Address] = res; - } - else - { - FryFourData.TryAdd(item.Address, res); - } - } - Thread.Sleep(50); + } + Thread.Sleep(10); + }), $"炒锅3实时数据读取线程"); + ThreadManage.GetInstance().StartLong(new Action(() => + { + //炒锅4 + FryFourConnected = fryFourModbus.Connected; + while (FryFourConnected) + { + foreach (var item in FryFourVariables) + { + var res = fryFourModbus.Read(item.Address, item.Length);//读取plc数据 + if (FryFourData.ContainsKey(item.Address)) + { + FryFourData[item.Address] = res; + } + else + { + FryFourData.TryAdd(item.Address, res); + } + } + Thread.Sleep(50); - } - //炒锅5 - FryFiveConnected = fryFiveModbus.Connected; - while (FryFiveConnected) - { - foreach (var item in FryFiveVariables) - { - var res = fryFiveModbus.Read(item.Address, item.Length);//读取plc数据 - if (FryFiveData.ContainsKey(item.Address)) - { - FryFiveData[item.Address] = res; - } - else - { - FryFiveData.TryAdd(item.Address, res); - } - } - Thread.Sleep(50); + } + Thread.Sleep(10); + }), $"炒锅4实时数据读取线程"); + ThreadManage.GetInstance().StartLong(new Action(() => + { + //炒锅5 + FryFiveConnected = fryFiveModbus.Connected; + while (FryFiveConnected) + { + foreach (var item in FryFiveVariables) + { + var res = fryFiveModbus.Read(item.Address, item.Length);//读取plc数据 + if (FryFiveData.ContainsKey(item.Address)) + { + FryFiveData[item.Address] = res; + } + else + { + FryFiveData.TryAdd(item.Address, res); + } + } + Thread.Sleep(50); - } - Thread.Sleep(500); - }), $"PLC实时数据读取线程"); + } + Thread.Sleep(10); + }), $"炒锅5实时数据读取线程"); } } public void WritePlcData(string address, ushort value) diff --git a/FryPot_DosingSystem/Control/DosingLogicControl.cs b/FryPot_DosingSystem/Control/DosingLogicControl.cs index ba9d7f27..9e031370 100644 --- a/FryPot_DosingSystem/Control/DosingLogicControl.cs +++ b/FryPot_DosingSystem/Control/DosingLogicControl.cs @@ -219,7 +219,7 @@ namespace FryPot_DosingSystem.Control ActionManage.GetInstance.Register(new Action(() => { string id = Guid.NewGuid().ToString(); - string errorCode = AGVHelper._Instance.AgvToLineOneLoadRoller(id); + string errorCode = AGVHelper.GetInstance.AgvToLineOneLoadRoller(id); if (errorCode == "SUCCESS") { MessageLog.GetInstance.ShowRunLog($"AGV任务下发成功"); @@ -1573,7 +1573,9 @@ namespace FryPot_DosingSystem.Control }), "MainViewReadPlcData"); } - + /// + /// 炒锅状态实时显示 + /// private void FryPotStatusDisplay() { FryPotInfoManage.GetInstance.variableInfos.FirstOrDefault(p => p.VarName == "FryPotOneTemp").CurrentValue = FryPotMonitorManage.GetInstance.fryOne.Temperature.ToString(); @@ -1631,10 +1633,10 @@ namespace FryPot_DosingSystem.Control { #region 炒锅1状态数据保存 - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅1状态数据")) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅1状态数据")) { Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅1状态数据"); - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅1状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅1状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅1状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LOneFryPotSerial == 1 && fryOneRecipe != string.Empty) @@ -1651,7 +1653,7 @@ namespace FryPot_DosingSystem.Control } else { - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅1状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅1状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅1状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LOneFryPotSerial == 1 && fryOneRecipe != string.Empty) { @@ -1667,10 +1669,10 @@ namespace FryPot_DosingSystem.Control } #endregion #region 炒锅2状态数据保存 - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅2状态数据")) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅2状态数据")) { Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅2状态数据"); - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅2状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅2状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅2状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LTwoFryPotSerial == 2 && fryTwoRecipe != string.Empty) @@ -1687,7 +1689,7 @@ namespace FryPot_DosingSystem.Control } else { - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅2状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅2状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅2状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LTwoFryPotSerial == 2 && fryTwoRecipe != string.Empty) { @@ -1703,10 +1705,10 @@ namespace FryPot_DosingSystem.Control } #endregion #region 炒锅3状态数据保存 - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅3状态数据")) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅3状态数据")) { Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅3状态数据"); - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅3状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅3状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅3状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LThreeFryPotSerial == 3 && fryThreeRecipe != string.Empty) @@ -1723,7 +1725,7 @@ namespace FryPot_DosingSystem.Control } else { - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅3状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅3状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅3状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LThreeFryPotSerial == 3 && fryThreeRecipe != string.Empty) { @@ -1739,10 +1741,10 @@ namespace FryPot_DosingSystem.Control } #endregion #region 炒锅4状态数据保存 - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅4状态数据")) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅4状态数据")) { Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅4状态数据"); - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅4状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅4状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅4状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LOneFryPotSerial == 4 && fryFourRecipe != string.Empty) @@ -1759,7 +1761,7 @@ namespace FryPot_DosingSystem.Control } else { - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅4状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅4状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅4状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LOneFryPotSerial == 4 && fryFourRecipe != string.Empty) { @@ -1775,10 +1777,10 @@ namespace FryPot_DosingSystem.Control } #endregion #region 炒锅5状态数据保存 - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅5状态数据")) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅5状态数据")) { Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅5状态数据"); - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅5状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅5状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅5状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LTwoFryPotSerial == 5 && fryFiveRecipe != string.Empty) @@ -1795,7 +1797,7 @@ namespace FryPot_DosingSystem.Control } else { - if (!Directory.Exists("AccessFile\\" + "DB" + "炒锅5状态数据\\" + DateTime.Now.ToShortDateString())) + if (!Directory.Exists("AccessFile\\" + "DB\\" + "炒锅5状态数据\\" + DateTime.Now.ToShortDateString())) Directory.CreateDirectory("AccessFile\\" + "DB\\" + "炒锅5状态数据\\" + DateTime.Now.ToShortDateString()); if (globalVar.LTwoFryPotSerial == 5 && fryFiveRecipe != string.Empty) {