Commit 05a35dbd by 任天宇

优化了扫描到样品后不交接的情况下不能重置箱号的bug

新增了重置箱号和开始交接样品时停止扫描
parent 1643242b
...@@ -185,7 +185,7 @@ namespace Kivii.Client.SampleInbounds ...@@ -185,7 +185,7 @@ namespace Kivii.Client.SampleInbounds
//设置回调方法 //设置回调方法
reader.AnalyCallback = AnalyData; reader.AnalyCallback = AnalyData;
reader.GetFrequencyRegion(currentSetting.btReadId); reader.GetFrequencyRegion(currentSetting.btReadId);
Thread.Sleep(500); Thread.Sleep(50);
currentInventoryBuffer.ClearInventoryPar(); currentInventoryBuffer.ClearInventoryPar();
currentInventoryBuffer.btRepeat = Convert.ToByte(1);//设置每条命令盘存次数 1次 currentInventoryBuffer.btRepeat = Convert.ToByte(1);//设置每条命令盘存次数 1次
...@@ -295,7 +295,7 @@ namespace Kivii.Client.SampleInbounds ...@@ -295,7 +295,7 @@ namespace Kivii.Client.SampleInbounds
btnScanRfid.BackColor = Color.PapayaWhip; btnScanRfid.BackColor = Color.PapayaWhip;
btnScanRfid.ForeColor = Color.Chocolate; btnScanRfid.ForeColor = Color.Chocolate;
})); }));
Thread.Sleep(400); Thread.Sleep(50);
disConnectReader(); disConnectReader();
outputMessage("停止扫描"); outputMessage("停止扫描");
return; return;
...@@ -857,6 +857,10 @@ namespace Kivii.Client.SampleInbounds ...@@ -857,6 +857,10 @@ namespace Kivii.Client.SampleInbounds
if (_currentScanSamples == null) _currentScanSamples = new List<Sample>(); if (_currentScanSamples == null) _currentScanSamples = new List<Sample>();
foreach (var record in resp.Results) foreach (var record in resp.Results)
{ {
this.Invoke(new Action(delegate
{
dgvRfidSamples.DataSource = null;
}));
if (_currentScanSamples.Exists(o => o.Kvid == record.Kvid)) if (_currentScanSamples.Exists(o => o.Kvid == record.Kvid))
{ {
_currentScanSamples.RemoveAll(o => o.Kvid == record.Kvid); _currentScanSamples.RemoveAll(o => o.Kvid == record.Kvid);
...@@ -864,10 +868,6 @@ namespace Kivii.Client.SampleInbounds ...@@ -864,10 +868,6 @@ namespace Kivii.Client.SampleInbounds
} }
this.Invoke(new Action(delegate this.Invoke(new Action(delegate
{ {
dgvRfidSamples.DataSource = null;
}));
this.Invoke(new Action(delegate
{
dgvRfidSamples.DataSource = _currentScanSamples; dgvRfidSamples.DataSource = _currentScanSamples;
})); }));
} }
...@@ -1080,6 +1080,12 @@ namespace Kivii.Client.SampleInbounds ...@@ -1080,6 +1080,12 @@ namespace Kivii.Client.SampleInbounds
private void btnClearCurrentPackage_Click(object sender, EventArgs e) private void btnClearCurrentPackage_Click(object sender, EventArgs e)
{ {
btnRealTimeInventory_Stop();
this.Invoke(new Action(delegate
{
dgvSamples.DataSource = null;
dgvRfidSamples.DataSource = null;
}));
_currentPackage = null; _currentPackage = null;
_currentPackageSamples = null; _currentPackageSamples = null;
_currentScanSamples = null; _currentScanSamples = null;
...@@ -1100,9 +1106,6 @@ namespace Kivii.Client.SampleInbounds ...@@ -1100,9 +1106,6 @@ namespace Kivii.Client.SampleInbounds
//cbSetCurrentPackageOwner.DisplayMember = "OwnerName"; //cbSetCurrentPackageOwner.DisplayMember = "OwnerName";
//cbSetCurrentPackageOwner.ValueMember = "OwnerKvid"; //cbSetCurrentPackageOwner.ValueMember = "OwnerKvid";
//cbSetCurrentPackageOwner.Enabled = false; //cbSetCurrentPackageOwner.Enabled = false;
dgvSamples.DataSource = null;
dgvRfidSamples.DataSource = null;
btnRealTimeInventory_Stop();
outputMessage($"箱号已重设!"); outputMessage($"箱号已重设!");
} }
...@@ -1189,7 +1192,7 @@ namespace Kivii.Client.SampleInbounds ...@@ -1189,7 +1192,7 @@ namespace Kivii.Client.SampleInbounds
MessageBox.Show("读写器未连接,请查看是否读写器设备!"); MessageBox.Show("读写器未连接,请查看是否读写器设备!");
return; return;
} }
Thread.Sleep(200); Thread.Sleep(50);
} }
if (currentInventoryBuffer.bLoopInventory) if (currentInventoryBuffer.bLoopInventory)
{ {
...@@ -1203,6 +1206,10 @@ namespace Kivii.Client.SampleInbounds ...@@ -1203,6 +1206,10 @@ namespace Kivii.Client.SampleInbounds
private void btnSampleAssign_Click(object sender, EventArgs e) private void btnSampleAssign_Click(object sender, EventArgs e)
{ {
if (currentInventoryBuffer.bLoopInventory)
{
btnRealTimeInventory_Stop();
}
if (cbAssignOperatorName.Text.IsNullOrEmpty()) if (cbAssignOperatorName.Text.IsNullOrEmpty())
{ {
MessageBox.Show("请先设置好交接人信息", "设置"); MessageBox.Show("请先设置好交接人信息", "设置");
......
...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; ...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.6.2023.6050")] [assembly: AssemblyVersion("5.4.2023.7050")]
[assembly: AssemblyFileVersion("5.6.2023.6050")] [assembly: AssemblyFileVersion("5.4.2023.7050")]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment