Commit 305ef27a LN

库位更新修改

1 个父辈 8a84738d
......@@ -841,8 +841,9 @@ namespace OnlineStore.DeviceLibrary
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))
{
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + LastShelfData + "】【" + posLoc + "】PutShelfFinished 结果:" + msg);
......@@ -909,9 +910,11 @@ namespace OnlineStore.DeviceLibrary
}
#endregion
else if ( MoveInfo.MoveStep <= StoreMoveStep.SO_01_LocationDown) {
else if (MoveInfo.MoveStep <= StoreMoveStep.SO_01_LocationDown)
{
ShelfEnterProcess();
}else if (MoveInfo.MoveStep >= StoreMoveStep.BS_01_TopDown)
}
else if (MoveInfo.MoveStep >= StoreMoveStep.BS_01_TopDown)
{
ShelfOutProcess();
}
......
......@@ -523,7 +523,8 @@ namespace OnlineStore.DeviceLibrary
string shelfPosID = "";
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.NeedOutShelf = false;
inoutParam.ShelfPosID = shelfPosID;
......
......@@ -324,6 +324,51 @@ namespace OnlineStore.DeviceLibrary
}
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)
{
string message = "";
......@@ -344,6 +389,8 @@ namespace OnlineStore.DeviceLibrary
}
return message;
}
}
public class ServerData
{
......
......@@ -116,11 +116,11 @@ namespace OnlineStore.LoadCSVLibrary
}
listIndex++;
}
result.Add(PositionNum, (T)bllIns);
if (storeId > 0 && ((T)bllIns).StoreId <= 0)
{
((T)bllIns).StoreId = storeId;
}
result.Add(PositionNum, (T)bllIns);
if (!AllPositionMap.ContainsKey(tname))
{
AllPositionMap.Add(tname, new Dictionary<string, T>());
......@@ -355,7 +355,7 @@ namespace OnlineStore.LoadCSVLibrary
newPosId = louceng + storeId + oldPosId.Substring(4, oldPosId.Length - 4);
}
position.PositionNum = newPosId;
position.StoreId = storeIndex;
// position.StoreId = storeIndex;
string newValue = PostionToString(position, titleIndex, proTitleMap);
lines[index] = newValue;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!