Commit 9118cbb3 几米阳光

自动出入库修改

1 个父辈 d5b2695f
...@@ -134,11 +134,11 @@ namespace OnlineStore.ACSingleStore ...@@ -134,11 +134,11 @@ namespace OnlineStore.ACSingleStore
btnOutStore.Enabled = isOpen; btnOutStore.Enabled = isOpen;
btnInStore.Enabled = isOpen; btnInStore.Enabled = isOpen;
btnAxisAMove.Enabled = isOpen; //btnAxisAMove.Enabled = isOpen;
btnAxisReturnHome.Enabled = isOpen; //btnAxisReturnHome.Enabled = isOpen;
btnAxisRMove.Enabled = isOpen; //btnAxisRMove.Enabled = isOpen;
btnAxisVMove.Enabled = isOpen; //btnAxisVMove.Enabled = isOpen;
启动ToolStripMenuItem.Enabled = !isOpen; 启动ToolStripMenuItem.Enabled = !isOpen;
停止ToolStripMenuItem.Enabled = isOpen; 停止ToolStripMenuItem.Enabled = isOpen;
...@@ -910,6 +910,7 @@ namespace OnlineStore.ACSingleStore ...@@ -910,6 +910,7 @@ namespace OnlineStore.ACSingleStore
{ {
int currIndex = cmbPosition.SelectedIndex; int currIndex = cmbPosition.SelectedIndex;
store.autoPositionIndex = currIndex; store.autoPositionIndex = currIndex;
store.AutoStartIndex = currIndex;
string poText = cmbPosition.Text; string poText = cmbPosition.Text;
store.autoMsg = "自动出库:" + poText; store.autoMsg = "自动出库:" + poText;
LogUtil.info(LOGGER, store.StoreName + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!"); LogUtil.info(LOGGER, store.StoreName + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!");
......
...@@ -25,6 +25,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -25,6 +25,7 @@ namespace OnlineStore.DeviceLibrary
public int autoJiange = 3; public int autoJiange = 3;
public int autoPositionIndex = 0; public int autoPositionIndex = 0;
public string autoMsg = ""; public string autoMsg = "";
public int AutoStartIndex = -1;
#endregion #endregion
#region 出入库参数 #region 出入库参数
...@@ -821,16 +822,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -821,16 +822,24 @@ namespace OnlineStore.DeviceLibrary
if (storeMoveType.Equals(StoreMoveType.InStore)) if (storeMoveType.Equals(StoreMoveType.InStore))
{ {
int newIndex = autoPositionIndex - 1; int newIndex = autoPositionIndex - 1;
if (autoJiange == 0) //if (autoJiange == 0)
//{
// newIndex = autoPositionIndex;
//}
if (newIndex < 0)
{ {
newIndex = autoPositionIndex; if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
{
newIndex = AutoStartIndex;
LogUtil.info(LOGGER, StoreName + "下一个索引不存在,重新开始自动出入库,索引【" + AutoStartIndex + "】");
} }
if (newIndex < 0) else
{ {
autoNext = false; autoNext = false;
autoMsg = "自动出入库结束!"; autoMsg = "自动出入库结束!";
LogUtil.info(LOGGER, StoreName + "下一个索引不存在,自动 出入库结束!"); LogUtil.info(LOGGER, StoreName + "下一个索引不存在,自动 出入库结束!");
} }
}
else else
{ {
autoPositionIndex = newIndex; autoPositionIndex = newIndex;
...@@ -864,10 +873,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -864,10 +873,18 @@ namespace OnlineStore.DeviceLibrary
int newIndex = autoPositionIndex - autoJiange; int newIndex = autoPositionIndex - autoJiange;
if (newIndex < 0) if (newIndex < 0)
{ {
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
{
newIndex = AutoStartIndex;
LogUtil.info(LOGGER, StoreName + "下一个索引不存在,重新开始自动出入库,索引【" + AutoStartIndex + "】");
}
else
{
autoNext = false; autoNext = false;
autoMsg = "自动出入库结束!"; autoMsg = "自动出入库结束!";
LogUtil.info(LOGGER, StoreName + "下一个索引不存在,自动 出入库结束!"); LogUtil.info(LOGGER, StoreName + "下一个索引不存在,自动 出入库结束!");
} }
}
else else
{ {
string posid = PositionNumList[newIndex]; string posid = PositionNumList[newIndex];
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!