Browse Source

iot对接

WIN-GH9CEESPLTB\Administrator 4 months ago
parent
commit
e5e18decdf

+ 3 - 1
MainForm/ClassFile/ProjectClass/GlobalContext.cs

@@ -36,7 +36,9 @@ namespace MainForm
         public static string MqttDeviceStateDir = MqttLogDir + @"设备状态\";  // mqtt日志 - 设备状态日志
         public static string MqttInputBeginDir = MqttLogDir + @"节拍日志\";    // mqtt日志 - 节拍日志
         public static string MqttOperateLogDir = MqttLogDir + @"用户操作\";    // mqtt日志 - 用户操作日志
-        public static string MqttAlarmLogDir = MqttLogDir + @"故障日志\";    // mqtt日志 - 用户操作日志
+        public static string MqttAlarmLogDir = MqttLogDir + @"故障日志\";    // mqtt日志 - 故障日志日志
+        public static string MqttPassResultLogDir = MqttLogDir + @"过站结果\";    // mqtt日志 - 过站结果日志
+        public static string MqttPassDetailLogDir = MqttLogDir + @"过站明细\";    // mqtt日志 - 过站明细日志
 
         public static string MqttServerPath = AppDomain.CurrentDomain.BaseDirectory + @"\ThingsMode\MqttServer.exe";
         public static string MqttServerName = "MqttServer";

+ 1 - 1
MainForm/ClassFile/XiaomiAPI_IOT/Extend/XiaomiMqttClient_OperateLog.cs

@@ -14,7 +14,7 @@ namespace MainForm.ClassFile.XiaomiAPI
         /// <summary>
         /// 操作记录⽇志- 事件Id
         /// </summary>
-        private static string OperateLogId { get; set; } = "equipment_configuration/HomeSpd";
+        private static string OperateLogId { get; set; } = "pass_station/pass_station_result";
 
         /// <summary>
         /// 操作记录⽇志 - 事件方法

+ 121 - 0
MainForm/ClassFile/XiaomiAPI_IOT/Extend/XiaomiMqttClient_PassStationResult.cs

@@ -139,5 +139,126 @@ namespace MainForm.ClassFile.XiaomiAPI
             /// </summary>
             public string work_type { get; set; } = "OUT_STATION";
         }
