22
schangxiang@126.com
2024-12-15 f8c3e66071ff442b25c17e13c91b0b6e1d1cbea5
22
已修改3个文件
79 ■■■■ 文件已修改
CC/iWareCC_ASRS/Handler/DeviceWarningHandler.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SDA/iWareSda/SdaMainForm.Designer.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Handler/DeviceWarningHandler.cs
@@ -24,6 +24,7 @@
            DeviceWarningOutput output = new DeviceWarningOutput();
            System.Collections.Generic.List<iWareCC.StationService.WmsConfigDeviceWarning> retList = new System.Collections.Generic.List<iWareCC.StationService.WmsConfigDeviceWarning>();
            System.Collections.Generic.List<wms_config_device_warning> dbList = new System.Collections.Generic.List<wms_config_device_warning>();
            System.Collections.Generic.List<wms_config_device_warning> real_dbList = new System.Collections.Generic.List<wms_config_device_warning>();
            try
            {
                using (WmsDBModel edm = new WmsDBModel())
@@ -32,8 +33,18 @@
                    var query1 = (int)DeviceWarningTypeEnum.安全报警;
                    var query2 = (int)DeviceWarningTypeEnum.硬件报警;
                    dbList = edm.wms_config_device_warning.Where(x => x.DeviceWarningType == query1 || x.DeviceWarningType == query2).ToList();
                    //每种区域的每种类型,只取前20条记录
                    var groupedData = dbList.GroupBy(x => new { x.DeviceAreaCode, x.DeviceWarningType }).Select(group => new
                    {
                        GroupKey = group.Key,
                        Top20Items = group.ToList().OrderBy(x => x.Id).Take(20)
                    });
                    foreach (var item in groupedData)
                    {
                        real_dbList.AddRange(item.Top20Items);
                }
                foreach (var item in dbList)
                }
                foreach (var item in real_dbList)
                {
                    retList.Add(new StationService.WmsConfigDeviceWarning()
                    {
@@ -47,7 +58,7 @@
            }
            output.wmsConfigDeviceWarnings = retList;
            output.wms_config_device_warning_list = dbList;
            output.wms_config_device_warning_list = real_dbList;
            return output;
        }
SDA/iWareSda/Devices/4-Station/StationModel/StationEntity.cs
@@ -1274,7 +1274,7 @@
                            //Context = item.WarningContent.Trim(),
                        });
                    }
                    Thread.Sleep(1000);
                    //Thread.Sleep(1000);
                }
            }
            catch (Exception ex)
SDA/iWareSda/SdaMainForm.Designer.cs
@@ -34,10 +34,6 @@
            this.tabControl1 = new System.Windows.Forms.TabControl();
            this.tabPage_Main = new System.Windows.Forms.TabPage();
            this.panel2 = new System.Windows.Forms.Panel();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.btn_Hide = new System.Windows.Forms.Button();
            this.btn_Show = new System.Windows.Forms.Button();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.rtbError = new System.Windows.Forms.RichTextBox();
            this.lbl_Main2 = new System.Windows.Forms.Label();
@@ -50,7 +46,6 @@
            this.panel1.SuspendLayout();
            this.tabControl1.SuspendLayout();
            this.tabPage_Main.SuspendLayout();
            this.panel2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
            this.tabPage_RGV.SuspendLayout();
            this.SuspendLayout();
@@ -98,64 +93,12 @@
            // 
            // panel2
            // 
            this.panel2.Controls.Add(this.button1);
            this.panel2.Controls.Add(this.button2);
            this.panel2.Controls.Add(this.btn_Hide);
            this.panel2.Controls.Add(this.btn_Show);
            this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel2.Location = new System.Drawing.Point(3, 237);
            this.panel2.Margin = new System.Windows.Forms.Padding(4);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(1076, 58);
            this.panel2.TabIndex = 21;
            //
            // button1
            //
            this.button1.BackColor = System.Drawing.Color.Silver;
            this.button1.Location = new System.Drawing.Point(607, 8);
            this.button1.Margin = new System.Windows.Forms.Padding(4);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(164, 42);
            this.button1.TabIndex = 3;
            this.button1.Text = "隐藏实时RGV的PLC值";
            this.button1.UseVisualStyleBackColor = false;
            this.button1.Click += new System.EventHandler(this.button1_Click_1);
            //
            // button2
            //
            this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
            this.button2.Location = new System.Drawing.Point(417, 8);
            this.button2.Margin = new System.Windows.Forms.Padding(4);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(164, 42);
            this.button2.TabIndex = 2;
            this.button2.Text = "显示实时RGV的PLC值";
            this.button2.UseVisualStyleBackColor = false;
            this.button2.Click += new System.EventHandler(this.button2_Click_1);
            //
            // btn_Hide
            //
            this.btn_Hide.BackColor = System.Drawing.Color.Silver;
            this.btn_Hide.Location = new System.Drawing.Point(231, 8);
            this.btn_Hide.Margin = new System.Windows.Forms.Padding(4);
            this.btn_Hide.Name = "btn_Hide";
            this.btn_Hide.Size = new System.Drawing.Size(164, 42);
            this.btn_Hide.TabIndex = 1;
            this.btn_Hide.Text = "隐藏实时堆垛机PLC值";
            this.btn_Hide.UseVisualStyleBackColor = false;
            this.btn_Hide.Click += new System.EventHandler(this.btn_Hide_Click);
            //
            // btn_Show
            //
            this.btn_Show.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
            this.btn_Show.Location = new System.Drawing.Point(41, 8);
            this.btn_Show.Margin = new System.Windows.Forms.Padding(4);
            this.btn_Show.Name = "btn_Show";
            this.btn_Show.Size = new System.Drawing.Size(164, 42);
            this.btn_Show.TabIndex = 0;
            this.btn_Show.Text = "显示实时堆垛机PLC值";
            this.btn_Show.UseVisualStyleBackColor = false;
            this.btn_Show.Click += new System.EventHandler(this.btn_Show_Click);
            // 
            // progressBar1
            // 
@@ -278,7 +221,6 @@
            this.panel1.PerformLayout();
            this.tabControl1.ResumeLayout(false);
            this.tabPage_Main.ResumeLayout(false);
            this.panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
            this.tabPage_RGV.ResumeLayout(false);
            this.tabPage_RGV.PerformLayout();
@@ -300,10 +242,6 @@
        private System.Windows.Forms.PictureBox pictureBox5;
        private System.Windows.Forms.TabPage tabPage_RGV;
        private System.Windows.Forms.Panel panel2;
        private System.Windows.Forms.Button btn_Show;
        private System.Windows.Forms.Button btn_Hide;
        private System.Windows.Forms.TextBox tb_Station;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
    }
}