add
zongzhibin
2024-11-23 de4e5b2eafe108d20bc0fc4f215fdda135ed04c9
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using iWareCommon.Utils;
using iWareSql.WmsDBModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
 
namespace iWareCC.ThreadService._04_BZ21_搬运整垛机器人_
{
    public class DataProcess_BZ21
    {
        public static void PushPackageCode()
        {
            while (true)
            {
                Thread.Sleep(2000);
                using (WmsDBModel edm = new WmsDBModel())
                {
                    var value = edm.mes_PushPackageCode.Where(x => x.PushStatus == 0 || x.PushStatus == 1).FirstOrDefault();
                    if (value != null)
                    {
                        PushPackageCodeInput input = new PushPackageCodeInput();
                        input.PackageCode = value.PackageCode;
                        var res = HttpHelper.GetHttpResponse<PushPackageCodeInput, Respone>(" ", input, 10000);
 
                    }
                }
            }
        }
        public class PushPackageCodeInput
        {
            public string PackageCode { get; set; }
        }
        public class Respone
        {
            /// <summary>
            /// 返回码
            /// </summary>
            public string code { get; set; }
 
            /// <summary>
            /// 返回消息
            /// </summary>
            public string message { get; set; }
 
            /// <summary>
            /// 请求编号
            /// </summary>
            public string reqCode { get; set; }
 
            /// <summary>
            /// 自定义返回(返回任务单号)
            /// </summary>
            public string data { get; set; }
        }
    }
}