diff --git a/Aucma.Core.BoxFoam/Models/SpaceInfoModel.cs b/Aucma.Core.BoxFoam/Models/SpaceInfoModel.cs index f166d8fe..0031cd75 100644 --- a/Aucma.Core.BoxFoam/Models/SpaceInfoModel.cs +++ b/Aucma.Core.BoxFoam/Models/SpaceInfoModel.cs @@ -45,6 +45,12 @@ namespace Aucma.Core.BoxFoam.Models /// 物料型号C /// public string typeCodeC { get; set; } + + public string typeNameA { get; set; } + + public string typeNameB { get; set; } + + public string typeNameC { get; set; } /// /// 入库状态 /// diff --git a/Aucma.Core.BoxFoam/ViewModels/BeforeFoamingPageModelView.cs b/Aucma.Core.BoxFoam/ViewModels/BeforeFoamingPageModelView.cs index d798d7d5..ab8f8c32 100644 --- a/Aucma.Core.BoxFoam/ViewModels/BeforeFoamingPageModelView.cs +++ b/Aucma.Core.BoxFoam/ViewModels/BeforeFoamingPageModelView.cs @@ -115,6 +115,9 @@ namespace Aucma.Core.BoxFoam.ViewModels model.materialType = item.MaterialType; model.typeCodeB = item.typeCodeB; model.typeCodeC = item.typeCodeC; + model.typeNameA = GetSubstringBetweenCommas(item.typeNameA); + model.typeNameB = GetSubstringBetweenCommas(item.typeNameB); + model.typeNameC = GetSubstringBetweenCommas(item.typeNameC); model.unusualFlag = item.UnusualFlag == 2 ? "Red" : "White"; // 夹具型号 model.boxType = item.BoxType; @@ -135,9 +138,40 @@ namespace Aucma.Core.BoxFoam.ViewModels Shapes.Add(model); } - } + } #endregion + /// + /// 截取两个逗号之间的字符串 + /// + /// + /// + static string GetSubstringBetweenCommas(string input) + { + if (input == null) return null; + // 找到第一个逗号的位置 + int firstCommaIndex = input.IndexOf(','); + if (firstCommaIndex != -1) + { + // 找到第二个逗号的位置 + int secondCommaIndex = input.IndexOf(',', firstCommaIndex + 1); + if (secondCommaIndex != -1) + { + // 使用Substring截取第一个逗号和第二个逗号之间的字符 + return input.Substring(firstCommaIndex + 1, secondCommaIndex - firstCommaIndex - 1); + } + else + { + return null; + } + } + else + { + return null; + } + } + + #region 初始化 private ObservableCollection _shapes = new ObservableCollection(); public ObservableCollection Shapes diff --git a/Aucma.Core.BoxFoam/Views/UserPage/BeforeFoamingPageView.xaml b/Aucma.Core.BoxFoam/Views/UserPage/BeforeFoamingPageView.xaml index 9e5ea6c5..49b99386 100644 --- a/Aucma.Core.BoxFoam/Views/UserPage/BeforeFoamingPageView.xaml +++ b/Aucma.Core.BoxFoam/Views/UserPage/BeforeFoamingPageView.xaml @@ -151,8 +151,10 @@ - - + + + + @@ -162,6 +164,14 @@ + + + + + + @@ -170,6 +180,14 @@ + + + + + + @@ -178,6 +196,14 @@ + + + + + + diff --git a/Aucma.Core.ProductOffLine/Assets/Images/word1.jpg b/Aucma.Core.ProductOffLine/Assets/Images/word1.jpg new file mode 100644 index 00000000..ff43e42c Binary files /dev/null and b/Aucma.Core.ProductOffLine/Assets/Images/word1.jpg differ diff --git a/Aucma.Core.ProductOffLine/Assets/Images/word2.jpg b/Aucma.Core.ProductOffLine/Assets/Images/word2.jpg new file mode 100644 index 00000000..1ce49241 Binary files /dev/null and b/Aucma.Core.ProductOffLine/Assets/Images/word2.jpg differ diff --git a/Aucma.Core.ProductOffLine/Assets/Images/word3.jpg b/Aucma.Core.ProductOffLine/Assets/Images/word3.jpg new file mode 100644 index 00000000..23913bc0 Binary files /dev/null and b/Aucma.Core.ProductOffLine/Assets/Images/word3.jpg differ diff --git a/Aucma.Core.ProductOffLine/Aucma.Core.ProductOffLine.csproj b/Aucma.Core.ProductOffLine/Aucma.Core.ProductOffLine.csproj index 244070ed..f36c89a0 100644 --- a/Aucma.Core.ProductOffLine/Aucma.Core.ProductOffLine.csproj +++ b/Aucma.Core.ProductOffLine/Aucma.Core.ProductOffLine.csproj @@ -31,6 +31,9 @@ + + + @@ -61,6 +64,15 @@ Always + + Always + + + Always + + + Always + diff --git a/Aucma.Core.ProductOffLine/Business/offLineBusiness.cs b/Aucma.Core.ProductOffLine/Business/offLineBusiness.cs index f46c5e41..67d7c335 100644 --- a/Aucma.Core.ProductOffLine/Business/offLineBusiness.cs +++ b/Aucma.Core.ProductOffLine/Business/offLineBusiness.cs @@ -112,7 +112,7 @@ namespace Aucma.Core.ProductOffLine.Business GunBusiness.RefreshMaterialCodeStrEvent += MaterialBarScan; ChooseDirectionWindow.SendPlcPassEvent += DownLoadPassFlag; - //test(); + // test(); } #region 变量定义 /// @@ -125,15 +125,18 @@ namespace Aucma.Core.ProductOffLine.Business public void test() { - //Task.Run(() => - //{ + Task.Run(() => + { - // Thread.Sleep(5000); - // OffLineInfo info11 = new OffLineInfo(); - // info11.ProductSNCode = "test111"; - // int flag = _offLineInfoServices.AddAsync(info11).Result; + Thread.Sleep(5000); + TempOffLineInfo1.MsgInfo = "条码重复,上传间隔超过五分钟禁止放行,人工处理,上传时间:" + DateTime.Now; + TempOffLineInfo1.MsgAlarmFlag = true; + RefreshScanMateriaCodeEvent?.Invoke(TempOffLineInfo1); + //OffLineInfo info11 = new OffLineInfo(); + //info11.ProductSNCode = "test111"; + //int flag = _offLineInfoServices.AddAsync(info11).Result; - //}); + }); // private static readonly log4net.ILog log = LogManager.GetLogger(typeof(OffLineBusiness)); // string result = _productOffLineServices.QueryChecked("1520870000099E2V0004"); diff --git a/Aucma.Core.ProductOffLine/Views/ChooseDirectionWindow.xaml b/Aucma.Core.ProductOffLine/Views/ChooseDirectionWindow.xaml index 21e5d454..19b2e790 100644 --- a/Aucma.Core.ProductOffLine/Views/ChooseDirectionWindow.xaml +++ b/Aucma.Core.ProductOffLine/Views/ChooseDirectionWindow.xaml @@ -12,7 +12,7 @@ - +