+
+
+        /// <summary>
+        /// 过站明细- 事件方法
+        /// </summary>
+        /// <param name="msg">事件数据;Json</param>
+        /// <param name="dataId">自定义事件Id;如:guid</param>
+        /// <returns></returns>
+        public static (int, string) Write_PassStationDetail(PassStationDetailRequest request, string dataId = "")
+        {
+            int result = 0;
+            string resultStr = "";
+
+            string msg = JsonConvert.SerializeObject(request);
+            byte[] bytes = ToUTF8(msg);
+
+            // 发送
+            if (string.IsNullOrEmpty(dataId))
+                result = Write(PassStationResultId, bytes);
+            else
+                result = WriteWithDataId(PassStationResultId, bytes, dataId);
+
+            var try1 = Enum.TryParse(result.ToString(), out XiaomiMqttResponse_ErrCode errCode);
+            if (try1)
+                resultStr = errCode.ToString();
+            else
+                resultStr = XiaomiMqttResponse_ErrCode.ERR_UNKOWN.ToString();
+
+            string logPath = GlobalContext.MqttPassResultLogDir + "PassStationDetail" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
+            FileOperate.NewTxtFile(logPath, "MQTT【过站明细】提交:" + msg + "\r\n==>提交结果:" + resultStr + "");
+
+            return (result, resultStr);
+        }
+
+        /// <summary>
+        /// 过站结果- 参数
+        /// </summary>
+        public class PassStationDetailRequest
+        {
+            /// <summary>
+            /// 过站唯⼀标识(36位)
+            /// string[1,64]
+            /// 要确保唯⼀性,每次过站时⽣成的ID必须唯⼀。
+            /// • 对于同⼀次过站⽽⾔,过站明细中的pass_station_id字段值与过站结果中的pass_station_id字段值是⼀样的。
+            /// • 与mes中的过站明细uuid字段uuidInspection要求⼀致(这两个值需确保是⼀致的,以MES为主,如果关闭MES⽣产,则此项传空字符串)
+            /// </summary>
+            public string pass_station_id { get; set; } = Guid.NewGuid().ToString();
+
+            /// <summary>
+            /// 项⽬编码
+            /// string[1,32]
+            /// </summary>
+            public string sn { get; set; } = string.Empty;
+
+            /// <summary>
+            /// ⼯⼚Id
+            /// string[1,64]
+            /// </summary>
+            public string slot { get; set; } = string.Empty;
+
+            /// <summary>
+            /// 测试项序号
+            /// string[1,32]
+            /// </summary>
+            public string test_item_num { get; set; } = string.Empty;
+            /// <summary>
+            /// 功能名称
+            /// string[1,32]
+            /// ⼤类(可以是检测⼤类或加⼯项⼤类),枚举值如下:
+            /// • Machine_加⼯模块,加⼯相关的⼯艺参
+            /// • Test_测试模块,检测项相关
+            /// • Fixture_Process,治具信息
+            /// • Material_Process,物料信息
+            /// • Tool_Process,软件版本信息
+            /// • File_Process,⽂件相关信息
+            /// </summary>
+            public string function_name { get; set; } = string.Empty;
+            /// <summary>
+            /// 测试项
+            /// string[1,32]
+            /// </summary>
+            public string test_item { get; set; } = string.Empty;
+
+            /// <summary>
+            /// 测试值/输出值
+            /// string[1,32]
+            /// value(和测试项对应的值,可以是检测值/算法的输出值/⼯艺参数值)
+            /// </summary>
+            public string result_val { get; set; } = string.Empty;
+            /// <summary>
+            /// 上限值
+            /// string[1,32]
+            /// </summary>
+            public string hi_limit { get; set; } = string.Empty;
+            /// <summary>
+            /// 下限值
+            /// string[1,32]
+            /// </summary>
+            public string low_limit { get; set; } = string.Empty;
+            /// <summary>
+            /// 测试状态
+            /// string[1,32]
+            /// PASS/FAIL
+            /// </summary>
+            public string status { get; set; } = "PASS";
+            /// <summary>
+            /// 单项测试时间
+            /// </summary>
+            public string test_time { get; set; } = string.Empty;
+            /// <summary>
+            /// 错误码
+            /// </summary>
+            public string error_code { get; set; } = string.Empty;
+            /// <summary>
+            /// 描述
+            /// string[1,32]
+            /// 中⽂描述或说明备注信息
+            /// </summary>
+            public string description { get; set; } = string.Empty;
+          
+        }
     }
 }

BIN
MainForm/DBFile/小米-IoT报警字典_10_壳体清洁上料.xlsx


BIN
MainForm/DBFile/小米-IoT报警字典_20_上盖板上料装备.xlsx


BIN
MainForm/DBFile/小米-IoT报警字典_30_点散热胶装备.xlsx


BIN
MainForm/DBFile/小米-IoT报警字典_40_胶线检测.xlsx


BIN
MainForm/DBFile/小米-IoT报警字典_50_ADD板上料组装装备.xlsx


BIN
MainForm/DBFile/小米-IoT报警字典_60_组上盖板.xlsx


BIN
MainForm/DBFile/小米-IoT报警字典_70_上盖板锁螺丝.xlsx


BIN
MainForm/DBFile/小米-IoT报警字典_80_NG下料.xlsx


BIN
MainForm/DBFile/小米-IoT报警字典_90_半成品下料.xlsx


+ 181 - 13
MainForm/FaForm/Form_MESTest.Designer.cs

@@ -38,7 +38,7 @@
             this.pnlDeviceState6 = new System.Windows.Forms.Panel();
             this.pnlDeviceState8 = new System.Windows.Forms.Panel();
             this.pnlDeviceState7 = new System.Windows.Forms.Panel();
-            this.pnlDeviceState5 = new System.Windows.Forms.Panel();
+            this.pnlPassStationDetail = new System.Windows.Forms.Panel();
             this.pnlPassStation = new System.Windows.Forms.Panel();
             this.cmbResult = new System.Windows.Forms.ComboBox();
             this.label39 = new System.Windows.Forms.Label();
@@ -118,9 +118,22 @@
             this.label1 = new System.Windows.Forms.Label();
             this.btnStationIn = new System.Windows.Forms.Button();
             this.tabControl1 = new System.Windows.Forms.TabControl();
