Commit 65166571 张东亮

包装仓入库逻辑优化

1 个父辈 e8dd2942
......@@ -162,6 +162,7 @@ namespace OnlineStore.DeviceLibrary
if (instoreShelf)
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_10_StartGetTray);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000));
//获取料架的锁定状态
bool lockState = StoreManager.GetShelfLockInfo(Name,CID, CurrShelfID, out MoveInfo.shelfLockDatas);
......@@ -169,14 +170,14 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.IsShelfLocked = true;
InOutStoreLog(moveName + MoveInfo.SLog + "开始到料架指定位置取料盘 ");
InOutStoreLog(moveName + MoveInfo.SLog + "开始到料架指定位置取料盘 ");
}
else
{
MoveInfo.IsShelfLocked = false;
InOutStoreLog(moveName + MoveInfo.SLog + "开始循环料架取料盘 ");
}
MoveInfo.EndStepWait();
}
else
{
......@@ -690,7 +691,7 @@ namespace OnlineStore.DeviceLibrary
#region 扫码获取库位
/// <summary>
/// 扫码枪数据接收
/// 数据接收
/// </summary>
/// <param name="message"></param>
private bool GetPosIdByCode()
......@@ -701,7 +702,8 @@ namespace OnlineStore.DeviceLibrary
{
LastWidth = 7;
}
string message = StoreManager.ProcessCode(LastWidth, LastHeight, LastScanCodes);
//string message = StoreManager.ProcessCode(LastWidth, LastHeight, LastScanCodes);
string message = MoveInfo.shelfLockDatas[MoveInfo.currShelfIndex].barcode;
if (message.Equals("") || string.IsNullOrEmpty(message))
{
CodeMsg = "未扫到二维码";
......@@ -719,7 +721,7 @@ namespace OnlineStore.DeviceLibrary
//发送扫码内容到服务器进行入库操作
Operation operation = getLineBoxStatus();
operation.op = 1;
operation.data = new Dictionary<string, string>() { { "code", message }, { "boxId", 1.ToString() }, { ParamDefine.rfid, CurrShelfID }, { "cids", Config.All_CIDs.Replace('#', ',') } };
operation.data = new Dictionary<string, string>() { { "code", message }, { "boxId", 1.ToString() }, { ParamDefine.rfid, CurrShelfID }};
string server = ConfigAppSettings.GetValue(Setting_Init.http_server);
Operation resultOperation = HttpHelper.Post(StoreManager.GetPostApi(server), operation, false);
if (resultOperation == null)
......
......@@ -562,7 +562,7 @@ namespace OnlineStore.DeviceLibrary
private static string Addr_getShelfLockInfo = "/rest/api/qisda/device/getShelfLockInfo"; //包装仓获取料架锁定状态地址
public static bool GetShelfLockInfo(string deviceName, string cid,string rfid,out List<ShelfLockData> shelfLockDatas)
public static bool GetShelfLockInfo(string deviceName, string cid, string rfid, out List<ShelfLockData> shelfLockDatas)
{
string msg = "";
shelfLockDatas = null;
......@@ -576,7 +576,7 @@ namespace OnlineStore.DeviceLibrary
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "料架锁定状态 " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
LogUtil.info(deviceName + " 料架锁定状态 " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
ShelfLockInfo serverResult = JsonHelper.DeserializeJsonToObject<ShelfLockInfo>(resultStr);
if (serverResult == null)
{
......@@ -585,9 +585,9 @@ namespace OnlineStore.DeviceLibrary
return false;
}
if (serverResult.data.Count ==0) //该料架未锁定
if (serverResult.data.Count == 0) //该料架未锁定
{
msg = deviceName + " 料架【"+rfid+"】 没有锁定库位的料";
msg = deviceName + " 料架【" + rfid + "】 没有被锁定";
LogUtil.info(msg);
return false;
}
......@@ -597,14 +597,14 @@ namespace OnlineStore.DeviceLibrary
string plates = "";
foreach (ShelfLockData item in serverResult.data)
{
LogUtil.info("锁定的CID="+item.cid+";当前CID="+cid);
if(item.cid.Equals(cid))//该料盘属于此料仓
LogUtil.info("锁定的CID=" + item.cid + "; 当前CID=" + cid);
if (item.cid.Equals(cid))//该料盘属于此料仓
{
shelfLockDatas.Add(item);
plates += "["+item.lockPos+"]# ";
plates += item.lockPos + "# ";
}
}
msg = deviceName + " 料架【" + rfid + "】 在该料仓锁定库位的料:【"+plates+"】";
msg = deviceName + " 料架【" + rfid + "】 在该料仓锁定库位的有:【" + plates + "】";
LogUtil.info(msg);
return true;
}
......@@ -618,7 +618,7 @@ namespace OnlineStore.DeviceLibrary
private static string Addr_PosForPutin = "/service/store/emptyPosForPutin"; //获取当前料盘属于的料仓编号
public static bool GetPosForPutIn(string deviceName,AC_BOX_Config boxConfig,string barcode,string rfid,int rfidLoc)
public static bool GetPosForPutIn(string deviceName, AC_BOX_Config boxConfig, string barcode, string rfid, int rfidLoc)
{
string msg = "";
try
......@@ -628,7 +628,7 @@ namespace OnlineStore.DeviceLibrary
// 参数:cids: 多个 cid
//code: 条码内容
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("cids",boxConfig.All_CIDs.Replace('#',','));
paramMap.Add("cids", boxConfig.All_CIDs.Replace('#', ','));
paramMap.Add("code", barcode);
paramMap.Add(ParamDefine.rfid, rfid);
paramMap.Add("rfidLoc", rfidLoc.ToString());
......@@ -647,7 +647,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(msg);
return false;
}
else if ((!string.IsNullOrEmpty(serverResult.msg)) || serverResult.result.Equals(0).Equals(false))
else if ((!string.IsNullOrEmpty(serverResult.msg)) || serverResult.result.Equals(0).Equals(false))
{
msg = deviceName + " 【" + barcode + "】结果:" + serverResult.msg;
LogUtil.info(msg);
......@@ -664,7 +664,7 @@ namespace OnlineStore.DeviceLibrary
//第9和第10位表示隔板位置(04)
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置
msg = deviceName + " 料盘【" + barcode + "】属于该料仓【"+boxConfig.CID+"】";
msg = deviceName + " 料盘【" + barcode + "】属于该料仓【" + boxConfig.CID + "】";
LogUtil.info(msg);
return true;
......
......@@ -134,7 +134,7 @@ namespace OnlineStore.LoadCSVLibrary
}
else
{
LogUtil.error("读取csv,index=" + index + ",数据格式不匹配!,line=" + line);
LogUtil.error("读取"+ filePath + ",index=" + index + ",数据格式不匹配!,line=" + line);
}
}
catch (Exception ex)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!