diff --git a/BPASmart.ConfigurationSoftware/BPASmart.ConfigurationSoftware.csproj b/BPASmart.ConfigurationSoftware/BPASmart.ConfigurationSoftware.csproj index 39fd53bd..382433bf 100644 --- a/BPASmart.ConfigurationSoftware/BPASmart.ConfigurationSoftware.csproj +++ b/BPASmart.ConfigurationSoftware/BPASmart.ConfigurationSoftware.csproj @@ -20,7 +20,7 @@ - + diff --git a/BPASmart.MenuLoad/App.xaml b/BPASmart.MenuLoad/App.xaml new file mode 100644 index 00000000..18ae0c59 --- /dev/null +++ b/BPASmart.MenuLoad/App.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/BPASmart.MenuLoad/App.xaml.cs b/BPASmart.MenuLoad/App.xaml.cs new file mode 100644 index 00000000..8f138296 --- /dev/null +++ b/BPASmart.MenuLoad/App.xaml.cs @@ -0,0 +1,74 @@ +using BeDesignerSCADA.Helper; +using BeDesignerSCADA.View; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; + +namespace BPASmart.MenuLoad +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + bool isShow = false; + [DllImport("kernel32.dll")] + private static extern bool SetProcessWorkingSetSize(IntPtr proc, int min, int max); + string _path = $"{System.AppDomain.CurrentDomain.BaseDirectory}Layouts\\可视化界面菜单布局.yf"; + private void FlushMemory() + { + GC.Collect(); + GC.WaitForPendingFinalizers(); + if (Environment.OSVersion.Platform == PlatformID.Win32NT) + SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1); + } + + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + RunWindows run = new RunWindows(); + _ = Task.Factory.StartNew(delegate + { + while (true) + { + try + { + if (!isShow) + { + this.Dispatcher.Invoke(() => { + if (File.Exists(_path)) + { + SystemHelperNew.GetInstance.CreateShortcutOnDesktop(); + SystemHelperNew.GetInstance.CreateShortcutOnDesktop("可视化配置工具"); + //SystemHelperNew.GetInstance.CreateDesktopShortcut(); + run.LoadingData(_path); + run.Show(); + isShow = true; + } + else + { + MessageBox.Show("未布局应用程序!"); + System.Windows.Application.Current.Shutdown(0); + } + }); + + } + FlushMemory(); + Thread.Sleep(TimeSpan.FromSeconds((double)1000)); + } + catch { } + } + }); + + } + } +} diff --git a/BPASmart.MenuLoad/AssemblyInfo.cs b/BPASmart.MenuLoad/AssemblyInfo.cs new file mode 100644 index 00000000..8b5504ec --- /dev/null +++ b/BPASmart.MenuLoad/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/BPASmart.MenuLoad/BPASmart.MenuLoad.csproj b/BPASmart.MenuLoad/BPASmart.MenuLoad.csproj new file mode 100644 index 00000000..15c0fe6e --- /dev/null +++ b/BPASmart.MenuLoad/BPASmart.MenuLoad.csproj @@ -0,0 +1,28 @@ + + + + WinExe + net6.0-windows + enable + true + 可视化应用 + fyf.ico + + + + + + + + + + + + + + + + + + + diff --git a/BPASmart.MenuLoad/MainWindow.xaml b/BPASmart.MenuLoad/MainWindow.xaml new file mode 100644 index 00000000..fdbdd6a5 --- /dev/null +++ b/BPASmart.MenuLoad/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/BPASmart.MenuLoad/MainWindow.xaml.cs b/BPASmart.MenuLoad/MainWindow.xaml.cs new file mode 100644 index 00000000..35bed5b7 --- /dev/null +++ b/BPASmart.MenuLoad/MainWindow.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace BPASmart.MenuLoad +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/BPASmart.MenuLoad/fyf.ico b/BPASmart.MenuLoad/fyf.ico new file mode 100644 index 00000000..346bbc6c Binary files /dev/null and b/BPASmart.MenuLoad/fyf.ico differ diff --git a/BPASmart.Model/IRecipeMaterials.cs b/BPASmart.Model/Interfaces/IRecipeMaterials.cs similarity index 100% rename from BPASmart.Model/IRecipeMaterials.cs rename to BPASmart.Model/Interfaces/IRecipeMaterials.cs diff --git a/BPASmart.PageLoad/BPASmart.PageLoad.csproj b/BPASmart.PageLoad/BPASmart.PageLoad.csproj index 2811f581..4bf1921b 100644 --- a/BPASmart.PageLoad/BPASmart.PageLoad.csproj +++ b/BPASmart.PageLoad/BPASmart.PageLoad.csproj @@ -8,7 +8,7 @@ - + diff --git a/BPASmart.PageLoad/MainWindow.xaml b/BPASmart.PageLoad/MainWindow.xaml index 943a6d58..31f9ff63 100644 --- a/BPASmart.PageLoad/MainWindow.xaml +++ b/BPASmart.PageLoad/MainWindow.xaml @@ -2,7 +2,7 @@ x:Class="BPASmart.PageLoad.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:ctrl="clr-namespace:BeDesignerSCADA.Controls;assembly=BeDesignerSCADA" + xmlns:ctrl="clr-namespace:BeDesignerSCADA.Controls;assembly=可视化配置工具" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:BPASmart.PageLoad" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" @@ -13,7 +13,7 @@ mc:Ignorable="d"> - + diff --git a/BPASmart.RecipeManagement/ViewModel/RecipeManagerViewModel.cs b/BPASmart.RecipeManagement/ViewModel/RecipeManagerViewModel.cs index af02937e..e6cd66d6 100644 --- a/BPASmart.RecipeManagement/ViewModel/RecipeManagerViewModel.cs +++ b/BPASmart.RecipeManagement/ViewModel/RecipeManagerViewModel.cs @@ -34,7 +34,7 @@ namespace BPASmart.RecipeManagement.ViewModel /// /// 配方下发 /// - public RelayCommand PecipeStartCommand { get; set; } + public RelayCommand PecipeStartCommand { get; set; } private void EditRecipe(object o) { @@ -77,7 +77,6 @@ namespace BPASmart.RecipeManagement.ViewModel private void PecipeStart(object o) { - if (o == null) return; if (o is string id) { diff --git a/BPASmart.Server/BPASmart.Server.csproj b/BPASmart.Server/BPASmart.Server.csproj index b8feb48b..6a75087c 100644 --- a/BPASmart.Server/BPASmart.Server.csproj +++ b/BPASmart.Server/BPASmart.Server.csproj @@ -9,7 +9,7 @@ - + diff --git a/BPASmart.Server/CommunicationServer.cs b/BPASmart.Server/CommunicationServer.cs index 58de4bd1..42e706a7 100644 --- a/BPASmart.Server/CommunicationServer.cs +++ b/BPASmart.Server/CommunicationServer.cs @@ -122,11 +122,6 @@ namespace BPASmart.Server private void DeviceControl(PublishInfo publishInfo) { - //if (msg.TryDequeue(out string s)) - //{ - // var res = JsonConvert.DeserializeObject(s); - // if (res != null) - // { publishInfo.PublishModels.ForEach(item => { if (CommunicationDevices.ContainsKey(item.DeviceName)) @@ -171,8 +166,7 @@ namespace BPASmart.Server } }); - //} - //} + } private void SetValue(Array arrays, string DeviceName, ReadDataModel readDataModel, EDataType eDataType) diff --git a/BPASmart.VariableManager/BPASmart.VariableManager.csproj b/BPASmart.VariableManager/BPASmart.VariableManager.csproj index 2cb26e6f..252e006a 100644 --- a/BPASmart.VariableManager/BPASmart.VariableManager.csproj +++ b/BPASmart.VariableManager/BPASmart.VariableManager.csproj @@ -30,7 +30,7 @@ - + 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/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj index c50381c7..5df25cfc 100644 --- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj +++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj @@ -24,6 +24,7 @@ + @@ -87,6 +88,10 @@ + + + + @@ -276,6 +281,7 @@ + @@ -301,6 +307,10 @@ + + + + @@ -385,6 +395,7 @@ + diff --git a/BPASmartClient.CustomResource/Fonts/iconfont.ttf b/BPASmartClient.CustomResource/Fonts/iconfont.ttf index 3fa0ee4c..d6a19d36 100644 Binary files a/BPASmartClient.CustomResource/Fonts/iconfont.ttf and b/BPASmartClient.CustomResource/Fonts/iconfont.ttf differ diff --git a/BPASmartClient.CustomResource/Fonts/new/demo_index.html b/BPASmartClient.CustomResource/Fonts/new/demo_index.html new file mode 100644 index 00000000..7f54280b --- /dev/null +++ b/BPASmartClient.CustomResource/Fonts/new/demo_index.html @@ -0,0 +1,276 @@ + + + + + iconfont Demo + + + + + + + + + + + + + +
+

+ + +

+ +
+
+
    + +
  • + +
    open-l
    +
    
    +
  • + +
  • + +
    进行中
    +
    
    +
  • + +
  • + +
    启动
    +
    
    +
  • + +
  • + +
    停止刷新
    +
    
    +
  • + +
+
+

Unicode 引用

+
+ +

Unicode 是字体在网页端最原始的应用方式,特点是:

+
    +
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • +
  • 默认情况下不支持多色,直接添加多色图标会自动去色。
  • +
+
+

注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)

+
+

Unicode 使用步骤如下:

+

第一步:拷贝项目下面生成的 @font-face

+
@font-face {
+  font-family: 'iconfont';
+  src: url('iconfont.ttf?t=1665539385316') format('truetype');
+}
+
+

第二步:定义使用 iconfont 的样式

+
.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+

第三步:挑选相应图标并获取字体编码,应用于页面

+
+<span class="iconfont">&#x33;</span>
+
+
+

"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    + +
  • + +
    + open-l +
    +
    .icon-openl +
    +
  • + +
  • + +
    + 进行中 +
    +
    .icon-shouye +
    +
  • + +
  • + +
    + 启动 +
    +
    .icon-qidong +
    +
  • + +
  • + +
    + 停止刷新 +
    +
    .icon-tingzhishuaxin +
    +
  • + +
+
+

font-class 引用

+
+ +

font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。

+

与 Unicode 使用方式相比,具有如下特点:

+
    +
  • 相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。
  • +
  • 因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 fontclass 代码:

+
<link rel="stylesheet" href="./iconfont.css">
+
+

第二步:挑选相应图标并获取类名,应用于页面:

+
<span class="iconfont icon-xxx"></span>
+
+
+

" + iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。

+
+
+
+
+
    + +
  • + +
    open-l
    +
    #icon-openl
    +
  • + +
  • + +
    进行中
    +
    #icon-shouye
    +
  • + +
  • + +
    启动
    +
    #icon-qidong
    +
  • + +
  • + +
    停止刷新
    +
    #icon-tingzhishuaxin
    +
  • + +
+
+

Symbol 引用

+
+ +

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 + 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:

+
    +
  • 支持多色图标了,不再受单色限制。
  • +
  • 通过一些技巧,支持像字体那样,通过 font-size, color 来调整样式。
  • +
  • 兼容性较差,支持 IE9+,及现代浏览器。
  • +
  • 浏览器渲染 SVG 的性能一般,还不如 png。
  • +
+

使用步骤如下:

+

第一步:引入项目下面生成的 symbol 代码:

+
<script src="./iconfont.js"></script>
+
+

第二步:加入通用 CSS 代码(引入一次就行):

+
<style>
+.icon {
+  width: 1em;
+  height: 1em;
+  vertical-align: -0.15em;
+  fill: currentColor;
+  overflow: hidden;
+}
+</style>
+
+

第三步:挑选相应图标并获取类名,应用于页面:

+
<svg class="icon" aria-hidden="true">
+  <use xlink:href="#icon-xxx"></use>
+</svg>
+
+
+
+ +
+
+ + + diff --git a/BPASmartClient.CustomResource/Fonts/new/iconfont.ttf b/BPASmartClient.CustomResource/Fonts/new/iconfont.ttf new file mode 100644 index 00000000..02aa6687 Binary files /dev/null and b/BPASmartClient.CustomResource/Fonts/new/iconfont.ttf differ diff --git a/BPASmartClient.CustomResource/Image/不锈钢纹理.jpg b/BPASmartClient.CustomResource/Image/不锈钢纹理.jpg new file mode 100644 index 00000000..13aa57da Binary files /dev/null and b/BPASmartClient.CustomResource/Image/不锈钢纹理.jpg differ diff --git a/BPASmartClient.CustomResource/Image/不锈钢纹理1.png b/BPASmartClient.CustomResource/Image/不锈钢纹理1.png new file mode 100644 index 00000000..087af1e1 Binary files /dev/null and b/BPASmartClient.CustomResource/Image/不锈钢纹理1.png differ diff --git a/BPASmartClient.CustomResource/Image/不锈钢纹理2.jpeg b/BPASmartClient.CustomResource/Image/不锈钢纹理2.jpeg new file mode 100644 index 00000000..d0575726 Binary files /dev/null and b/BPASmartClient.CustomResource/Image/不锈钢纹理2.jpeg differ diff --git a/BPASmartClient.CustomResource/Image/不锈钢纹理3.jpeg b/BPASmartClient.CustomResource/Image/不锈钢纹理3.jpeg new file mode 100644 index 00000000..024e12f8 Binary files /dev/null and b/BPASmartClient.CustomResource/Image/不锈钢纹理3.jpeg differ diff --git a/BPASmartClient.CustomResource/Pages/Model/MenuManage.cs b/BPASmartClient.CustomResource/Pages/Model/MenuManage.cs index 248ee7f2..be1ff668 100644 --- a/BPASmartClient.CustomResource/Pages/Model/MenuManage.cs +++ b/BPASmartClient.CustomResource/Pages/Model/MenuManage.cs @@ -96,7 +96,7 @@ namespace BPASmartClient.CustomResource.Pages.Model /// 子菜单权限管理 /// public Permission[] SubMenuPermission { get { return _mSubMenuPermission; } set { _mSubMenuPermission = value; OnPropertyChanged(); } } - private Permission[] _mSubMenuPermission; + private Permission[] _mSubMenuPermission = new Permission[] { Permission.管理员 }; /// /// 切换界面路径 diff --git a/BPASmartClient.CustomResource/Pages/Model/MessageLog.cs b/BPASmartClient.CustomResource/Pages/Model/MessageLog.cs index 251fa976..afc3925a 100644 --- a/BPASmartClient.CustomResource/Pages/Model/MessageLog.cs +++ b/BPASmartClient.CustomResource/Pages/Model/MessageLog.cs @@ -8,6 +8,7 @@ using System.Threading.Tasks; using System.Windows; using BPASmartClient.Model; using System.Windows.Media; +using BPASmartClient.CustomResource.Pages.View; namespace BPASmartClient.CustomResource.Pages.Model { @@ -44,17 +45,20 @@ namespace BPASmartClient.CustomResource.Pages.Model { lock (userlock) { - UserLog userLog = new UserLog() + if (!string.IsNullOrEmpty(Global.userInfo.UserName) && !string.IsNullOrEmpty(Global.userInfo.permission.ToString()) && !string.IsNullOrEmpty(info)) { - Date = DateTime.Now.ToString("yyyy-MM-dd"), - Time = DateTime.Now.ToString("HH:mm:ss"), - Permission = Global.userInfo.permission.ToString(), - UserName = Global.userInfo.UserName, - LogInfo = info - }; - Sqlite.GetInstance.Base.Add(userLog); - Application.Current.Dispatcher.Invoke(new Action(() => { userLogs.Insert(0, userLog); })); - UserLog?.Invoke(info); + UserLog userLog = new UserLog() + { + Date = DateTime.Now.ToString("yyyy-MM-dd"), + Time = DateTime.Now.ToString("HH:mm:ss"), + Permission = Global.userInfo.permission.ToString(), + UserName = Global.userInfo.UserName, + LogInfo = info + }; + Sqlite.GetInstance.Base.Add(userLog); + Application.Current.Dispatcher.Invoke(new Action(() => { userLogs.Insert(0, userLog); })); + UserLog?.Invoke(info); + } } } @@ -73,7 +77,7 @@ namespace BPASmartClient.CustomResource.Pages.Model RunLog?.Invoke(info); } } - + int AlarmID; public void ShowAlarmLog(string info, string AlarmNumber = "_", AlarmLevel level = AlarmLevel.一般报警) { @@ -94,5 +98,42 @@ namespace BPASmartClient.CustomResource.Pages.Model AlarmLog?.Invoke(info); } } + + public bool ShowDialog(string info, DialogType dialogType = DialogType.Information) + { + PromptView PV = new PromptView(); + switch (dialogType) + { + case DialogType.Warning: + PV.TextBlockIcon = ""; + PV.TextBlockForeground = Brushes.Yellow; + PV.TextBlockInfo = $"警告:{info}"; + PV.Cancel.Visibility = Visibility.Collapsed; + break; + case DialogType.Error: + PV.TextBlockIcon = ""; + PV.TextBlockForeground = Brushes.Red; + PV.TextBlockInfo = $"错误:{info}"; + PV.Cancel.Visibility = Visibility.Collapsed; + break; + case DialogType.Information: + PV.TextBlockIcon = ""; + PV.TextBlockForeground = Brushes.DeepSkyBlue; + PV.TextBlockInfo = $"提示:{info}"; + PV.Cancel.Visibility = Visibility.Visible; + break; + default: + break; + } + var res = PV.ShowDialog(); + return res == null ? false : (bool)res; + } + } + + public enum DialogType + { + Warning, + Error, + Information, } } diff --git a/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml b/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml index cf7e2af0..da9f8482 100644 --- a/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml +++ b/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml @@ -19,21 +19,32 @@ Margin="20" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"> - - - - - + + + + + + + + + + + + + + diff --git a/BPASmartClient.CustomResource/Pages/View/LoginView.xaml b/BPASmartClient.CustomResource/Pages/View/LoginView.xaml index 64b67296..4b84c820 100644 --- a/BPASmartClient.CustomResource/Pages/View/LoginView.xaml +++ b/BPASmartClient.CustomResource/Pages/View/LoginView.xaml @@ -8,13 +8,13 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:BPASmartClient.CustomResource.Pages.ViewModel" Title="LoginView" - Width="1920" - Height="1080" + Width="1366" + Height="768" AllowsTransparency="True" Background="{x:Null}" Topmost="False" WindowStartupLocation="CenterScreen" - WindowState="Normal" + WindowState="Maximized" WindowStyle="None" mc:Ignorable="d"> @@ -194,7 +194,7 @@ + + + + + + + + +