+            this.PassStationDetail_SN = new System.Windows.Forms.TextBox();
+            this.label10 = new System.Windows.Forms.Label();
+            this.PassStationDetail_slot = new System.Windows.Forms.TextBox();
+            this.label11 = new System.Windows.Forms.Label();
+            this.label12 = new System.Windows.Forms.Label();
+            this.pnlPassStationDetail_functionNname = new System.Windows.Forms.ComboBox();
+            this.label40 = new System.Windows.Forms.Label();
+            this.pnlPassStationDetail_testItem = new System.Windows.Forms.TextBox();
+            this.pnlPassStationDetail_resultVal = new System.Windows.Forms.TextBox();
+            this.label41 = new System.Windows.Forms.Label();
+            this.label42 = new System.Windows.Forms.Label();
+            this.pnlPassStationDetail_status = new System.Windows.Forms.ComboBox();
             this.tabPage3.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.tableLayoutPanel1.SuspendLayout();
+            this.pnlPassStationDetail.SuspendLayout();
             this.pnlPassStation.SuspendLayout();
             this.pnlOperateLog.SuspendLayout();
             this.pnlStationInputBegin.SuspendLayout();
@@ -220,7 +233,7 @@
             this.tableLayoutPanel1.Controls.Add(this.pnlDeviceState6, 0, 2);
             this.tableLayoutPanel1.Controls.Add(this.pnlDeviceState8, 1, 2);
             this.tableLayoutPanel1.Controls.Add(this.pnlDeviceState7, 0, 2);
-            this.tableLayoutPanel1.Controls.Add(this.pnlDeviceState5, 2, 1);
+            this.tableLayoutPanel1.Controls.Add(this.pnlPassStationDetail, 2, 1);
             this.tableLayoutPanel1.Controls.Add(this.pnlPassStation, 1, 1);
             this.tableLayoutPanel1.Controls.Add(this.pnlOperateLog, 0, 1);
             this.tableLayoutPanel1.Controls.Add(this.pnlStationInputBegin, 2, 0);
@@ -270,16 +283,28 @@
             this.pnlDeviceState7.Size = new System.Drawing.Size(502, 163);
             this.pnlDeviceState7.TabIndex = 6;
             // 
-            // pnlDeviceState5
-            // 
-            this.pnlDeviceState5.BackColor = System.Drawing.Color.Gray;
-            this.pnlDeviceState5.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.pnlDeviceState5.Enabled = false;
-            this.pnlDeviceState5.Location = new System.Drawing.Point(1020, 173);
-            this.pnlDeviceState5.Margin = new System.Windows.Forms.Padding(2);
-            this.pnlDeviceState5.Name = "pnlDeviceState5";
-            this.pnlDeviceState5.Size = new System.Drawing.Size(504, 163);
-            this.pnlDeviceState5.TabIndex = 5;
+            // pnlPassStationDetail
+            // 
+            this.pnlPassStationDetail.BackColor = System.Drawing.Color.Gray;
+            this.pnlPassStationDetail.Controls.Add(this.label42);
+            this.pnlPassStationDetail.Controls.Add(this.pnlPassStationDetail_status);
+            this.pnlPassStationDetail.Controls.Add(this.pnlPassStationDetail_resultVal);
+            this.pnlPassStationDetail.Controls.Add(this.label41);
+            this.pnlPassStationDetail.Controls.Add(this.pnlPassStationDetail_testItem);
+            this.pnlPassStationDetail.Controls.Add(this.label40);
+            this.pnlPassStationDetail.Controls.Add(this.pnlPassStationDetail_functionNname);
+            this.pnlPassStationDetail.Controls.Add(this.label12);
+            this.pnlPassStationDetail.Controls.Add(this.PassStationDetail_SN);
+            this.pnlPassStationDetail.Controls.Add(this.label10);
+            this.pnlPassStationDetail.Controls.Add(this.label11);
+            this.pnlPassStationDetail.Controls.Add(this.PassStationDetail_slot);
+            this.pnlPassStationDetail.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.pnlPassStationDetail.Enabled = false;
+            this.pnlPassStationDetail.Location = new System.Drawing.Point(1020, 173);
+            this.pnlPassStationDetail.Margin = new System.Windows.Forms.Padding(2);
+            this.pnlPassStationDetail.Name = "pnlPassStationDetail";
+            this.pnlPassStationDetail.Size = new System.Drawing.Size(504, 163);
+            this.pnlPassStationDetail.TabIndex = 5;
             // 
             // pnlPassStation
             // 
