using SLH.SSDMS.Collect; using SLH.SSDMS.Common; using SLH.SSDMS.Model.DO; using SLH.SSDMS.Model.DTO; using SLH.SSDMS.RestSharp; using SLH.SSDMS.Services; using SLH.SSDMS.Services.serviceImpl; using SLH.SSDMS.WebSocket; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; namespace SLH.SSDMS { static class Program { /// /// 应用程序的主入口点。 /// static void Main() { try { ServiceBase[] ServicesToRun; ServicesToRun = new ServiceBase[] { new Service1() }; ServiceBase.Run(ServicesToRun); } catch(Exception ex) { LogHelper.Error("异常捕获", ex); } } public static void test() { try { ViewModelDTO viewModelDTO = new ViewModelDTO(); viewModelDTO.orderFlag = 0; viewModelDTO.runTime = 123.3M; viewModelDTO.speed = 4.2M; viewModelDTO.distance = 123; string firstTime = "2021-10-11"; viewModelDTO.firstTime = firstTime.Substring(0, 10); viewModelDTO.beltSum = 11; //上传无人巡检系统 Upload.sendMessage(viewModelDTO); }catch(Exception ex) { Console.WriteLine("上传异常:" + ex.Message); } } } }