Commit 305ef27a LN

库位更新修改

1 个父辈 8a84738d
...@@ -800,7 +800,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -800,7 +800,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_06_BagDeviceBack) else if (MoveInfo.MoveStep == StoreMoveStep.SO_06_BagDeviceBack)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition); MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition);
InOutStoreLog("出库 " + MoveInfo.SLog + ":走到料架位置,旋转轴至P101,升降轴至P102, "); InOutStoreLog("出库 " + MoveInfo.SLog + ":走到料架位置,旋转轴至P101,升降轴至P102, ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P102_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P102_Speed);
...@@ -841,8 +841,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -841,8 +841,9 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
int posLoc = ShelfPosList.IndexOf(MoveInfo.MoveParam.ShelfPosID);
string msg = StoreManager.PutShelfFinished(Name, MoveInfo.MoveParam.WareCode, LastShelfData.NumStr(), posLoc .ToString(), out serverShelfData); int posLoc = StoreManager.GetLocByShelfPosID(MoveInfo.MoveParam.ShelfPosID, ShelfPosList);
string msg = StoreManager.PutShelfFinished(Name, MoveInfo.MoveParam.WareCode, LastShelfData.NumStr(), posLoc.ToString(), out serverShelfData);
if (String.IsNullOrEmpty(msg).Equals(false)) if (String.IsNullOrEmpty(msg).Equals(false))
{ {
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + LastShelfData + "】【" + posLoc + "】PutShelfFinished 结果:" + msg); LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + LastShelfData + "】【" + posLoc + "】PutShelfFinished 结果:" + msg);
...@@ -874,7 +875,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -874,7 +875,7 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("出库完成,自动出入库启动中,不需要送出料架"); InOutStoreLog("出库完成,自动出入库启动中,不需要送出料架");
isNeedSend = false; isNeedSend = false;
} }
else if (EmprtShelfList.Count <= 0) else if (EmprtShelfList.Count <= 0)
{ {
InOutStoreLog("出库完成,料架【" + LastShelfData + "】没有剩余位置,送出料架"); InOutStoreLog("出库完成,料架【" + LastShelfData + "】没有剩余位置,送出料架");
isNeedSend = true; isNeedSend = true;
...@@ -906,12 +907,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -906,12 +907,14 @@ namespace OnlineStore.DeviceLibrary
MoveEndToRuningStatus(); MoveEndToRuningStatus();
AutoInout.InOutEndProcess(this, StoreMoveType.OutStore); AutoInout.InOutEndProcess(this, StoreMoveType.OutStore);
} }
} }
#endregion #endregion
else if ( MoveInfo.MoveStep <= StoreMoveStep.SO_01_LocationDown) { else if (MoveInfo.MoveStep <= StoreMoveStep.SO_01_LocationDown)
{
ShelfEnterProcess(); ShelfEnterProcess();
}else if (MoveInfo.MoveStep >= StoreMoveStep.BS_01_TopDown) }
else if (MoveInfo.MoveStep >= StoreMoveStep.BS_01_TopDown)
{ {
ShelfOutProcess(); ShelfOutProcess();
} }
......
...@@ -523,7 +523,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -523,7 +523,8 @@ namespace OnlineStore.DeviceLibrary
string shelfPosID = ""; string shelfPosID = "";
if (inoutParam.rfidLoc > 0 && ShelfPosList.Count >= inoutParam.rfidLoc) if (inoutParam.rfidLoc > 0 && ShelfPosList.Count >= inoutParam.rfidLoc)
{ {
shelfPosID = ShelfPosList[inoutParam.rfidLoc - 1]; shelfPosID = StoreManager.GetShelfIDByLoc(inoutParam.rfidLoc, ShelfPosList);
// shelfPosID = ShelfPosList[inoutParam.rfidLoc - 1];
inoutParam.NeedEnterShelf = false; inoutParam.NeedEnterShelf = false;
inoutParam.NeedOutShelf = false; inoutParam.NeedOutShelf = false;
inoutParam.ShelfPosID = shelfPosID; inoutParam.ShelfPosID = shelfPosID;
......
...@@ -324,6 +324,51 @@ namespace OnlineStore.DeviceLibrary ...@@ -324,6 +324,51 @@ namespace OnlineStore.DeviceLibrary
} }
return ""; return "";
} }
public static int GetLocByShelfPosID(string shelfId, List<String> shelfPosList)
{
int loc = -1;
try
{
if (shelfId.Length == 3)
{
loc = int.Parse(shelfId.Substring(2, 1));
}
}
catch (Exception ex)
{
}
if (loc <= 0)
{
loc = shelfPosList.IndexOf(shelfId);
}
return loc;
}
internal static string GetShelfIDByLoc(int rfidLoc, List<string> shelfPosList)
{
string shelfId = "";
try
{
foreach (string id in shelfPosList)
{
if (id.Length == 3 && id.Substring(2, 1).Equals(rfidLoc.ToString()))
{
shelfId = id;
break;
}
}
}
catch (Exception ex)
{
}
if (shelfId.Equals("") && rfidLoc > 0 && rfidLoc <= shelfPosList.Count)
{
shelfId = shelfPosList[rfidLoc - 1];
}
return shelfId;
}
public static string ProcessCode(int LastWidth,int LastHeight,List<string> LastScanCodes) public static string ProcessCode(int LastWidth,int LastHeight,List<string> LastScanCodes)
{ {
string message = ""; string message = "";
...@@ -344,6 +389,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -344,6 +389,8 @@ namespace OnlineStore.DeviceLibrary
} }
return message; return message;
} }
} }
public class ServerData public class ServerData
{ {
......
...@@ -116,11 +116,11 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -116,11 +116,11 @@ namespace OnlineStore.LoadCSVLibrary
} }
listIndex++; listIndex++;
} }
result.Add(PositionNum, (T)bllIns);
if (storeId > 0 && ((T)bllIns).StoreId <= 0) if (storeId > 0 && ((T)bllIns).StoreId <= 0)
{ {
((T)bllIns).StoreId = storeId; ((T)bllIns).StoreId = storeId;
} }
result.Add(PositionNum, (T)bllIns);
if (!AllPositionMap.ContainsKey(tname)) if (!AllPositionMap.ContainsKey(tname))
{ {
AllPositionMap.Add(tname, new Dictionary<string, T>()); AllPositionMap.Add(tname, new Dictionary<string, T>());
...@@ -355,7 +355,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -355,7 +355,7 @@ namespace OnlineStore.LoadCSVLibrary
newPosId = louceng + storeId + oldPosId.Substring(4, oldPosId.Length - 4); newPosId = louceng + storeId + oldPosId.Substring(4, oldPosId.Length - 4);
} }
position.PositionNum = newPosId; position.PositionNum = newPosId;
position.StoreId = storeIndex; // position.StoreId = storeIndex;
string newValue = PostionToString(position, titleIndex, proTitleMap); string newValue = PostionToString(position, titleIndex, proTitleMap);
lines[index] = newValue; lines[index] = newValue;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!