From 6a4463810e276b62356d77c88509fa6fa7af65cf Mon Sep 17 00:00:00 2001
From: kingno <30263@KINGNO>
Date: 星期三, 23 七月 2025 15:46:33 +0800
Subject: [PATCH] mes数据逻辑上传完善,缺陷代码完善,添加S4工位的S2结果上传Plc的通信日志mes优化

---
 src/Bro.M141.Process/M141Config.cs |  129 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 119 insertions(+), 10 deletions(-)

diff --git a/src/Bro.M141.Process/M141Config.cs b/src/Bro.M141.Process/M141Config.cs
index ad9ed79..6323e49 100644
--- a/src/Bro.M141.Process/M141Config.cs
+++ b/src/Bro.M141.Process/M141Config.cs
@@ -6,6 +6,7 @@
 using Bro.Common.Model;
 using Bro.M135.Common;
 using Bro.Process;
+using MathNet.Numerics.Distributions;
 using Newtonsoft.Json;
 using System.ComponentModel;
 using System.Drawing.Design;
@@ -13,16 +14,13 @@
 using System.Drawing.Printing;
 using System.Reflection;
 using System.Windows.Forms.Design;
+using Windows.Services.Maps;
 using static Bro.Common.Helper.EnumHelper;
 
 namespace Bro.M141.Process
 {
     public class M141Config : ProcessConfigBase
     {
-      
-
-
-
 
 
         [Category("鎵撳嵃鏈洪厤缃�")]
@@ -73,7 +71,7 @@
         [Category("妫�娴嬪紓甯告寚绀�")]
         [Description("閫夋嫨鏌愪釜Spec锛屽叾琛ㄧず妫�娴嬭繃绋嬩腑寮傚父")]
         [DisplayName("寮傚父鎸囩ず鏍囧噯")]
-        [TypeConverter(typeof(SpecCodeSelectorConverter))] 
+        [TypeConverter(typeof(SpecCodeSelectorConverter))]
         public string CheckErrorSpecCode { get; set; } = "";
 
 
@@ -169,6 +167,15 @@
         [DisplayName("褰撳墠鏍忓叿鐮�")]
         public string basketcode { get; set; } = "NoRead";
 
+
+
+
+        [Category("鏍忓叿鏉$爜閰嶇疆")]
+        [Description("褰撳墠宸ュ崟鍙�")]
+        [DisplayName("褰撳墠宸ュ崟鍙�")]
+        public string zwoid { get; set; } = "";
+
+
         [Category("鏍忓叿鏉$爜閰嶇疆")]
         [Description("鏈珯鏄惁璇诲彇鏍忓叿鐮�")]
         [DisplayName("鏈珯鏄惁璇诲彇鏍忓叿鐮�")]
@@ -187,6 +194,86 @@
         [Description("蹇冭烦鍦板潃")]
         [DisplayName("蹇冭烦鍦板潃")]
         public int heartadd { get; set; } = 1505;
+
+
+
+        [Category("MES閰嶇疆")]
+        [Description("鏄惁涓婁紶MES")]
+        [DisplayName("鏄惁涓婁紶MES")]
+        public bool ISupMES { get; set; } = false;
+
+        [Category("MES閰嶇疆")]
+        [Description("鎺ュ彛閫夋嫨,0绡叿鎺ュ彛,1鏁版嵁涓婁紶鎺ュ彛,-1鎵�鏈夋帴鍙�")]
+        [DisplayName("鎺ュ彛閫夋嫨")]
+        public int MESchannel { get; set; } = 0;
+
+
+
+        [Category("MES閰嶇疆")]
+        [Description("璐﹀彿")]
+        [DisplayName("璐﹀彿")]
+        public string zuser { get; set; } = "aoiUser";
+
+        [Category("MES閰嶇疆")]
+        [Description("瀵嗙爜")]
+        [DisplayName("瀵嗙爜")]
+        public string zpassword { get; set; } = "Chia@aoi";
+
+        [Category("MES閰嶇疆")]
+        [Description("IP")]
+        [DisplayName("Ip")]
+        public string zIP { get; set; } = "10.2.20.114";
+
+        [Category("MES閰嶇疆")]
+        [Description("绔彛鍙�")]
+        [DisplayName("绔彛鍙�")]
+        public int zport { get; set; } = 15672;
+
+
+
+        //[Category("MES閰嶇疆")]
+        //[Description("澶囩敤鏍忓叿鐮�")]
+        //[DisplayName("澶囩敤鏍忓叿鐮�")]
+        //public string basketcode2 { get; set; } = "NoRead";
+
+        [Category("MES閰嶇疆")]
+        [Description("numpro")]
+        [DisplayName("numpro")]
+        [JsonIgnore]
+        public int numpro { get; set; } = 0;
+
+        [Category("MES閰嶇疆")]
+        [Description("mesnum1")]
+        [DisplayName("mesnum1")]
+        [JsonIgnore]
+        public int mesnum1 { get; set; } = 0;
+
+        [Category("MES閰嶇疆")]
+        [Description("mesnum2")]
+        [DisplayName("mesnum2")]
+        [JsonIgnore]
+        public int mesnum2 { get; set; } = 0;
+
+        [Category("MES閰嶇疆")]
+        [Description("mesnum3")]
+        [DisplayName("mesnum3")]
+        [JsonIgnore]
+        public int mesnum3 { get; set; } = 0;
+
+        [Category("MES閰嶇疆")]
+        [Description("mesnum4")]
+        [DisplayName("mesnum4")]
+        [JsonIgnore]
+        public int mesnum4 { get; set; } = 0;
+
+
+
+        [Category("MES閰嶇疆")]
+        [Description("plc搴忓彿鍜岀鍏风爜闆嗗悎")]
+        [DisplayName("plc搴忓彿鍜岀鍏风爜闆嗗悎")]
+        [TypeConverter(typeof(CollectionCountConvert))]
+        [Editor(typeof(ComplexCollectionEditor<PlcAndBasketcode>), typeof(UITypeEditor))]
+        public List<PlcAndBasketcode> PlcAndBasketcodes { get; set; } = new List<PlcAndBasketcode>();
 
 
     }
@@ -318,7 +405,7 @@
             {
                 var temchar = data.Split(',');
                 ret.alarmname = temchar[0];
-                ret.address =Convert.ToInt32(temchar[1]);
+                ret.address = Convert.ToInt32(temchar[1]);
                 ret.address2 = Convert.ToInt32(temchar[2]);
             }
             catch (Exception ex)
@@ -378,7 +465,19 @@
     }
 
 
