Commit 2548f595 LN

库位格式修改

1 个父辈 6d290bbc
......@@ -11,6 +11,7 @@ PRO,0,升降轴(轴2)进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P
PRO,0,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,893,,,,,,,,,,,,
PRO,0,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,100,,,,,,,,,,,,
PRO,0,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,10000,,,,,,,,,,,,
PRO,0,压紧轴(轴4)P2压紧点列表,CompAxis_P2_List,8=9400;,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,1000,,,,,,,,,,,,
PRO,0,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,500,,,,,,,,,,,,
......
......@@ -245,57 +245,56 @@ namespace OnlineStore.LoadCSVLibrary
{
try
{
// 仓位命名: 4D01020304
//第1和第2位表示楼层(4D)
//第3和第4位表示料仓(01) 01 - 18为流水线料仓, 19 - 24为包装料仓
//第5和第6位表示列(02)
//第7和第8位表示行(AA=01,BB=02,CC=03,DD=04)
//第10,11,12,13位表示隔板位置()
//例如: 4D1201AA0024 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
//3D0101AA0001
//3D01020304
// 仓位命名: D101AA0024
//第1和第2位表示料仓名称D1-D6
//第3和第4位表示列(02)
//第5和第6位表示行(AA=01,BB=02,CC=03,DD=04)
//第7,8,9,10位表示隔板位置()
//例如: D101AA0024 表示4楼12号料仓第1列第1行架子上的第24个隔板位置
string oldPosId = position.PositionNum;//3D01020304
string newPosId = "";
int strLength = oldPosId.Length;
string louceng = "3D";
string storeId = storeIndex.ToString().PadLeft(2, '0');
//string louceng = "3D";
string storeId ="D"+ storeIndex.ToString().PadLeft(1, '0');
if (strLength.Equals(10))
{
string[] hengStr = oldPosId.Split('_');
string lieStr = oldPosId.Substring(4, 2);
int hang = Convert.ToInt32(Convert.ToInt32(oldPosId.Substring(6, 2)));
string pStr = oldPosId.Substring(8, 2);
string hangStr = "AA";
if (hang.Equals(1))
{
hangStr = "AA";
}
else if (hang.Equals(2))
{
hangStr = "BB";
}
else if (hang.Equals(3))
{
hangStr = "CC";
}
else if (hang.Equals(4))
{
hangStr = "DD";
}
else if (hang.Equals(5))
{
hangStr = "EE";
}
else if (hang.Equals(6))
{
hangStr = "FF";
}
newPosId = louceng + storeId + lieStr + hangStr + "00" + pStr;
//string lieStr = oldPosId.Substring(2, 2);
//int hang = Convert.ToInt32(Convert.ToInt32(oldPosId.Substring(4, 2)));
//string pStr = oldPosId.Substring(6, 4);
//string hangStr = "AA";
//if (hang.Equals(1))
//{
// hangStr = "AA";
//}
//else if (hang.Equals(2))
//{
// hangStr = "BB";
//}
//else if (hang.Equals(3))
//{
// hangStr = "CC";
//}
//else if (hang.Equals(4))
//{
// hangStr = "DD";
//}
//else if (hang.Equals(5))
//{
// hangStr = "EE";
//}
//else if (hang.Equals(6))
//{
// hangStr = "FF";
//}
newPosId = storeId + oldPosId.Substring(2, oldPosId.Length - 2);
}
else
{
newPosId = louceng + storeId + oldPosId.Substring(4, oldPosId.Length - 4);
newPosId = storeId + oldPosId.Substring(4, oldPosId.Length - 4);
}
// position.PositionNum = storeIndex.ToString().PadLeft(2, '0') + position.PositionNum.Substring(jIndex);
position.PositionNum = newPosId;
......@@ -308,12 +307,7 @@ namespace OnlineStore.LoadCSVLibrary
LogUtil.error("更新【" + filePath + "】位置出错【" + line + "】"+ex.ToString());
}
}
//if (value.Equals(position.PositionNum))
//{
// //更新缓存
// allPositionMap.Remove(position.PositionNum);
// allPositionMap.Add(position.PositionNum, position);
//}
}
}
index++;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!