Commit e9591eda LN

极创接口对接

1 个父辈 9f488557
...@@ -233,5 +233,7 @@ namespace OnlineStore.Common ...@@ -233,5 +233,7 @@ namespace OnlineStore.Common
public static string door2 = "door2"; public static string door2 = "door2";
public static string openDoor= "openDoor"; public static string openDoor= "openDoor";
public static string closeDoor= "closeDoor"; public static string closeDoor= "closeDoor";
public static string boxCanPutIn = "boxCanPutIn";
} }
} }
...@@ -12,17 +12,15 @@ using System.Security.Cryptography; ...@@ -12,17 +12,15 @@ using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Reflection; using System.Reflection;
using log4net; using log4net;
using System.Collections.Specialized;
using System.Net.NetworkInformation;
namespace OnlineStore.Common namespace OnlineStore.Common
{ {
public class HttpHelper public class HttpHelper
{ {
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static string Post(string url, string paramData) private static int isLog = ConfigAppSettings.GetIntValue(Setting_Init.Server_Log_Open);
{
return Post(url, paramData, Encoding.UTF8);
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
...@@ -65,18 +63,25 @@ namespace OnlineStore.Common ...@@ -65,18 +63,25 @@ namespace OnlineStore.Common
{ {
try try
{ {
return JsonHelper.DeserializeJsonToObject<Operation>(result); Operation operation1 = JsonHelper.DeserializeJsonToObject<Operation>(result);
if (isLog == 1)
{
LOGGER.Info("Post【" + url + "】【" + json + "】收到【" + result + "】");
} }
catch (Exception ex) else if (operation1 != null && operation1.op > 0)
{ {
LOGGER.Error("JsonHelper.DeserializeJsonToObject 出错【result=" + result + "】" + ex); LOGGER.Info("Post【" + url + "】【" + json + "】收到【" + result + "】");
} }
return operation1;
} }
if (isLog == 1) catch (Exception ex)
{ {
LOGGER.Info("Post【" + url + "】【" + json + "】收到【" + result + "】"); LOGGER.Error("JsonHelper.DeserializeJsonToObject 出错【result=" + result + "】" + ex);
} }
} }
}
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -84,17 +89,64 @@ namespace OnlineStore.Common ...@@ -84,17 +89,64 @@ namespace OnlineStore.Common
} }
return null; return null;
} }
private static int isLog = ConfigAppSettings.GetIntValue(Setting_Init.Server_Log_Open); public static bool PingURLIP(string url, int ms = 100)
public static string Post(string url, string paramData, Encoding encoding) {
string[] urlArray = url.Split('/');
if (urlArray.Length > 3)
{
string ip = urlArray[2];
Ping pingSender = new Ping();
PingReply reply = pingSender.Send(ip, ms);//第一个参数为ip地址,第二个参数为ping的时间
if (reply.Status == IPStatus.Success)
{
//通
return true;
}
else
{
LogUtil.error(LOGGER,"Ping IP " + ip + " : false");
//不通
return false;
}
}
return true;
}
public static string Post(string url, NameValueCollection paramData, int timeOut = 10000)
{
string result = "";
if (url.ToLower().IndexOf("https", System.StringComparison.Ordinal) > -1)
{
ServicePointManager.ServerCertificateValidationCallback =
new RemoteCertificateValidationCallback((sender, certificate, chain, errors) => { return true; });
}
try
{ {
//if (isLog == 1) using (var wc = new MyWebClient(timeOut))
//{
// LOGGER.Info("给服务器发送数据【" + paramData + "】 ");
//}
if (paramData != "null" && paramData != null)
{ {
// LogUtil.debug(LOGGER, "HTTP POST to " + url + " \n\t >> " + paramData); byte[] buf = wc.UploadValues(url, "POST", paramData);
result = Encoding.UTF8.GetString(buf);
} }
//LogUtil.info(result);
}
catch (Exception e)
{
LogUtil.error(LOGGER,"POST ERROR:" + e.ToString() + "\r\n" + url, 101);
}
return result;
}
public static string Post(string url, string paramData, int timeOut = 10000)
{
return Post(url, paramData, Encoding.UTF8, timeOut);
}
public static string Post(string url, string paramData, Encoding encoding, int timeOut = 10000)
{
string result = ""; string result = "";
if (url.ToLower().IndexOf("https", System.StringComparison.Ordinal) > -1) if (url.ToLower().IndexOf("https", System.StringComparison.Ordinal) > -1)
...@@ -105,53 +157,108 @@ namespace OnlineStore.Common ...@@ -105,53 +157,108 @@ namespace OnlineStore.Common
try try
{ {
var wc = new MyWebClient(5000); using (var wc = new MyWebClient(timeOut))
{
if (string.IsNullOrEmpty(wc.Headers["Content-Type"])) if (string.IsNullOrEmpty(wc.Headers["Content-Type"]))
{
wc.Headers.Add("Content-Type", "application/json;charset=UTF-8"); wc.Headers.Add("Content-Type", "application/json;charset=UTF-8");
}
wc.Headers.Add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
wc.Encoding = encoding; wc.Encoding = encoding;
result = wc.UploadString(url, "POST", paramData); result = wc.UploadString(url, "POST", paramData);
}
//LogUtil.info(result); //LogUtil.info(result);
} }
catch (Exception e) catch (Exception e)
{ {
LogUtil.error(LOGGER, "POST ERROR:" + e.StackTrace, 1); LogUtil.error(LOGGER,"POST ERROR:" + e.ToString() + "\r\n" + url, 101);
}
return result;
} }
if (!result.Contains("null") && result.Length != 0) static object lockpost = new object();
public static Operation Post(string url, Operation operation, int timeout = 5000, bool printlog = false)
{ {
//LogUtil.debug(LOGGER,"receive << " + result); try
{
string json = JsonHelper.SerializeObject(operation);
string result = Post(url, json, timeout);
Operation op = JsonHelper.DeserializeJsonToObject<Operation>(result);
if (printlog)
{
LogUtil.info("Send [" + json + "] Revice [" + result + "]");
} }
if (isLog == 1) return op;
}
catch (Exception ex)
{ {
LOGGER.Info("Post【"+ url + "】【"+ paramData + "】收到【" + result + "】"); LogUtil.error(LOGGER,"Post 出错【operation.op=" + operation.op + "】:" + ex);
} }
return result; return null;
} }
public static string Get(string url) public static string Get(string url)
{ {
return Get(url, Encoding.UTF8); return Get(url, Encoding.UTF8);
} }
public static string Get(string url, Encoding encoding, int timeOut = 10000)
public static string Get(string url, Encoding encoding)
{ {
try try
{ {
LogUtil.info(LOGGER, "HTTP GET FROM: " + url); LogUtil.debug("HTTP GET FROM: " + url);
var wc = new WebClient { Encoding = encoding }; using (var wc = new MyWebClient { Encoding = encoding })
{
var readStream = wc.OpenRead(url); var readStream = wc.OpenRead(url);
using (var sr = new StreamReader(readStream, encoding)) using (var sr = new StreamReader(readStream, encoding))
{ {
var result = sr.ReadToEnd(); var result = sr.ReadToEnd();
LogUtil.info(LOGGER, "receive << " + result); LogUtil.debug("receive << " + result);
return result; return result;
} }
} }
}
catch (Exception e) catch (Exception e)
{ {
LogUtil.error(LOGGER, "HTTP GET ERROR:" + e.Message, 2); LogUtil.error(LOGGER,"HTTP GET ERROR:" + e.Message, 102);
} }
return ""; return "";
} }
public static string PostJson(string url, Dictionary<string, string> paramDataMap, Encoding encoding, int timeOut = 10000)
{
string result = "";
if (url.ToLower().IndexOf("https", System.StringComparison.Ordinal) > -1)
{
ServicePointManager.ServerCertificateValidationCallback =
new RemoteCertificateValidationCallback((sender, certificate, chain, errors) => { return true; });
}
try
{
string paramData = JsonHelper.SerializeObject(paramDataMap);
using (var wc = new MyWebClient(timeOut))
{
if (string.IsNullOrEmpty(wc.Headers["Content-Type"]))
{
wc.Headers.Add("Content-Type", "application/json;charset=UTF-8");
}
wc.Headers.Add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
wc.Encoding = encoding;
result = wc.UploadString(url, "POST", paramData);
}
//LogUtil.info(result);
}
catch (Exception e)
{
LogUtil.error(LOGGER,"POST ERROR:" + e.ToString() + "\r\n" + url, 101);
}
return result;
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
...@@ -69,6 +70,7 @@ ...@@ -69,6 +70,7 @@
<Compile Include="IO\IOManager.cs" /> <Compile Include="IO\IOManager.cs" />
<Compile Include="IO\KangNaiDe\KNDManager.cs" /> <Compile Include="IO\KangNaiDe\KNDManager.cs" />
<Compile Include="IO\KangNaiDe\MasterTcpClient.cs" /> <Compile Include="IO\KangNaiDe\MasterTcpClient.cs" />
<Compile Include="manager\HttpServer.cs" />
<Compile Include="PanasonicServo\ACCMDManager.cs" /> <Compile Include="PanasonicServo\ACCMDManager.cs" />
<Compile Include="PanasonicServo\ACServerManager.cs" /> <Compile Include="PanasonicServo\ACServerManager.cs" />
<Compile Include="PanasonicServo\ACServerManager_Partial.cs" /> <Compile Include="PanasonicServo\ACServerManager_Partial.cs" />
......
...@@ -1616,13 +1616,40 @@ namespace OnlineStore.DeviceLibrary ...@@ -1616,13 +1616,40 @@ namespace OnlineStore.DeviceLibrary
} }
lineOperation.boxStatus.Add(1, boxStatus); lineOperation.boxStatus.Add(1, boxStatus);
//1 定时通信data里面添加boxCanPutIn字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
if (!alarmType.Equals(StoreAlarmType.None)) if (!alarmType.Equals(StoreAlarmType.None))
{ {
lineOperation.alarmList.Add(alarmInfo); lineOperation.alarmList.Add(alarmInfo);
} }
//1 定时通信data里面添加 boxCanPutIn 字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
string canput = BoxCanPutIn() ? "TRUE" : "FALSE";
lineOperation.data.Add("boxCanPutIn", canput);
return lineOperation; return lineOperation;
} }
private bool BoxCanPutIn()
{
if (storeRunStatus< StoreRunStatus.Runing)
{
return false;
}
if (StoreMove.MoveType.Equals(StoreMoveType.OutStore))
{
return false;
}
else if (IOManager.IOValue(IO_Type.LeftShelf_Check).Equals(IO_VALUE.HIGH))
{
return false;
}
else if (IOManager.IOValue(IO_Type.RightShelf_Check).Equals(IO_VALUE.HIGH))
{
return false;
}
return true;
}
public void SendLineStatus() public void SendLineStatus()
{ {
DateTime time = DateTime.Now; DateTime time = DateTime.Now;
......
using OnlineStore.Common; using DeviceLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
...@@ -434,6 +435,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -434,6 +435,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SI_09_MiddleToP3); StoreMove.NextMoveStep(StoreMoveStep.SI_09_MiddleToP3);
InStoreLog("入库: 移动到安全点,前后轴至安全点, [" + moveP.MiddleAxis_Safe_Position + "]"); InStoreLog("入库: 移动到安全点,前后轴至安全点, [" + moveP.MiddleAxis_Safe_Position + "]");
ACAxisMove(Config.Middle_Axis, moveP.MiddleAxis_Safe_Position, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.MiddleAxis_Safe_Position, Config.MiddleAxis_P1_Speed);
InStoreLog("堆垛机取货完成, 通知极创");
HttpServer.ddjPickUpGoodsNotice(StoreMove.MoveParam.PosInfo.PosId);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_09_MiddleToP3) else if (StoreMove.MoveStep == StoreMoveStep.SI_09_MiddleToP3)
...@@ -495,6 +499,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -495,6 +499,10 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.MiddleAxis_Safe_Position, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.MiddleAxis_Safe_Position, Config.MiddleAxis_P1_Speed);
ShelfForward(StoreMove.MoveParam.PosInfo.ShelfType); ShelfForward(StoreMove.MoveParam.PosInfo.ShelfType);
InStoreLog("料箱放入库位完成, 通知极创");
HttpServer.inStorageFeedback(StoreMove.MoveParam.PosInfo.PosId);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_15_UpdownBack) else if (StoreMove.MoveStep == StoreMoveStep.SI_15_UpdownBack)
...@@ -753,10 +761,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -753,10 +761,43 @@ namespace OnlineStore.DeviceLibrary
} }
if (StoreMove.MoveParam.PosInfo.ShelfType > 0) if (StoreMove.MoveParam.PosInfo.ShelfType > 0)
{ {
//StoreMove.NextMoveStep(StoreMoveStep.SO_12_InoutToP2);
//OutStoreLog("出库: 叉子进出料口,进出轴至P2(进料口取料点) [" + moveP.InOut_P2 + "] ");
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
string msg = HttpServer.outIsReady(CID, StoreMove.MoveParam.PosInfo.PosId);
if (msg == "")
{
StoreMove.NextMoveStep(StoreMoveStep.SO_12_InoutToP2);
OutStoreLog("出库: 叉子进出料口,进出轴至P2(进料口取料点) [" + moveP.InOut_P2 + "] ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
}
else
{
WarnMsg = "查询接驳线体放料结果:"+msg;
StoreMove.NextMoveStep(StoreMoveStep.SO_12_WaitCanPut);
OutStoreLog($"出库: 出库时查询接驳线体是否可以放料箱 失败{msg}:等待2秒重新查询 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
}
}
}else if(StoreMove.MoveStep== StoreMoveStep.SO_12_WaitCanPut)
{
string msg = HttpServer.outIsReady(CID, StoreMove.MoveParam.PosInfo.PosId);
if (msg == "")
{
if (WarnMsg.Contains("查询接驳线体放料结果"))
{
WarnMsg = "";
}
StoreMove.NextMoveStep(StoreMoveStep.SO_12_InoutToP2); StoreMove.NextMoveStep(StoreMoveStep.SO_12_InoutToP2);
OutStoreLog("出库: 叉子进出料口,进出轴至P2(进料口取料点) [" + moveP.InOut_P2 + "] "); OutStoreLog("出库: 叉子进出料口,进出轴至P2(进料口取料点) [" + moveP.InOut_P2 + "] ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
} }
else
{
StoreMove.NextMoveStep(StoreMoveStep.SO_12_WaitCanPut);
OutStoreLog($"出库: 出库时查询接驳线体是否可以放料箱 失败{msg}:等待2秒重新查询 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
}
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_12_InoutToP2) else if (StoreMove.MoveStep == StoreMoveStep.SO_12_InoutToP2)
{ {
...@@ -794,6 +835,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -794,6 +835,10 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
OpenDoor(StoreMove.MoveParam.PosInfo.ShelfType); OpenDoor(StoreMove.MoveParam.PosInfo.ShelfType);
ShelfForward(StoreMove.MoveParam.PosInfo.ShelfType, StoreMove); ShelfForward(StoreMove.MoveParam.PosInfo.ShelfType, StoreMove);
InStoreLog("堆垛机放货完成反馈, 通知极创");
HttpServer.ddjReleaseTheGoodsNotice(StoreMove.MoveParam.PosInfo.PosId);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_16_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SO_16_GoBack)
{ {
......

using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace DeviceLibrary
{
public class HttpServer
{
public HttpServer()
{
}
private static string Addr_ddjPickUpGoodsNotice = "/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice";//堆垛机取货完成, 通知极创
private static string Addr_inStorageFeedback = "/rest/api/v2/803/service/store/xl/inStorageFeedback";//料箱放入库位完成, 通知极创
private static string Addr_outIsReady = "/rest/api/v2/803/service/store/xl/outIsReady";//出库时查询接驳线体是否可以放料箱
private static string Addr_ddjReleaseTheGoodsNotice = "/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice";//堆垛机放货完成反馈
// ## 入库:
//1 定时通信data里面添加boxCanPutIn字段表示箱子是否可放上入库线体, 值为字符串"TRUE"时表示可放, 其他为不可放
//2 堆垛机取货完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//3 料箱放入库位完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/inStorageFeedback
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//4 出库时查询接驳线体是否可以放料箱
// http://localhost/rest/api/v2/803/service/store/xl/outIsReady
//请求参数:
//{
//"cid": "001",
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
//5 堆垛机放货完成反馈
//http://localhost/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice
//请求参数:
//{
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
private static string GetAddr(string addr, Dictionary<string, string> paramsMap = null)
{
if (paramsMap == null)
{
paramsMap = new Dictionary<string, string>();
}
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
//server = "http://192.168.1.37:8800/";
if (server.EndsWith("/"))
{
server = server.Substring(0, server.Length - 1);
}
string path = server + addr.Trim() + "?";
foreach (string paramName in paramsMap.Keys)
{
string par = System.Web.HttpUtility.UrlEncode(paramsMap[paramName], System.Text.Encoding.UTF8);
path += paramName + "=" + par + "&";
}
path = path.Substring(0, path.Length - 1);
return path;
}
private static string getData(Dictionary<string, Object> data, string key)
{
if (data.ContainsKey(key))
{
return data[key].ToString().Trim();
}
return "";
}
private static int getIntData(Dictionary<string, Object> data, string key, int defValue = -1)
{
try
{
return Int32.Parse(getData(data, key));
}
catch (Exception ex)
{
}
return -1;
}
private static string PostJson(Dictionary<string, string> paramMap, string addr, string logName, bool needLog = true)
{
DateTime startTime = DateTime.Now;
try
{
string url = GetAddr(addr);
string json = HttpHelper.PostJson(url, paramMap, Encoding.UTF8, 2000);
if (needLog)
{
LogUtil.info("http :URL:" + url + " :Response:" + json + " 耗时[" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "]");
}
else
{
LogUtil.debug("http :URL:" + url + " :Response:" + json + " 耗时[" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "]");
}
ResultData data = JsonHelper.DeserializeJsonToObject<ResultData>(json);
if (data == null)
{
return "未收到服务器反馈";
}
else if (data.code == 0)
{
return "";
}
else
{
LogUtil.error(logName + ": 结果:code=" + data.code + ",msg=" + data.msg);
return data.msg;
}
}
catch (Exception ex)
{
LogUtil.error(logName + " error : " + ex.ToString());
return ex.ToString();
}
}
/// <summary>
/// 堆垛机取货完成, 通知极创
/// </summary>
/// <param name="posName"></param>
/// <returns></returns>
public static string ddjPickUpGoodsNotice(string posName)
{
//2 堆垛机取货完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/ddjPickUpGoodsNotice
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("posName", posName);
return PostJson(paramMap, Addr_ddjPickUpGoodsNotice, "ddjPickUpGoodsNotice", true);
}
/// <summary>
/// 料箱放入库位完成, 通知极创
/// </summary>
/// <param name="posName"></param>
/// <returns></returns>
public static string inStorageFeedback(string posName)
{
//3 料箱放入库位完成, 通知极创
//http://localhost/rest/api/v2/803/service/store/xl/inStorageFeedback
//请求参数:
//{
//"posName": "库位号"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("posName", posName);
return PostJson(paramMap, Addr_inStorageFeedback, "inStorageFeedback", true);
}
/// <summary>
/// 出库时查询接驳线体是否可以放料箱
/// </summary>
/// <param name="cid"></param>
/// <param name="boxCode"></param>
/// <returns></returns>
public static string outIsReady(string cid, string boxCode)
{
//4 出库时查询接驳线体是否可以放料箱
// http://localhost/rest/api/v2/803/service/store/xl/outIsReady
//请求参数:
//{
//"cid": "001",
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("cid", cid);
paramMap.Add("boxCode", boxCode);
return PostJson(paramMap, Addr_outIsReady, "outIsReady", true);
}
/// <summary>
/// 堆垛机放货完成反馈
/// </summary>
/// <param name="boxCode"></param>
/// <returns></returns>
public static string ddjReleaseTheGoodsNotice(string boxCode)
{
//5 堆垛机放货完成反馈
//http://localhost/rest/api/v2/803/service/store/xl/ddjReleaseTheGoodsNotice
//请求参数:
//{
//"boxCode":"CB001"
//}
//返回结果
//{"code":0,"msg":"ok","data":""}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("boxCode", boxCode);
return PostJson(paramMap, Addr_ddjReleaseTheGoodsNotice, "ddjReleaseTheGoodsNotice", true);
}
}
public class ResultData
{
public int code { get; set; }
public string msg { get; set; }
public object data { get; set; }
}
}
...@@ -225,6 +225,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -225,6 +225,12 @@ namespace OnlineStore.DeviceLibrary
SO_12_WaitNoTray=112, SO_12_WaitNoTray=112,
/// <summary> /// <summary>
/// 等待可以放到出料口
/// </summary>
SO_12_WaitCanPut = 113,
/// <summary>
/// 出库:叉子进出料口,,轴3( 叉子) 至P2( 进料口取料点) /// 出库:叉子进出料口,,轴3( 叉子) 至P2( 进料口取料点)
/// /// </summary> /// /// </summary>
SO_12_InoutToP2, SO_12_InoutToP2,
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!