+    public class PlcAndBasketcode
+    {
+        [Category("閰嶇疆")]
+        [Description("搴忓彿")]
+        [DisplayName("搴忓彿")]
+        public int id { get; set; } = 0;
 
+        [Category("閰嶇疆")]
+        [Description("鏉$爜")]
+        [DisplayName("鏉$爜")]
+        public string code { get; set; }
+
+    }
 
 
 
@@ -963,10 +1062,20 @@
         [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
         public string ImageFolder { get; set; }
 
-        [Category("鍚姩閰嶇疆")]
-        [Description("true锛氬惎鍔ㄧ绾挎祴璇� false锛氬仠姝㈢绾挎祴璇�")]
-        [DisplayName("娴嬭瘯寮�鍏�")]
-        public bool IsStart { get; set; } = true;
+
+
+        [Category("妫�娴嬪姛鑳�")]
+        [Description("鍥剧墖鍦ㄦ壒閲忔祴璇曡繃绋嬩腑鏈�缁堝浘鐗囩粨鏋滀細瀛樺偍杈冩參闇�瑕佽缃欢鏃剁‘淇濆浘鐗囦笉琚祫婧愯嚜鍔ㄩ噴鏀�")]
+        [DisplayName("鍥剧墖瀛樺浘寤舵椂")]
+        public int SaveImageTime { get; set; } = 0;
+
+
+
+        [Category("妫�娴嬪姛鑳�")]
+        [Description("true锛氬惎鍔∣K娴嬭瘯 false锛氬惎鍔∟G娴嬭瘯")]
+        [DisplayName("鏄惁娴嬭瘯OK鍥剧墖")]
+        public bool IsOK { get; set; } = true;
+
     }
 
     public class RealTimeAdjustDataDetail : IComplexDisplay

--
Gitblit v1.8.0