@@ -1218,6 +1243,135 @@
             this.tabControl1.Size = new System.Drawing.Size(1566, 842);
             this.tabControl1.TabIndex = 16;
             // 
+            // PassStationDetail_SN
+            // 
+            this.PassStationDetail_SN.Location = new System.Drawing.Point(100, 5);
+            this.PassStationDetail_SN.Margin = new System.Windows.Forms.Padding(4);
+            this.PassStationDetail_SN.Name = "PassStationDetail_SN";
+            this.PassStationDetail_SN.Size = new System.Drawing.Size(140, 28);
+            this.PassStationDetail_SN.TabIndex = 86;
+            this.PassStationDetail_SN.Text = "4B180055";
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Location = new System.Drawing.Point(256, 10);
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(80, 18);
+            this.label10.TabIndex = 85;
+            this.label10.Text = "载具穴位";
+            // 
+            // PassStationDetail_slot
+            // 
+            this.PassStationDetail_slot.Location = new System.Drawing.Point(345, 4);
+            this.PassStationDetail_slot.Margin = new System.Windows.Forms.Padding(4);
+            this.PassStationDetail_slot.Name = "PassStationDetail_slot";
+            this.PassStationDetail_slot.Size = new System.Drawing.Size(140, 28);
+            this.PassStationDetail_slot.TabIndex = 84;
+            this.PassStationDetail_slot.Text = "4B1400103";
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Location = new System.Drawing.Point(12, 11);
+            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(62, 18);
+            this.label11.TabIndex = 83;
+            this.label11.Text = "产品SN";
+            // 
+            // label12
+            // 
+            this.label12.AutoSize = true;
+            this.label12.Location = new System.Drawing.Point(12, 49);
+            this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(80, 18);
+            this.label12.TabIndex = 87;
+            this.label12.Text = "功能名称";
+            // 
+            // pnlPassStationDetail_functionNname
+            // 
+            this.pnlPassStationDetail_functionNname.BackColor = System.Drawing.Color.WhiteSmoke;
+            this.pnlPassStationDetail_functionNname.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.pnlPassStationDetail_functionNname.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.pnlPassStationDetail_functionNname.FormattingEnabled = true;
+            this.pnlPassStationDetail_functionNname.Items.AddRange(new object[] {
+            "Machine_加⼯模块",
+            "Test_测试模块",
+            "Fixture_Process",
+            "Material_Process",
+            "Tool_Process",
+            "File_Process"});
+            this.pnlPassStationDetail_functionNname.Location = new System.Drawing.Point(100, 46);
+            this.pnlPassStationDetail_functionNname.Margin = new System.Windows.Forms.Padding(4);
+            this.pnlPassStationDetail_functionNname.Name = "pnlPassStationDetail_functionNname";
+            this.pnlPassStationDetail_functionNname.Size = new System.Drawing.Size(140, 26);
+            this.pnlPassStationDetail_functionNname.TabIndex = 81;
+            // 
+            // label40
+            // 
+            this.label40.AutoSize = true;
+            this.label40.Location = new System.Drawing.Point(12, 87);
+            this.label40.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label40.Name = "label40";
+            this.label40.Size = new System.Drawing.Size(62, 18);
+            this.label40.TabIndex = 88;
+            this.label40.Text = "测试项";
+            // 
+            // pnlPassStationDetail_testItem
+            // 
+            this.pnlPassStationDetail_testItem.Location = new System.Drawing.Point(100, 84);
+            this.pnlPassStationDetail_testItem.Margin = new System.Windows.Forms.Padding(4);
+            this.pnlPassStationDetail_testItem.Name = "pnlPassStationDetail_testItem";
+            this.pnlPassStationDetail_testItem.Size = new System.Drawing.Size(140, 28);
+            this.pnlPassStationDetail_testItem.TabIndex = 89;
+            this.pnlPassStationDetail_testItem.Text = "抛料次数";
+            // 
+            // pnlPassStationDetail_resultVal
+            // 
+            this.pnlPassStationDetail_resultVal.Location = new System.Drawing.Point(345, 85);
+            this.pnlPassStationDetail_resultVal.Margin = new System.Windows.Forms.Padding(4);
+            this.pnlPassStationDetail_resultVal.Name = "pnlPassStationDetail_resultVal";
+            this.pnlPassStationDetail_resultVal.Size = new System.Drawing.Size(140, 28);
+            this.pnlPassStationDetail_resultVal.TabIndex = 91;
+            // 
+            // label41
+            // 
+            this.label41.AutoSize = true;
+            this.label41.Location = new System.Drawing.Point(256, 89);
+            this.label41.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label41.Name = "label41";
+            this.label41.Size = new System.Drawing.Size(62, 18);
+            this.label41.TabIndex = 90;
+            this.label41.Text = "测试值";
+            // 
+            // label42
+            // 
+            this.label42.AutoSize = true;
+            this.label42.Location = new System.Drawing.Point(12, 131);
+            this.label42.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label42.Name = "label42";
+            this.label42.Size = new System.Drawing.Size(80, 18);
+            this.label42.TabIndex = 93;
+            this.label42.Text = "测试状态";
+            // 
+            // pnlPassStationDetail_status
+            // 
+            this.pnlPassStationDetail_status.BackColor = System.Drawing.Color.WhiteSmoke;
+            this.pnlPassStationDetail_status.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.pnlPassStationDetail_status.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.pnlPassStationDetail_status.FormattingEnabled = true;
+            this.pnlPassStationDetail_status.Items.AddRange(new object[] {
+            "PASS",
+            "FAIL"});
+            this.pnlPassStationDetail_status.Location = new System.Drawing.Point(100, 128);
+            this.pnlPassStationDetail_status.Margin = new System.Windows.Forms.Padding(4);
+            this.pnlPassStationDetail_status.Name = "pnlPassStationDetail_status";
+            this.pnlPassStationDetail_status.Size = new System.Drawing.Size(140, 26);
+            this.pnlPassStationDetail_status.TabIndex = 92;
+            // 
             // Form_MESTest
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -1234,6 +1388,8 @@
             this.tabPage3.PerformLayout();
             this.groupBox2.ResumeLayout(false);
             this.tableLayoutPanel1.ResumeLayout(false);
