using HH.WCS.Mobox3.YNJT_BZP.api;
|
using HH.WCS.Mobox3.YNJT_BZP.device;
|
using HH.WCS.Mobox3.YNJT_BZP.dispatch;
|
using HH.WCS.Mobox3.YNJT_BZP.models;
|
using HH.WCS.Mobox3.YNJT_BZP.util;
|
using HH.WCS.Mobox3.YNJT_BZP.wms;
|
using Newtonsoft.Json;
|
using NLog;
|
using System;
|
using System.Collections.Generic;
|
using System.Data.SqlClient;
|
using System.Linq;
|
using System.Reflection;
|
using System.Threading;
|
using static HH.WCS.Mobox3.YNJT_BZP.api.ApiModel;
|
|
namespace HH.WCS.Mobox3.YNJT_BZP.process
|
{
|
/// <summary>
|
/// 设备信号处理,主要是tcp信号,我们做server被动接收信号来处理,根据项目定制的
|
/// </summary>
|
internal class DeviceProcess
|
{
|
internal static void Analysis(string data, string ip) {
|
if (data.Length >= 6) {
|
//去掉消息头3F 00
|
data = data.Substring(4);
|
Console.WriteLine($"{ip}-{data}");
|
|
}
|
|
}
|
|
internal static string GenerateTaskNo()
|
{
|
var id = SYSHelper.GetSerialNumber("缓存信号识别码", "XH");
|
var date = DateTime.Now.ToString("yyMMdd");
|
return $"XH{date}{id.ToString().PadLeft(5, '0')}";
|
}
|
}
|
}
|