You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.6 KiB
C#

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
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
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);
}
}
}
}