+            this.pnlPassStationDetail.ResumeLayout(false);
+            this.pnlPassStationDetail.PerformLayout();
             this.pnlPassStation.ResumeLayout(false);
             this.pnlPassStation.PerformLayout();
             this.pnlOperateLog.ResumeLayout(false);
@@ -1264,7 +1420,7 @@
         private System.Windows.Forms.Panel pnlDeviceState6;
         private System.Windows.Forms.Panel pnlDeviceState8;
         private System.Windows.Forms.Panel pnlDeviceState7;
-        private System.Windows.Forms.Panel pnlDeviceState5;
+        private System.Windows.Forms.Panel pnlPassStationDetail;
         private System.Windows.Forms.Panel pnlPassStation;
         private System.Windows.Forms.ComboBox cmbResult;
         private System.Windows.Forms.Label label39;
@@ -1344,5 +1500,17 @@
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Button btnStationIn;
         private System.Windows.Forms.TabControl tabControl1;
+        private System.Windows.Forms.TextBox PassStationDetail_SN;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.Label label11;
+        private System.Windows.Forms.TextBox PassStationDetail_slot;
+        private System.Windows.Forms.TextBox pnlPassStationDetail_testItem;
+        private System.Windows.Forms.Label label40;
+        private System.Windows.Forms.ComboBox pnlPassStationDetail_functionNname;
+        private System.Windows.Forms.Label label12;
+        private System.Windows.Forms.Label label42;
+        private System.Windows.Forms.ComboBox pnlPassStationDetail_status;
+        private System.Windows.Forms.TextBox pnlPassStationDetail_resultVal;
+        private System.Windows.Forms.Label label41;
     }
 }

+ 80 - 10
MainForm/FaForm/Form_MESTest.cs

