diff --git a/SlnMesnac.Business/ProdCompletionBusiness.cs b/SlnMesnac.Business/ProdCompletionBusiness.cs
index 62497d2..21be577 100644
--- a/SlnMesnac.Business/ProdCompletionBusiness.cs
+++ b/SlnMesnac.Business/ProdCompletionBusiness.cs
@@ -322,6 +322,9 @@ namespace SlnMesnac.Business
if (realPalletTask != null)
{
epcStr = realPalletTask.PalletCode;
+ }else if (!string.IsNullOrEmpty(debugConfig.MdjOutRFID))
+ { //判断人工是否有输入条码
+ epcStr = debugConfig.MdjOutRFID;
}
else
{
@@ -394,6 +397,7 @@ namespace SlnMesnac.Business
plc.writeStringByAddress(GetPlcAddressByConfigKey("2楼码垛出口RFID条码地址"), epcStr, 12);
// plc.writeByteByAddress(GetPlcAddressByConfigKey("2楼小包出口到位信号"), 2);
readRfidAmount = 0;
+ debugConfig.MdjOutRFID = "";
sqlSugarClient.AsTenant().CommitTran();
#endregion
}
diff --git a/SlnMesnac.Config/DebugConfig.cs b/SlnMesnac.Config/DebugConfig.cs
index 7a12ae9..46d3563 100644
--- a/SlnMesnac.Config/DebugConfig.cs
+++ b/SlnMesnac.Config/DebugConfig.cs
@@ -169,5 +169,16 @@ namespace SlnMesnac.Config
set { iniHelper.IniWriteValue("system", "ConfigInfoPassWprd", value); }
}
+
+ ///
+ ///灏忓寘鍑哄彛RFID浜哄伐杈撳叆澶囩敤
+ ///璇诲彇涓嶅埌鏃讹紝浜哄伐鍙互鎵嬪姩杈撳叆
+ ///
+ public string MdjOutRFID
+ {
+ get { return iniHelper.IniReadValue("system", "MdjOutRFID"); }
+ set { iniHelper.IniWriteValue("system", "MdjOutRFID", value); }
+ }
+
}
}
diff --git a/SlnMesnac.WPF/Page/BaseConfigInfoPage.xaml b/SlnMesnac.WPF/Page/BaseConfigInfoPage.xaml
index 3b7787e..3585f2b 100644
--- a/SlnMesnac.WPF/Page/BaseConfigInfoPage.xaml
+++ b/SlnMesnac.WPF/Page/BaseConfigInfoPage.xaml
@@ -20,6 +20,10 @@
+
+
+
+
diff --git a/SlnMesnac.WPF/Page/BaseConfigInfoPage.xaml.cs b/SlnMesnac.WPF/Page/BaseConfigInfoPage.xaml.cs
index 023621d..1ebdf1d 100644
--- a/SlnMesnac.WPF/Page/BaseConfigInfoPage.xaml.cs
+++ b/SlnMesnac.WPF/Page/BaseConfigInfoPage.xaml.cs
@@ -1,8 +1,11 @@
-锘縰sing SlnMesnac.WPF.ViewModel;
+锘縰sing Microsoft.AspNetCore.Mvc.RazorPages;
+using SlnMesnac.Config;
+using SlnMesnac.WPF.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@@ -21,6 +24,7 @@ namespace SlnMesnac.WPF.Page
///
public partial class BaseConfigInfoPage : UserControl
{
+ private DebugConfig debugConfig = DebugConfig.Instance;
private BaseConfigInfoViewModel ViewModel;
public BaseConfigInfoPage()
{
@@ -56,5 +60,27 @@ namespace SlnMesnac.WPF.Page
}
+
+ private void InputRFIDButton_Click(object sender, RoutedEventArgs e)
+ {
+ string RFID = Microsoft.VisualBasic.Interaction.InputBox("璇疯緭鍏ュ皬鍖呭嚭鍙FID锛", "浜哄伐澶勭悊", "", -1, -1);
+ // 瀹氫箟姝e垯琛ㄨ揪寮忔ā寮
+ string pattern = @"^JYHB\d{8}$";
+
+ // 鍒涘缓姝e垯琛ㄨ揪寮忓璞
+ Regex regex = new Regex(pattern);
+
+ // 鏍¢獙杈撳叆瀛楃涓叉槸鍚︾鍚堟ā寮
+ if (regex.IsMatch(RFID))
+ {
+ debugConfig.MdjOutRFID = RFID;
+ MessageBox.Show("淇濆瓨鎴愬姛");
+ }
+ else
+ {
+ MessageBox.Show($"杈撳叆鐨凴FID:{RFID}鏃犳晥锛孞YHB寮澶村悗鎺8浣嶆暟瀛楋紒");
+ }
+
+ }
}
}