Commit 4f859e02 LN

入库使用服务器返回的尺寸

1 个父辈 a0a89200
......@@ -22,6 +22,8 @@ namespace OnlineStore.Common
{
// //{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"}
// 返回: {"code": 0, "msg":"ok", data:7}
// resultMap.put("plateW",dataLog.getW());
//resultMap.put("plateH",dataLog.getH());
/// <summary>
/// 0=成功
/// </summary>
......@@ -30,7 +32,8 @@ namespace OnlineStore.Common
public string msg = "";
public string pos = "";
public string barcode = "";
public string plateW = "";
public string plateH = "";
}
/// <summary>
/// 与服务器通信用对象
......
......@@ -9,6 +9,19 @@ namespace OnlineStore.Common
{
public class FormUtil
{
public static int GetIntValue(String text)
{
int value = 0;
try
{
value = int.Parse(text);
}
catch (Exception ex)
{
value = 0;
}
return value;
}
public static int GetIntValue(TextBox txt)
{
int value = 0;
......
......@@ -599,6 +599,18 @@ namespace OnlineStore.DeviceLibrary
{
if (cc.TrayNumber.Equals(currTrayNum) && (!cc.WareCode.Equals("")))
{
//TODO 需要判断托盘的料盘信息与入库的是否一致
TrayInfo trayInfo = TrayManager.GetTrayInfo(currTrayNum);
if (trayInfo.IsFull && trayInfo.InOrOutStore.Equals(1) && trayInfo.InoutPar.PosId.Equals(cc.PosId)){
}
else
{
LogUtil.error(Name + "托盘号【" + currTrayNum + "】的入库任务【" + cc.ToStr() + "】与托盘实际信息不一致:【" + trayInfo.ToStr() + "】不拦截托盘入库");
return false;
}
//if (LineManager.useTrayCheck.Contains(DeviceID) && IOValue(IO_Type.TrayCheck).Equals(IO_VALUE.LOW))
//{
// LogInfo(" 入库需拦截有料托盘【 " + currTrayNum + "】,有料托盘料盘检测信号不亮,禁用托盘");
......
......@@ -504,6 +504,8 @@ namespace OnlineStore.DeviceLibrary
return result;
}
//{"result":"0","msg":"","pos":"11#AC1_18_4_28","barcode":"R506072019102200414","cid":"line-ac-11"}
//resultMap.put("plateW", dataLog.getW());
//resultMap.put("plateH", dataLog.getH());
LineOperation serverResult = JsonHelper.DeserializeJsonToObject<LineOperation>(resultStr);
if (serverResult == null)
......@@ -539,6 +541,16 @@ namespace OnlineStore.DeviceLibrary
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
string posId = serverResult.pos;
int pH = FormUtil.GetIntValue(serverResult.plateH);
int pW = FormUtil.GetIntValue(serverResult.plateW);
if (pH > 0)
{
height = pH;
}
if (pW > 0)
{
width = pW;
}
//根据库位号查找移栽
// 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!