杨前锦
2025-05-26 d0a265713fd18162f3a82bdcd22e267df7298c7b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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')}";
        }
    }
}