From ba98d871a6e9ed432f1a2d5d6e6f9bdc1c4efb22 Mon Sep 17 00:00:00 2001 From: wxt Date: Thu, 5 Feb 2026 09:45:14 +0800 Subject: [PATCH] --- 全自动水压检测仪/DATA/ConductividyClass.cs | 14 ------- 全自动水压检测仪/NormalTemperatureMode.cs | 7 ++-- 全自动水压检测仪/Report.cs | 47 +++++++++++++++++----- 3 files changed, 41 insertions(+), 27 deletions(-) diff --git a/全自动水压检测仪/DATA/ConductividyClass.cs b/全自动水压检测仪/DATA/ConductividyClass.cs index 6f2890d..b4adfd5 100644 --- a/全自动水压检测仪/DATA/ConductividyClass.cs +++ b/全自动水压检测仪/DATA/ConductividyClass.cs @@ -19,16 +19,6 @@ namespace 材料热传导系数 /// public string barcode { get; set; } - /// - /// 联络单号 - /// - public string ContactNumber { get; set; } - - /// - /// 件号 - /// - public string ItemNumber { get; set; } - /// /// 温度 /// @@ -181,8 +171,6 @@ namespace 材料热传导系数 connection.Open(); var sql = @"INSERT INTO normaltemperature ( barcode, - ContactNumber, - ItemNumber, temperature, startpressure, dwelltime, @@ -202,8 +190,6 @@ namespace 材料热传导系数 VALUES ( @barcode, - @ContactNumber, - @ItemNumber, @temperature, @startpressure, @dwelltime, diff --git a/全自动水压检测仪/NormalTemperatureMode.cs b/全自动水压检测仪/NormalTemperatureMode.cs index 4de51aa..365604d 100644 --- a/全自动水压检测仪/NormalTemperatureMode.cs +++ b/全自动水压检测仪/NormalTemperatureMode.cs @@ -1079,8 +1079,8 @@ namespace 全自动水压检测仪 CurrentReport.Add(new ConductivityTestData { barcode = barcode, - ContactNumber = contactNumber, - ItemNumber = itemNumber, + //ContactNumber = contactNumber, + //ItemNumber = itemNumber, CreateTime = DateTime.Now, diffpressure = uiTextBox6.Text.ToDouble(), dwelltime = uiTextBox8.Text.ToDouble(), @@ -1103,8 +1103,7 @@ namespace 全自动水压检测仪 _repository.InsertReportItems(new ConductivityTestData { barcode = barcode, - ContactNumber = contactNumber, - ItemNumber = itemNumber, + CreateTime = DateTime.Now, diffpressure = uiTextBox6.Text.ToDouble(), dwelltime = uiTextBox8.Text.ToDouble(), diff --git a/全自动水压检测仪/Report.cs b/全自动水压检测仪/Report.cs index 47eaa28..07c1b43 100644 --- a/全自动水压检测仪/Report.cs +++ b/全自动水压检测仪/Report.cs @@ -257,6 +257,19 @@ namespace 全自动水压检测仪 DataGridViewTextBoxColumn temperatureColumn = CreateTemperatureModeColumn(); dataGridView.Columns.Add(temperatureColumn); + dataGridView.Columns.Add(new DataGridViewTextBoxColumn + { + Name = "temperature", + HeaderText = "温度", + Width = 75, + DataPropertyName = "temperature", + SortMode = DataGridViewColumnSortMode.NotSortable, + DefaultCellStyle = { + Alignment = DataGridViewContentAlignment.MiddleCenter, + Format = "F2" + } + }); + dataGridView.Columns.Add(new DataGridViewTextBoxColumn { Name = "standarderror", @@ -562,7 +575,7 @@ namespace 全自动水压检测仪 currentRow += 2; // 表头 - string[] headers = { "编号", "联络单号", "件号", "刻字号", "数量", "初始压力(PSI)", "开始时间", "结束时间", "结束压力(PSI)", "保压时间(h)", "压差(PSI)", "温度模式", "标准差值(PSI)", "测试结果", "时间日期"}; + string[] headers = { "编号", "联络单号", "件号", "刻字号", "数量", "初始压力(PSI)", "开始时间", "结束时间", "结束压力(PSI)", "保压时间(h)", "压差(PSI)", "温度模式", "温度", "标准差值(PSI)", "测试结果", "时间日期" }; for (int i = 0; i < headers.Length; i++) { @@ -590,14 +603,30 @@ namespace 全自动水压检测仪 string tempMode = GetTemperatureModeDisplay(data.Type); worksheet.Cells[currentRow, 1].Value = data.Id; - worksheet.Cells[currentRow, 2].Value = data.ContactNumber ?? ""; - worksheet.Cells[currentRow, 3].Value = data.ItemNumber ?? ""; - worksheet.Cells[currentRow, 4].Value = data.CreateTime; - worksheet.Cells[currentRow, 5].Value = data.startpressure; - worksheet.Cells[currentRow, 6].Value = data.endpressure; - worksheet.Cells[currentRow, 7].Value = data.diffpressure; - worksheet.Cells[currentRow, 8].Value = data.dwelltime; - worksheet.Cells[currentRow, 9].Value = tempMode; + worksheet.Cells[currentRow, 2].Value = data.lldh ?? ""; + worksheet.Cells[currentRow, 3].Value = data.jh ?? ""; + + worksheet.Cells[currentRow, 4].Value = data.kzh ?? ""; + worksheet.Cells[currentRow, 5].Value = data.quantity; + worksheet.Cells[currentRow, 6].Value = data.startpressure; + + + + + worksheet.Cells[currentRow, 7].Value = data.starttime; + worksheet.Cells[currentRow, 8].Value = data.endtime; + + worksheet.Cells[currentRow, 9].Value = data.endpressure; + worksheet.Cells[currentRow, 10].Value = data.dwelltime; + + worksheet.Cells[currentRow, 11].Value = data.diffpressure; + worksheet.Cells[currentRow, 12].Value = tempMode; + worksheet.Cells[currentRow, 13].Value = data.temperature; + worksheet.Cells[currentRow, 14].Value = data.standarderror; + worksheet.Cells[currentRow, 15].Value = data.testresult; + + worksheet.Cells[currentRow, 16].Value = data.CreateTime; + // 设置数据行样式 for (int col = 1; col <= 9; col++)