using iWareCcTest.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 = "equipstatus".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);
|
}
|
}
|
}
|
}
|