This commit is contained in:
wxt
2026-02-05 09:45:14 +08:00
parent 3be8989028
commit ba98d871a6
3 changed files with 41 additions and 27 deletions

View File

@@ -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++)