Commit 8fe7045d LN

新料仓ID号为25,26

1 个父辈 05fd6ac8
...@@ -273,6 +273,9 @@ ...@@ -273,6 +273,9 @@
</Content> </Content>
<Content Include="box.ico" /> <Content Include="box.ico" />
<Content Include="DfIcon.ico" /> <Content Include="DfIcon.ico" />
<EmbeddedResource Include="image\line.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<Content Include="记录.txt" /> <Content Include="记录.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
...@@ -287,9 +290,7 @@ ...@@ -287,9 +290,7 @@
<Install>false</Install> <Install>false</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup />
<Folder Include="image\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
...@@ -60,7 +60,11 @@ namespace OnlineStore.AssemblyLine ...@@ -60,7 +60,11 @@ namespace OnlineStore.AssemblyLine
lblBox.Text = "料仓连接信息:\r\n"; lblBox.Text = "料仓连接信息:\r\n";
msg = ""; msg = "";
List<int> list = new List<int>(LineManager.Line.MoveEquipMap.Keys); List<int> list = new List<int>();
foreach(MoveEquip move in LineManager.Line.MoveEquipMap.Values)
{
list.Add(move.StoreID);
}
foreach (int storeId in list) foreach (int storeId in list)
{ {
......
...@@ -59,14 +59,6 @@ ...@@ -59,14 +59,6 @@
this.cmbTray = new System.Windows.Forms.ComboBox(); this.cmbTray = new System.Windows.Forms.ComboBox();
this.btnUpdateTray = new System.Windows.Forms.Button(); this.btnUpdateTray = new System.Windows.Forms.Button();
this.lblMoveInfo = new System.Windows.Forms.Label(); this.lblMoveInfo = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblPosId = new System.Windows.Forms.Label();
this.btnUpdateStatus = new System.Windows.Forms.Button();
this.txtPosId = new System.Windows.Forms.TextBox();
this.cmbBoxIndex = new System.Windows.Forms.ComboBox();
this.btnInStoreTset = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.picLine = new System.Windows.Forms.PictureBox(); this.picLine = new System.Windows.Forms.PictureBox();
this.lblStatus = new System.Windows.Forms.Label(); this.lblStatus = new System.Windows.Forms.Label();
...@@ -121,7 +113,6 @@ ...@@ -121,7 +113,6 @@
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picLine)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.picLine)).BeginInit();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
...@@ -151,10 +142,9 @@ ...@@ -151,10 +142,9 @@
this.tabPage1.Controls.Add(this.groupBox2); this.tabPage1.Controls.Add(this.groupBox2);
this.tabPage1.Controls.Add(this.listView1); this.tabPage1.Controls.Add(this.listView1);
this.tabPage1.Controls.Add(this.logBox); this.tabPage1.Controls.Add(this.logBox);
this.tabPage1.Controls.Add(this.lblCID);
this.tabPage1.Controls.Add(this.groupBox3); this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.lblCID);
this.tabPage1.Controls.Add(this.lblMoveInfo); this.tabPage1.Controls.Add(this.lblMoveInfo);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Location = new System.Drawing.Point(4, 29);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(1328, 609); this.tabPage1.Size = new System.Drawing.Size(1328, 609);
...@@ -366,7 +356,7 @@ ...@@ -366,7 +356,7 @@
this.groupBox3.Controls.Add(this.cmbTray); this.groupBox3.Controls.Add(this.cmbTray);
this.groupBox3.Controls.Add(this.btnUpdateTray); this.groupBox3.Controls.Add(this.btnUpdateTray);
this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(720, 159); this.groupBox3.Location = new System.Drawing.Point(720, 167);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(600, 61); this.groupBox3.Size = new System.Drawing.Size(600, 61);
this.groupBox3.TabIndex = 197; this.groupBox3.TabIndex = 197;
...@@ -481,99 +471,6 @@ ...@@ -481,99 +471,6 @@
this.lblMoveInfo.TabIndex = 196; this.lblMoveInfo.TabIndex = 196;
this.lblMoveInfo.Text = "CID"; this.lblMoveInfo.Text = "CID";
// //
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.lblPosId);
this.groupBox1.Controls.Add(this.btnUpdateStatus);
this.groupBox1.Controls.Add(this.txtPosId);
this.groupBox1.Controls.Add(this.cmbBoxIndex);
this.groupBox1.Controls.Add(this.btnInStoreTset);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(448, 167);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(872, 61);
this.groupBox1.TabIndex = 195;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "料仓通信测试";
this.groupBox1.Visible = false;
//
// lblPosId
//
this.lblPosId.AutoSize = true;
this.lblPosId.Location = new System.Drawing.Point(366, 35);
this.lblPosId.Name = "lblPosId";
this.lblPosId.Size = new System.Drawing.Size(40, 20);
this.lblPosId.TabIndex = 197;
this.lblPosId.Text = "库位:";
//
// btnUpdateStatus
//
this.btnUpdateStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnUpdateStatus.BackColor = System.Drawing.Color.White;
this.btnUpdateStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdateStatus.Location = new System.Drawing.Point(641, 11);
this.btnUpdateStatus.Name = "btnUpdateStatus";
this.btnUpdateStatus.Size = new System.Drawing.Size(222, 35);
this.btnUpdateStatus.TabIndex = 195;
this.btnUpdateStatus.Text = "更改为调试状态";
this.btnUpdateStatus.UseVisualStyleBackColor = false;
this.btnUpdateStatus.Click += new System.EventHandler(this.btnUpdateStatus_Click);
//
// txtPosId
//
this.txtPosId.Location = new System.Drawing.Point(426, 32);
this.txtPosId.Name = "txtPosId";
this.txtPosId.Size = new System.Drawing.Size(80, 26);
this.txtPosId.TabIndex = 196;
//
// cmbBoxIndex
//
this.cmbBoxIndex.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbBoxIndex.FormattingEnabled = true;
this.cmbBoxIndex.Location = new System.Drawing.Point(272, 31);
this.cmbBoxIndex.Name = "cmbBoxIndex";
this.cmbBoxIndex.Size = new System.Drawing.Size(85, 28);
this.cmbBoxIndex.TabIndex = 195;
//
// btnInStoreTset
//
this.btnInStoreTset.BackColor = System.Drawing.Color.White;
this.btnInStoreTset.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInStoreTset.Location = new System.Drawing.Point(515, 28);
this.btnInStoreTset.Name = "btnInStoreTset";
this.btnInStoreTset.Size = new System.Drawing.Size(105, 35);
this.btnInStoreTset.TabIndex = 194;
this.btnInStoreTset.Text = "入库测试";
this.btnInStoreTset.UseVisualStyleBackColor = false;
this.btnInStoreTset.Click += new System.EventHandler(this.btnInStoreTset_Click);
//
// button2
//
this.button2.BackColor = System.Drawing.Color.White;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Location = new System.Drawing.Point(118, 28);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(105, 35);
this.button2.TabIndex = 193;
this.button2.Text = "停止服务";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.BackColor = System.Drawing.Color.White;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(11, 28);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(105, 35);
this.button1.TabIndex = 192;
this.button1.Text = "启动服务";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.picLine); this.tabPage2.Controls.Add(this.picLine);
...@@ -753,7 +650,7 @@ ...@@ -753,7 +650,7 @@
// 扫码测试ToolStripMenuItem // 扫码测试ToolStripMenuItem
// //
this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem"; this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem";
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.扫码测试ToolStripMenuItem.Text = "扫码测试"; this.扫码测试ToolStripMenuItem.Text = "扫码测试";
this.扫码测试ToolStripMenuItem.Visible = false; this.扫码测试ToolStripMenuItem.Visible = false;
this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click); this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click);
...@@ -761,32 +658,32 @@ ...@@ -761,32 +658,32 @@
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator6.Visible = false; this.toolStripSeparator6.Visible = false;
// //
// 二维码学习ToolStripMenuItem // 二维码学习ToolStripMenuItem
// //
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem"; this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习"; this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click); this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(173, 6);
// //
// toolStripMenuItem3 // toolStripMenuItem3
// //
this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 26); this.toolStripMenuItem3.Size = new System.Drawing.Size(176, 26);
this.toolStripMenuItem3.Text = "查看禁用托盘"; this.toolStripMenuItem3.Text = "查看禁用托盘";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
// //
// 托盘初始化ToolStripMenuItem // 托盘初始化ToolStripMenuItem
// //
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem"; this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码"; this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
this.托盘初始化ToolStripMenuItem.Visible = false; this.托盘初始化ToolStripMenuItem.Visible = false;
this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click); this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click);
...@@ -794,13 +691,13 @@ ...@@ -794,13 +691,13 @@
// toolStripSeparator9 // toolStripSeparator9
// //
this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator9.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator9.Visible = false; this.toolStripSeparator9.Visible = false;
// //
// iO模块状态ToolStripMenuItem // iO模块状态ToolStripMenuItem
// //
this.iO模块状态ToolStripMenuItem.Name = "iO模块状态ToolStripMenuItem"; this.iO模块状态ToolStripMenuItem.Name = "iO模块状态ToolStripMenuItem";
this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.iO模块状态ToolStripMenuItem.Text = "IO模块状态"; this.iO模块状态ToolStripMenuItem.Text = "IO模块状态";
this.iO模块状态ToolStripMenuItem.Visible = false; this.iO模块状态ToolStripMenuItem.Visible = false;
this.iO模块状态ToolStripMenuItem.Click += new System.EventHandler(this.iO模块状态ToolStripMenuItem_Click); this.iO模块状态ToolStripMenuItem.Click += new System.EventHandler(this.iO模块状态ToolStripMenuItem_Click);
...@@ -808,13 +705,13 @@ ...@@ -808,13 +705,13 @@
// toolStripSeparator13 // toolStripSeparator13
// //
this.toolStripSeparator13.Name = "toolStripSeparator13"; this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator13.Size = new System.Drawing.Size(173, 6);
this.toolStripSeparator13.Visible = false; this.toolStripSeparator13.Visible = false;
// //
// toolStripMenuItem2 // toolStripMenuItem2
// //
this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 26); this.toolStripMenuItem2.Size = new System.Drawing.Size(176, 26);
this.toolStripMenuItem2.Text = "AGV调试"; this.toolStripMenuItem2.Text = "AGV调试";
this.toolStripMenuItem2.Visible = false; this.toolStripMenuItem2.Visible = false;
this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click);
...@@ -822,24 +719,24 @@ ...@@ -822,24 +719,24 @@
// toolStripSeparator14 // toolStripSeparator14
// //
this.toolStripSeparator14.Name = "toolStripSeparator14"; this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator14.Size = new System.Drawing.Size(173, 6);
// //
// 查看托盘信息ToolStripMenuItem // 查看托盘信息ToolStripMenuItem
// //
this.查看托盘信息ToolStripMenuItem.Name = "查看托盘信息ToolStripMenuItem"; this.查看托盘信息ToolStripMenuItem.Name = "查看托盘信息ToolStripMenuItem";
this.查看托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.查看托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.查看托盘信息ToolStripMenuItem.Text = "查看托盘信息"; this.查看托盘信息ToolStripMenuItem.Text = "查看托盘信息";
this.查看托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.btnTrayInfo_Click); this.查看托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.btnTrayInfo_Click);
// //
// toolStripSeparator12 // toolStripSeparator12
// //
this.toolStripSeparator12.Name = "toolStripSeparator12"; this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator12.Size = new System.Drawing.Size(173, 6);
// //
// 清空托盘信息ToolStripMenuItem // 清空托盘信息ToolStripMenuItem
// //
this.清空托盘信息ToolStripMenuItem.Name = "清空托盘信息ToolStripMenuItem"; this.清空托盘信息ToolStripMenuItem.Name = "清空托盘信息ToolStripMenuItem";
this.清空托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.清空托盘信息ToolStripMenuItem.Size = new System.Drawing.Size(176, 26);
this.清空托盘信息ToolStripMenuItem.Text = "清空托盘信息"; this.清空托盘信息ToolStripMenuItem.Text = "清空托盘信息";
this.清空托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.清空托盘信息ToolStripMenuItem_Click); this.清空托盘信息ToolStripMenuItem.Click += new System.EventHandler(this.清空托盘信息ToolStripMenuItem_Click);
// //
...@@ -980,8 +877,6 @@ ...@@ -980,8 +877,6 @@
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false); this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout(); this.groupBox3.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tabPage2.ResumeLayout(false); this.tabPage2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picLine)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.picLine)).EndInit();
this.contextMenuStrip1.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false);
...@@ -1007,15 +902,7 @@ ...@@ -1007,15 +902,7 @@
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Label lblCID; private System.Windows.Forms.Label lblCID;
private System.Windows.Forms.ListView listView1; private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label lblWarnMsg; private System.Windows.Forms.Label lblWarnMsg;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtPosId;
private System.Windows.Forms.ComboBox cmbBoxIndex;
private System.Windows.Forms.Button btnInStoreTset;
private System.Windows.Forms.Label lblPosId;
private System.Windows.Forms.Button btnUpdateStatus;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.Label lblMoveInfo; private System.Windows.Forms.Label lblMoveInfo;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
......
...@@ -172,7 +172,7 @@ namespace OnlineStore.AssemblyLine ...@@ -172,7 +172,7 @@ namespace OnlineStore.AssemblyLine
lvi.SubItems.Add(move.alarmType.ToString()); lvi.SubItems.Add(move.alarmType.ToString());
// lvi.SubItems.Add(move.lineStatus.ToString()); // lvi.SubItems.Add(move.lineStatus.ToString());
lvi.SubItems.Add(move.GetRunStr()); lvi.SubItems.Add(move.GetRunStr());
BoxInfo box = LineServer.GetBoxInfo(move.DeviceID); BoxInfo box = LineServer.GetBoxInfo(move.StoreID);
if (box != null) if (box != null)
{ {
string online = "✘"; string online = "✘";
...@@ -227,16 +227,16 @@ namespace OnlineStore.AssemblyLine ...@@ -227,16 +227,16 @@ namespace OnlineStore.AssemblyLine
lvi.SubItems.Add(equip.GetRunStr()); lvi.SubItems.Add(equip.GetRunStr());
this.listView1.Items.Add(lvi); this.listView1.Items.Add(lvi);
} }
cmbBoxIndex.Items.Clear(); //cmbBoxIndex.Items.Clear();
foreach (int key in lineBean.MoveEquipMap.Keys) //foreach (int key in lineBean.MoveEquipMap.Keys)
{ //{
cmbBoxIndex.Items.Add("BOX-" + key); // cmbBoxIndex.Items.Add("BOX-" + key);
} //}
if (cmbBoxIndex.Items.Count > 0) //if (cmbBoxIndex.Items.Count > 0)
{ //{
cmbBoxIndex.SelectedIndex = 0; // cmbBoxIndex.SelectedIndex = 0;
} //}
} }
private void AddHealder(string name, int widht) private void AddHealder(string name, int widht)
{ {
...@@ -591,7 +591,7 @@ namespace OnlineStore.AssemblyLine ...@@ -591,7 +591,7 @@ namespace OnlineStore.AssemblyLine
SetItemText(i, item_debug_index, move.Config.IsDebug.Equals(1) ? "✘" : "✔"); SetItemText(i, item_debug_index, move.Config.IsDebug.Equals(1) ? "✘" : "✔");
SetItemText(i, item_alarm_index, move.alarmType.ToString()); SetItemText(i, item_alarm_index, move.alarmType.ToString());
SetItemText(i, item_runStr_index, move.GetRunStr()); SetItemText(i, item_runStr_index, move.GetRunStr());
BoxInfo box = LineServer.GetBoxInfo(move.DeviceID); BoxInfo box = LineServer.GetBoxInfo(move.StoreID);
if (box != null) if (box != null)
{ {
SetItemText(i, item_cid_index, box.CId.ToString()); SetItemText(i, item_cid_index, box.CId.ToString());
...@@ -816,71 +816,90 @@ namespace OnlineStore.AssemblyLine ...@@ -816,71 +816,90 @@ namespace OnlineStore.AssemblyLine
ExitApp(); ExitApp();
} }
private void btnInStoreTset_Click(object sender, EventArgs e) //private void btnInStoreTset_Click(object sender, EventArgs e)
{ //{
if (LineServer.IsStart) // if (LineServer.IsStart)
{ // {
int index = cmbBoxIndex.SelectedIndex + 1; // int index = cmbBoxIndex.SelectedIndex + 1;
string posId = txtPosId.Text.Trim(); // string posId = txtPosId.Text.Trim();
if (String.IsNullOrEmpty(posId)) // if (String.IsNullOrEmpty(posId))
{ // {
MessageBox.Show("请输入正确的库位号"); // MessageBox.Show("请输入正确的库位号");
txtPosId.Focus(); // txtPosId.Focus();
return; // return;
} // }
LineServer.StartInStore(index, new InOutParam(0, "", posId, 0, 0)); // LineServer.StartInStore(index, new InOutParam(0, "", posId, 0, 0));
} // }
} //}
private void listView1_SelectedIndexChanged(object sender, EventArgs e) private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{ {
btnUpdateStatus.Visible = false; //btnUpdateStatus.Visible = false;
if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0) //if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0)
{ //{
int index = listView1.SelectedItems[0].Index; // int index = listView1.SelectedItems[0].Index;
string name = listView1.Items[index].SubItems[0].Text; // string name = listView1.Items[index].SubItems[0].Text;
name = "BOX-" + (index + 1); // name = "BOX-" + (index + 1);
BoxInfo boxInfo = LineServer.GetBoxInfo(index + 1); // MoveEquip moveEquip = LineManager.Line.GetMoveByDId(index + 1);
if (boxInfo != null && boxInfo.SRunStatus >= 1) // if (moveEquip != null)
{ // {
if (boxInfo.SStatus.Equals((int)LineStatus.Debugging)) // int storeID = moveEquip.StoreID;
{ // BoxInfo boxInfo = LineServer.GetBoxInfo(storeID);
btnUpdateStatus.Text = "更改[" + name + "]为工作状态"; // if (boxInfo != null && boxInfo.SRunStatus >= 1)
} // {
else // if (boxInfo.SStatus.Equals((int)LineStatus.Debugging))
{ // {
btnUpdateStatus.Text = "更改[" + name + "]为调试状态"; // btnUpdateStatus.Text = "更改[" + name + "]为工作状态";
} // }
btnUpdateStatus.Visible = true; // else
} // {
} // btnUpdateStatus.Text = "更改[" + name + "]为调试状态";
// }
// btnUpdateStatus.Visible = true;
// }
// }
// else
// {
// btnUpdateStatus.Visible = true;
// }
//}
} }
private void btnUpdateStatus_Click(object sender, EventArgs e) //private void btnUpdateStatus_Click(object sender, EventArgs e)
{ //{
if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0) // if (listView1.SelectedItems != null && listView1.SelectedItems.Count > 0)
{ // {
int index = listView1.SelectedItems[0].Index; // int index = listView1.SelectedItems[0].Index;
string name = "BOX-" + (index + 1); // string name = "BOX-" + (index + 1);
BoxInfo boxInfo = LineServer.GetBoxInfo(index + 1); // //BoxInfo boxInfo = LineServer.GetBoxInfo(index + 1);
if (boxInfo != null && boxInfo.SRunStatus >= 1) // MoveEquip moveEquip = LineManager.Line.GetMoveByDId(index + 1);
{ // if (moveEquip != null)
if (boxInfo.SStatus.Equals((int)LineStatus.Debugging)) // {
{ // int storeID = moveEquip.StoreID;
LogUtil.info("点击【 更改[" + name + "]为工作状态 】"); // BoxInfo boxInfo = LineServer.GetBoxInfo(storeID);
LineServer.UpdateBoxDebug(boxInfo.ID, 0); // if (boxInfo != null && boxInfo.SRunStatus >= 1)
} // {
else // if (boxInfo.SStatus.Equals((int)LineStatus.Debugging))
{ // {
LogUtil.info("点击【 更改[" + name + "]为调试状态 】"); // LogUtil.info("点击【 更改[" + name + "]为工作状态 】");
LineServer.UpdateBoxDebug(boxInfo.ID, 1); // LineServer.UpdateBoxDebug(boxInfo.ID, 0);
} // }
btnUpdateStatus.Visible = false; // else
} // {
} // LogUtil.info("点击【 更改[" + name + "]为调试状态 】");
} // LineServer.UpdateBoxDebug(boxInfo.ID, 1);
// }
// btnUpdateStatus.Visible = false;
// }
// }
// else
// {
// btnUpdateStatus.Visible = false;
// }
// }
//}
......