@@ -369,6 +369,10 @@ namespace MainForm.FaForm
                             (int, string) resultPassStation = SendIotPassStationFun(mesStation);
                             ShowLog_Iot($"[{resultPassStation.Item1}]" + resultPassStation.Item2);
                             break;
+                        case "过站明细":
+                            (int, string) resultPassStationDetail = SendIotPassStationDetailFun(mesStation);
+                            ShowLog_Iot($"[{resultPassStationDetail.Item1}]" + resultPassStationDetail.Item2);
+                            break;
                         default:
                             break;
                     }
@@ -647,6 +651,51 @@ namespace MainForm.FaForm
             return iotResult;
         }
 
+
+        private int test_item_num = 0;
+        /// <summary>
+        /// 上传过站数据_Iot
+        /// </summary>
+        /// <param name="mesStation">mes工站名称</param>
+        /// <returns></returns>
+        private (int, string) SendIotPassStationDetailFun(string mesStation)
+        {
+            test_item_num += 1;//⽰例:1,2,递增
+            string _stationStr = cmbStationName_Iot.Text.Trim();  // 工站名
+            string _slot = PassStationDetail_slot.Text.Trim();                 // 槽位编码
+            string _sn = PassStationDetail_SN.Text.Trim();         // 产品SN
+            string _function_name= pnlPassStationDetail_functionNname.Text.Trim();
+            string _test_item= pnlPassStationDetail_testItem.Text.Trim();
+            string _result_val= pnlPassStationDetail_resultVal.Text.Trim();
+            string _status = pnlPassStationDetail_status.Text.Trim();
+
+            if (string.IsNullOrEmpty(_slot))
+                return (999, "‘槽位编码’不可为空!");
+            else if (string.IsNullOrEmpty(_sn))
+                return (999, "‘产品SN’不可为空!");
+            else if (string.IsNullOrEmpty(_function_name))
+                return (999, "‘功能名称’不可为空!");
+            else if (string.IsNullOrEmpty(_test_item))
+                return (999, "‘测试项’不可为空!");
+            else if (string.IsNullOrEmpty(_result_val))
+                return (999, "‘测试值’不可为空!");
+
+            PassStationDetailRequest request = new PassStationDetailRequest();
+            request.sn = _sn;                      // 产品SN
+            request.slot = _slot;                  // 槽位编码
+            request.test_item_num = test_item_num.ToString();              
+            request.function_name = _function_name;               
+            request.test_item = _test_item;                  
+            request.result_val = _result_val;               
+            request.status=_status;
+            request.description = _test_item;
+
+
+            // 上传过站结果
+            (int, string) iotResult = XiaomiMqttClient_Extend.Write_PassStationDetail(request);
+            //(int, string) iotResult = (0, "");
+            return iotResult;
+        }
         /// <summary>
         /// 显示信息
         /// </summary>
@@ -675,7 +724,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.Enabled = false;
                     pnlOperateLog.Enabled = false;
                     pnlPassStation.Enabled = false;
-                    pnlDeviceState5.Enabled = false;
+                    pnlPassStationDetail.Enabled = false;
                     pnlDeviceState6.Enabled = false;
                     pnlDeviceState7.Enabled = false;
                     pnlDeviceState8.Enabled = false;
@@ -685,7 +734,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.BackColor = Color.Gray;
                     pnlOperateLog.BackColor = Color.Gray;
                     pnlPassStation.BackColor = Color.Gray;
-                    pnlDeviceState5.BackColor = Color.Gray;
+                    pnlPassStationDetail.BackColor = Color.Gray;
                     pnlDeviceState6.BackColor = Color.Gray;
                     pnlDeviceState7.BackColor = Color.Gray;
                     pnlDeviceState8.BackColor = Color.Gray;
@@ -696,7 +745,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.Enabled = false;
                     pnlOperateLog.Enabled = false;
                     pnlPassStation.Enabled = false;
-                    pnlDeviceState5.Enabled = false;
+                    pnlPassStationDetail.Enabled = false;
                     pnlDeviceState6.Enabled = false;
                     pnlDeviceState7.Enabled = false;
                     pnlDeviceState8.Enabled = false;
@@ -706,7 +755,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.BackColor = Color.Gray;
                     pnlOperateLog.BackColor = Color.Gray;
                     pnlPassStation.BackColor = Color.Gray;
