schangxiang@126.com
2025-09-17 a32e5a5b296cab5ccc20953ca4e801ca4f27bd85
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
using iWareCc.Properties;
using iWareCommon.Common.Entity;
using iWareCommon.Utils;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace iWareCc.Srm.Strategy
{
    public class 推送堆垛机告警状态 : IStrategy
    {
 
        private object RequestBody;
 
        public string ActionName { get; private set; }
 
        public string RequestStr { get; private set; }
 
        public string ResponseStr { get; private set; }
 
        public 推送堆垛机告警状态(object requestBody)
        {
            this.RequestBody = requestBody;
 
        }
 
 
        public void DoJob()
        {
            try
            {
                ActionName = "equipwarn".ToLower();
 
                RequestStr = JsonConvert.SerializeObject(RequestBody);
                ResponseStr = HttpHelper.GetHttpResponse(Resources.WipUrl2 + @"/" + ActionName, RequestBody, 5000);
            }
            catch (Exception ex)
            {
                LogTextHelper.WriteLog(Resources.LogDir, this.ToString(), "DoJob", ex.Message);
            }
        }
    }
}