104.3 KB | 宽: | 高:

98.7 KB | 宽: | 高:

source/AssemblyLineClient/image/line.png
source/AssemblyLineClient/image/line.png
source/AssemblyLineClient/image/line.png
source/AssemblyLineClient/image/line.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖
...@@ -71,8 +71,8 @@ PRO,0,入料流水线4-上料模块-RFID-IP,PRO_RFIP_104-1,192.168.210.118,,,,, ...@@ -71,8 +71,8 @@ PRO,0,入料流水线4-上料模块-RFID-IP,PRO_RFIP_104-1,192.168.210.118,,,,,
PRO,0,当多久没操作时流水线休眠(秒),Sleep_MSeconds,600,,,,, PRO,0,当多久没操作时流水线休眠(秒),Sleep_MSeconds,600,,,,,
PRO,0,气压检测信号关闭需要持续的时间,AirCheckSeconds,600,,,,, PRO,0,气压检测信号关闭需要持续的时间,AirCheckSeconds,600,,,,,
PRO,0,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,, PRO,0,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,,
PRO,0,IO模块对应的DI数量,IO_DILength,192.168.111.33#8;192.168.111.35#8;192.168.111.37#16;192.168.111.39#8;192.168.111.41#16;,,,,, PRO,0,IO模块对应的DI数量,IO_DILength,192.168.111.33#8;192.168.111.35#8;192.168.111.37#16;192.168.111.39#8;192.168.111.41#16;192.168.111.51#8;,,,,,
PRO,0,模块对应的DO数量,IO_DOLength,192.168.111.33#8;192.168.111.35#8;192.168.111.37#16;192.168.111.39#8;192.168.111.41#16;,,,,, PRO,0,模块对应的DO数量,IO_DOLength,192.168.111.33#8;192.168.111.35#8;192.168.111.37#16;192.168.111.39#8;192.168.111.41#16;192.168.111.51#8;,,,,,
,,,,,,,,, ,,,,,,,,,
,,,,,,,,, ,,,,,,,,,
DI,0,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X001,X001 DI,0,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X001,X001
......
...@@ -511,8 +511,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -511,8 +511,8 @@ namespace OnlineStore.DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W008_InStoreCheckOK)) else if (wait.WaitType.Equals(WaitEnum.W008_InStoreCheckOK))
{ {
string posId = moveInfo.MoveParam.PosId; string posId = moveInfo.MoveParam.PosId;
int id = moveInfo.MoveParam.GetStoreId(); int storeId = moveInfo.MoveParam.GetStoreId();
wait.IsEnd = LineServer.RightInPosId(id, posId); wait.IsEnd = LineServer.RightInPosId(storeId, posId);
} }
else if (wait.WaitType.Equals(WaitEnum.W009_BoxCanInstore)) else if (wait.WaitType.Equals(WaitEnum.W009_BoxCanInstore))
{ {
......
...@@ -421,7 +421,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -421,7 +421,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (MoveInfo.MoveStep < LineMoveStep.FI_25_WaitTray) if (MoveInfo.MoveStep < LineMoveStep.FI_25_WaitTray)
{ {
if (SecondMoveInfo.IsTimeOut(30)) if (SecondMoveInfo.IsTimeOut(15))
{ {
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待入库托盘超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveStep + "] 等待入库托盘超时 [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg + ",暂时放托盘离开"); LogUtil.error(WarnMsg + ",暂时放托盘离开");
...@@ -1176,7 +1176,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1176,7 +1176,7 @@ namespace OnlineStore.DeviceLibrary
getPosIdMsg = ""; getPosIdMsg = "";
ClearTimeoutAlarm("获取库位号超时"); ClearTimeoutAlarm("获取库位号超时");
} }
else if (MoveInfo.IsTimeOut(30)) else if (MoveInfo.IsTimeOut(15))
{ {
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 获取库位号超时 " + getPosIdMsg + " [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 获取库位号超时 " + getPosIdMsg + " [" + Math.Round(MoveInfo.StepSpan().TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID * 1000 + 30); LogUtil.error(WarnMsg, DeviceID * 1000 + 30);
...@@ -1761,12 +1761,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -1761,12 +1761,12 @@ namespace OnlineStore.DeviceLibrary
{ {
if (DeviceID.Equals(102)) if (DeviceID.Equals(102))
{ {
MoveEquip moveEquip7 = LineManager.Line.MoveEquipMap[7]; MoveEquip moveEquip7 = LineManager.Line.GetMoveByDId(7);
if (moveEquip7.IsWaitEmptyTray()) if (moveEquip7.IsWaitEmptyTray())
{ {
return true; return true;
} }
MoveEquip moveEquip8 = LineManager.Line.MoveEquipMap[8]; MoveEquip moveEquip8 = LineManager.Line.GetMoveByDId(8);
if (moveEquip8.IsWaitEmptyTray()) if (moveEquip8.IsWaitEmptyTray())
{ {
return true; return true;
......
...@@ -1129,5 +1129,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -1129,5 +1129,23 @@ namespace OnlineStore.DeviceLibrary
conIsPro = false; conIsPro = false;
} }
} }
public MoveEquip GetMoveByDId(int deviceId)
{
if (MoveEquipMap.ContainsKey(deviceId))
{
return MoveEquipMap[deviceId];
}
foreach(MoveEquip m in MoveEquipMap.Values)
{
if (m.StoreID.Equals(deviceId))
{
return m;
}
}
return null;
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -1095,7 +1095,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1095,7 +1095,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public void boxBean_OutStoreEnd(int storeId, InOutParam param) public void boxBean_OutStoreEnd(int storeId, InOutParam param)
{ {
MoveEquip moveEquip = MoveEquipMap[storeId]; MoveEquip moveEquip = GetMoveByDId(storeId);
string posId = param != null ? param.PosId : ""; string posId = param != null ? param.PosId : "";
if (moveEquip.IsDebug) if (moveEquip.IsDebug)
{ {
...@@ -1135,11 +1135,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -1135,11 +1135,15 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (!MoveEquipMap.ContainsKey(id)) //if (!MoveEquipMap.ContainsKey(id))
//{
// return false;
//}
MoveEquip move = GetMoveByDId(id);
if (move == null)
{ {
return false; return false;
} }
MoveEquip move = MoveEquipMap[id];
if (!move.NoAlarm() || move.waitInStoreList.Count > 0 || move.IsDebug || move.waitOutStoreList.Count > 0) if (!move.NoAlarm() || move.waitInStoreList.Count > 0 || move.IsDebug || move.waitOutStoreList.Count > 0)
{ {
return false; return false;
...@@ -1185,11 +1189,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -1185,11 +1189,15 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (!MoveEquipMap.ContainsKey(id)) //if (!MoveEquipMap.ContainsKey(id))
//{
// return false;
//}
MoveEquip move = GetMoveByDId(id);
if (move == null)
{ {
return false; return false;
} }
MoveEquip move = MoveEquipMap[id];
if (move.IsDebug) if (move.IsDebug)
//if (!move.NoErrorAlarm() || move.IsDebug || move.waitOutStoreList.Count > 0) //if (!move.NoErrorAlarm() || move.IsDebug || move.waitOutStoreList.Count > 0)
{ {
......
...@@ -388,7 +388,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -388,7 +388,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
MoveEquip moveEquip10 = LineManager.Line.MoveEquipMap[10]; MoveEquip moveEquip10 = LineManager.Line.GetMoveByDId(10);
if (moveEquip10.IsWaitEmptyTray()) if (moveEquip10.IsWaitEmptyTray())
{ {
return false; return false;
......
...@@ -239,7 +239,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -239,7 +239,7 @@ namespace OnlineStore.DeviceLibrary
//Shunt2_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Shunt2_TopCylinder_Down2, IO_VALUE.LOW)); //Shunt2_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.Shunt2_TopCylinder_Down2, IO_VALUE.LOW));
} }
LineManager.Line.MoveEquipMap[5].EndProcessTray(); LineManager.Line.GetMoveByDId(5).EndProcessTray();
} }
else else
{ {
......
...@@ -18,9 +18,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,9 +18,20 @@ namespace OnlineStore.DeviceLibrary
public MoveEquip_Config Config; public MoveEquip_Config Config;
private bool ClampNeedCheck=false; private bool ClampNeedCheck=false;
public int StoreID = 0;
public MoveEquip(string cid, MoveEquip_Config config) public MoveEquip(string cid, MoveEquip_Config config)
{ {
this.DeviceID = config.Id; this.DeviceID = config.Id;
StoreID = DeviceID;
if (DeviceID.Equals(19))
{
StoreID = 25;
}
else if (DeviceID.Equals(20))
{
StoreID = 26;
}
this.Config = config; this.Config = config;
baseConfig = config; baseConfig = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
......
...@@ -448,12 +448,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -448,12 +448,12 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore); MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",通知BOX开始入库,等待3000"); InLog("入库 " + MoveInfo.SLog + ",通知BOX开始入库,等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam); LineServer.StartInStore(StoreID, MoveInfo.MoveParam);
sendCount = 1; sendCount = 1;
} }
else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendPosToStore)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.MI_15_SendPosToStore))
{ {
if (!LineServer.IsInStorePro(DeviceID, MoveInfo.MoveParam.PosId)) if (!LineServer.IsInStorePro(StoreID, MoveInfo.MoveParam.PosId))
{ {
//InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令"); //InLog("入库 " + MoveInfo.SLog + " , 送料流程完成,料仓还未开始入库,再次发送starIn命令");
//LineServer.StartInStore(DeviceID, MoveInfo.MoveParam); //LineServer.StartInStore(DeviceID, MoveInfo.MoveParam);
...@@ -461,7 +461,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -461,7 +461,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore); MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",再次通知BOX开始入库,等待3000"); InLog("入库 " + MoveInfo.SLog + ",再次通知BOX开始入库,等待3000");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
LineServer.StartInStore(DeviceID, MoveInfo.MoveParam); LineServer.StartInStore(StoreID, MoveInfo.MoveParam);
sendCount++; sendCount++;
if (sendCount >= 3) if (sendCount >= 3)
...@@ -528,7 +528,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -528,7 +528,7 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
//判断是否验证成功,如果验证失败,不入库 //判断是否验证成功,如果验证失败,不入库
else if (LineServer.RightInPosId(DeviceID, cc.PosId)) else if (LineServer.RightInPosId(StoreID, cc.PosId))
{ {
SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW, cc.InStoreNg); SecondMoveInfo.MoveParam = new InOutParam(cc.TrayNumber, cc.WareCode, cc.PosId, cc.PlateH, cc.PlateW, cc.InStoreNg);
return true; return true;
...@@ -647,7 +647,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -647,7 +647,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (reIndex >= 0) if (reIndex >= 0)
{ {
if (!LineServer.BoxCanInStore(DeviceID)) if (!LineServer.BoxCanInStore(StoreID))
{ {
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先放托盘通过"); LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】,BoxCanInStore验证失败,先放托盘通过");
return false; return false;
...@@ -655,7 +655,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -655,7 +655,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
//判断是否验证成功,如果验证失败,不入库 //判断是否验证成功,如果验证失败,不入库
if (LineServer.RightInPosId(DeviceID, currCode.PosId)) if (LineServer.RightInPosId(StoreID, currCode.PosId))
{ {
//waitInStoreList.RemoveAt(reIndex); //waitInStoreList.RemoveAt(reIndex);
LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽,清理托盘时再删除入库任务"); LogInfo("*******托盘" + currTrayNum + "需要入库【" + currCode.ToStr() + "】 ,开始入库移栽,清理托盘时再删除入库任务");
...@@ -908,7 +908,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -908,7 +908,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (SecondMoveInfo.MoveParam != null) else if (SecondMoveInfo.MoveParam != null)
{ {
if (!LineServer.RightInPosId(DeviceID, SecondMoveInfo.MoveParam.PosId)) if (!LineServer.RightInPosId(StoreID, SecondMoveInfo.MoveParam.PosId))
{ {
LogUtil.error(Name + " " + SecondMoveInfo.SLog + "[" + SecondMoveInfo.MoveParam.PosId + "]料仓未验证成功,等待9秒"); LogUtil.error(Name + " " + SecondMoveInfo.SLog + "[" + SecondMoveInfo.MoveParam.PosId + "]料仓未验证成功,等待9秒");
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(9000)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(9000));
......
...@@ -113,7 +113,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -113,7 +113,7 @@ namespace OnlineStore.DeviceLibrary
int storeId = InOutParam.GetPosStoreId(posId); int storeId = InOutParam.GetPosStoreId(posId);
string wareNum = serverResult.barcode; string wareNum = serverResult.barcode;
//根据库位号查找移栽 //根据库位号查找移栽
MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId]; MoveEquip moveEquip = LineManager.Line.GetMoveByDId(storeId);
// 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败 // 判断PosID是否已经在入库或者在排队列表中,如果已经存在,加入列表失败
InOutParam param = new InOutParam(trayNum, wareNum, posId, plateH, plateW); InOutParam param = new InOutParam(trayNum, wareNum, posId, plateH, plateW);
param.rfid = rfid; param.rfid = rfid;
...@@ -128,7 +128,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -128,7 +128,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateTrayInfo(trayNum, true, ReelType.InStore, new InOutParam(trayNum, wareNum, posId, plateH, plateW, false)); TrayManager.UpdateTrayInfo(trayNum, true, ReelType.InStore, new InOutParam(trayNum, wareNum, posId, plateH, plateW, false));
//TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器; //TODO:判断BOX是否处于可以入库状态,如果调试或急停中,需要返回给服务器;
if (LineServer.BoxCanInStore(moveEquip.DeviceID)) if (LineServer.BoxCanInStore(storeId))
{ {
LineServer.CheckInStorePos(storeId, param); LineServer.CheckInStorePos(storeId, param);
} }
...@@ -544,9 +544,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -544,9 +544,9 @@ namespace OnlineStore.DeviceLibrary
result.Param = new InOutParam(0, serverResult.barcode, posId, height, width); result.Param = new InOutParam(0, serverResult.barcode, posId, height, width);
result.Param.rfid = rfid; result.Param.rfid = rfid;
int storeId = result.Param.GetStoreId(); int storeId = result.Param.GetStoreId();
if (LineManager.Line.MoveEquipMap.ContainsKey(storeId)) MoveEquip moveEquip = LineManager.Line.GetMoveByDId(storeId);
if (moveEquip!=null)
{ {
MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId];
if (LineManager.Line.IsReviceInPosId(moveEquip, posId)) if (LineManager.Line.IsReviceInPosId(moveEquip, posId))
{ {
result.Param.InStoreNg = true; result.Param.InStoreNg = true;
...@@ -578,8 +578,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -578,8 +578,8 @@ namespace OnlineStore.DeviceLibrary
return; return;
} }
int storeId = param.GetStoreId(); int storeId = param.GetStoreId();
MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId]; MoveEquip moveEquip = LineManager.Line.GetMoveByDId(storeId);
if (LineServer.BoxCanInStore(moveEquip.DeviceID)) if (LineServer.BoxCanInStore(storeId))
{ {
LineServer.CheckInStorePos(storeId, param); LineServer.CheckInStorePos(storeId, param);
} }
......
...@@ -189,9 +189,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -189,9 +189,10 @@ namespace OnlineStore.DeviceLibrary
if (tray.InOrOutStore.Equals(1) && tray.InoutPar.InStoreNg.Equals(false) && (!tray.InoutPar.PosId.Equals(""))) if (tray.InOrOutStore.Equals(1) && tray.InoutPar.InStoreNg.Equals(false) && (!tray.InoutPar.PosId.Equals("")))
{ {
int storeId = tray.InoutPar.GetStoreId(); int storeId = tray.InoutPar.GetStoreId();
if (storeId > 0 && LineManager.Line.MoveEquipMap.ContainsKey(storeId)) MoveEquip moveEquip = LineManager.Line.GetMoveByDId(storeId);
if (storeId > 0 && (moveEquip != null))
{ {
MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId]; //MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId];
moveEquip.RemoveInStore(tray.InoutPar, msg); moveEquip.RemoveInStore(tray.InoutPar, msg);
} }
} }
......
...@@ -21,11 +21,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -21,11 +21,27 @@ namespace OnlineStore.DeviceLibrary
public static Dictionary<int, TcpClientBean> ClientMap = new Dictionary<int, TcpClientBean>(); public static Dictionary<int, TcpClientBean> ClientMap = new Dictionary<int, TcpClientBean>();
public static BoxInfo GetBoxInfo(int id) public static BoxInfo GetBoxInfo(int storeID)
{ {
if (BoxMap.ContainsKey(id)) if (BoxMap.ContainsKey(storeID))
{ {
return BoxMap[id]; return BoxMap[storeID];
}
else
{
int newId = storeID;
if (storeID.Equals(19))
{
newId = 25;
}
else if (storeID.Equals(20))
{
newId = 26;
}
if (BoxMap.ContainsKey(newId))
{
return BoxMap[newId];
}
} }
return null; return null;
} }
...@@ -275,15 +291,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -275,15 +291,16 @@ namespace OnlineStore.DeviceLibrary
} }
public static bool UpdateBoxDebug(int id, int isDebug) public static bool UpdateBoxDebug(int id, int isDebug)
{ {
if (ClientMap.ContainsKey(id)) TcpClientBean client = GetClientBean(id);
if (client != null)
{ {
Dictionary<string, object> paramList = new Dictionary<string, object>(); Dictionary<string, object> paramList = new Dictionary<string, object>();
paramList.Add(S_Cmd, cmd_updateDebug); paramList.Add(S_Cmd, cmd_updateDebug);
int canOutStore = LineManager.Line.CanOutStore(id) ? 1 : 0; int canOutStore = LineManager.Line.CanOutStore(id) ? 1 : 0;
paramList.Add(S_CanOutStore, canOutStore); paramList.Add(S_CanOutStore, canOutStore);
paramList.Add(S_IsDebug, isDebug); paramList.Add(S_IsDebug, isDebug);
string msg = ToParamStr(paramList); string msg = ToParamStr(paramList);
TcpClientBean client = ClientMap[id]; //TcpClientBean client = ClientMap[id];
bool result = SendStrToClient(client, msg); bool result = SendStrToClient(client, msg);
if (!result) if (!result)
{ {
...@@ -294,7 +311,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -294,7 +311,8 @@ namespace OnlineStore.DeviceLibrary
} }
public static bool StartInStore(int id, InOutParam param) public static bool StartInStore(int id, InOutParam param)
{ {
if (ClientMap.ContainsKey(id)) TcpClientBean client = GetClientBean(id);
if (client != null)
{ {
Dictionary<string, object> paramList = new Dictionary<string, object>(); Dictionary<string, object> paramList = new Dictionary<string, object>();
paramList.Add(S_Cmd, cmd_startIn); paramList.Add(S_Cmd, cmd_startIn);
...@@ -306,7 +324,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -306,7 +324,7 @@ namespace OnlineStore.DeviceLibrary
paramList.Add(S_RFID, param.rfid); paramList.Add(S_RFID, param.rfid);
// string msg = cmd_startIn+cmd_spilt+param.PosId+cmd_spilt+param.PlateH+cmd_spilt+param.PlateW+cmd_spilt+"\r"; // string msg = cmd_startIn+cmd_spilt+param.PosId+cmd_spilt+param.PlateH+cmd_spilt+param.PlateW+cmd_spilt+"\r";
string msg = ToParamStr(paramList); string msg = ToParamStr(paramList);
TcpClientBean client = ClientMap[id]; //TcpClientBean client = ClientMap[id];
bool result = SendStrToClient(client, msg); bool result = SendStrToClient(client, msg);
if (!result) if (!result)
{ {
...@@ -323,28 +341,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -323,28 +341,14 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
///// <summary>
///// 获取整个料仓的状态
///// </summary>
//public static Operation GetInStoreOperation(string message)
//{
// //构建发送给服务器的对象
// Operation lineOperation = new Operation();
// lineOperation.status = 1;
// lineOperation.seq = ConfigAppSettings.nextSeq();
// lineOperation.boxStatus = new Dictionary<int, BoxStatus>();
// lineOperation.alarmList = new List<AlarmInfo>();
// lineOperation.cid = LineServer.GetAllCID();
// lineOperation.op = 1;
// lineOperation.data = new Dictionary<string, string>() { { "code", message } };
// return lineOperation;
//}
public static bool CheckInStorePos(int id, InOutParam param) public static bool CheckInStorePos(int id, InOutParam param)
{ {
try try
{ {
if (ClientMap.ContainsKey(id)) TcpClientBean client = GetClientBean(id);
if (client != null)
{ {
Dictionary<string, object> paramList = new Dictionary<string, object>(); Dictionary<string, object> paramList = new Dictionary<string, object>();
paramList.Add(S_Cmd, cmd_checStartIn); paramList.Add(S_Cmd, cmd_checStartIn);
...@@ -356,7 +360,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -356,7 +360,7 @@ namespace OnlineStore.DeviceLibrary
paramList.Add(S_RFID, param.rfid); paramList.Add(S_RFID, param.rfid);
// string msg = cmd_startIn+cmd_spilt+param.PosId+cmd_spilt+param.PlateH+cmd_spilt+param.PlateW+cmd_spilt+"\r"; // string msg = cmd_startIn+cmd_spilt+param.PosId+cmd_spilt+param.PlateH+cmd_spilt+param.PlateW+cmd_spilt+"\r";
string msg = ToParamStr(paramList); string msg = ToParamStr(paramList);
TcpClientBean client = ClientMap[id]; //TcpClientBean client = ClientMap[id];
bool result = SendStrToClient(client, msg); bool result = SendStrToClient(client, msg);
if (!result) if (!result)
{ {
...@@ -414,6 +418,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -414,6 +418,31 @@ namespace OnlineStore.DeviceLibrary
ClientMap.Add(id, client); ClientMap.Add(id, client);
} }
} }
private static TcpClientBean GetClientBean(int id)
{
if (ClientMap.ContainsKey(id))
{
return ClientMap[id];
}
else
{
int newId = id;
if (id.Equals(19))
{
newId = 25;
}
else if (id.Equals(20))
{
newId = 26;
}
if (ClientMap.ContainsKey(newId))
{
return ClientMap[newId];
}
}
return null;
}
private static void tcp_ReviceMsgEvent(TcpClientBean client, string msg) private static void tcp_ReviceMsgEvent(TcpClientBean client, string msg)
{ {
try try
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!