-                    pnlDeviceState5.BackColor = Color.Gray;
+                    pnlPassStationDetail.BackColor = Color.Gray;
                     pnlDeviceState6.BackColor = Color.Gray;
                     pnlDeviceState7.BackColor = Color.Gray;
                     pnlDeviceState8.BackColor = Color.Gray;
@@ -717,7 +766,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.Enabled = true;
                     pnlOperateLog.Enabled = false;
                     pnlPassStation.Enabled = false;
-                    pnlDeviceState5.Enabled = false;
+                    pnlPassStationDetail.Enabled = false;
                     pnlDeviceState6.Enabled = false;
                     pnlDeviceState7.Enabled = false;
                     pnlDeviceState8.Enabled = false;
@@ -727,7 +776,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.BackColor = Color.Yellow;
                     pnlOperateLog.BackColor = Color.Gray;
                     pnlPassStation.BackColor = Color.Gray;
-                    pnlDeviceState5.BackColor = Color.Gray;
+                    pnlPassStationDetail.BackColor = Color.Gray;
                     pnlDeviceState6.BackColor = Color.Gray;
                     pnlDeviceState7.BackColor = Color.Gray;
                     pnlDeviceState8.BackColor = Color.Gray;
@@ -738,7 +787,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.Enabled = false;
                     pnlOperateLog.Enabled = true;
                     pnlPassStation.Enabled = false;
-                    pnlDeviceState5.Enabled = false;
+                    pnlPassStationDetail.Enabled = false;
                     pnlDeviceState6.Enabled = false;
                     pnlDeviceState7.Enabled = false;
                     pnlDeviceState8.Enabled = false;
@@ -748,7 +797,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.BackColor = Color.Gray;
                     pnlOperateLog.BackColor = Color.Yellow;
                     pnlPassStation.BackColor = Color.Gray;
-                    pnlDeviceState5.BackColor = Color.Gray;
+                    pnlPassStationDetail.BackColor = Color.Gray;
                     pnlDeviceState6.BackColor = Color.Gray;
                     pnlDeviceState7.BackColor = Color.Gray;
                     pnlDeviceState8.BackColor = Color.Gray;
@@ -759,7 +808,7 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.Enabled = false;
                     pnlOperateLog.Enabled = false;
                     pnlPassStation.Enabled = true;
-                    pnlDeviceState5.Enabled = false;
+                    pnlPassStationDetail.Enabled = false;
                     pnlDeviceState6.Enabled = false;
                     pnlDeviceState7.Enabled = false;
                     pnlDeviceState8.Enabled = false;
@@ -769,7 +818,28 @@ namespace MainForm.FaForm
                     pnlStationInputBegin.BackColor = Color.Gray;
                     pnlOperateLog.BackColor = Color.Gray;
                     pnlPassStation.BackColor = Color.Yellow;
-                    pnlDeviceState5.BackColor = Color.Gray;
+                    pnlPassStationDetail.BackColor = Color.Gray;
+                    pnlDeviceState6.BackColor = Color.Gray;
+                    pnlDeviceState7.BackColor = Color.Gray;
+                    pnlDeviceState8.BackColor = Color.Gray;
+                    break;
+                case "过站明细":
+                    pnlDeviceState.Enabled = false;
+                    pnlFaultLog.Enabled = false;
+                    pnlStationInputBegin.Enabled = false;
+                    pnlOperateLog.Enabled = false;
+                    pnlPassStation.Enabled = false;
+                    pnlPassStationDetail.Enabled = true;
+                    pnlDeviceState6.Enabled = false;
+                    pnlDeviceState7.Enabled = false;
+                    pnlDeviceState8.Enabled = false;
+
+                    pnlDeviceState.BackColor = Color.Gray;
+                    pnlFaultLog.BackColor = Color.Gray;
+                    pnlStationInputBegin.BackColor = Color.Gray;
+                    pnlOperateLog.BackColor = Color.Gray;
+                    pnlPassStation.BackColor = Color.Gray;
+                    pnlPassStationDetail.BackColor = Color.Yellow;
                     pnlDeviceState6.BackColor = Color.Gray;
                     pnlDeviceState7.BackColor = Color.Gray;
                     pnlDeviceState8.BackColor = Color.Gray;