| | |
| | | { |
| | | int slantStartCol = slantSheet.Dimension.Columns; |
| | | |
| | | var barcodeCell = slantSheet.Cells[1, slantStartCol + 1, 1, slantStartCol + 2]; |
| | | barcodeCell.Merge = true; |
| | | //var barcodeCell = slantSheet.Cells[1, slantStartCol + 1, 1, slantStartCol + 2]; |
| | | //barcodeCell.Merge = true; |
| | | //barcodeCell.Value = exportData.ProductionMeasurementRecord.ProductionBarcode; |
| | | //SetTitleCell(barcodeCell); |
| | | |
| | | var barcodeCell = slantSheet.Cells[1, slantStartCol + 1]; |
| | | barcodeCell.Value = exportData.ProductionMeasurementRecord.ProductionBarcode; |
| | | SetTitleCell(barcodeCell); |
| | | |
| | |
| | | valueCell.Value = "Value"; |
| | | SetTitleCell(valueCell); |
| | | |
| | | var resultCell = slantSheet.Cells[2, slantStartCol + 2]; |
| | | resultCell.Value = "Result"; |
| | | SetTitleCell(resultCell); |
| | | //var resultCell = slantSheet.Cells[2, slantStartCol + 2]; |
| | | //resultCell.Value = "Result"; |
| | | //SetTitleCell(resultCell); |
| | | |
| | | slantMeasures.ForEach(m => |
| | | { |
| | |
| | | } |
| | | |
| | | var cellValue = slantSheet.Cells[rowIndex + 1 + 2, slantStartCol + 1]; |
| | | var cellResult = slantSheet.Cells[rowIndex + 1 + 2, slantStartCol + 2]; |
| | | //var cellResult = slantSheet.Cells[rowIndex + 1 + 2, slantStartCol + 2]; |
| | | |
| | | cellValue.Value = m.MeasurementValue; |
| | | cellResult.Value = m.MeasurementResult; |
| | | //cellResult.Value = m.MeasurementResult; |
| | | |
| | | if (m.MeasurementResult != "OK") |
| | | { |
| | | SetNGCell(cellValue); |
| | | SetNGCell(cellResult); |
| | | //SetNGCell(cellResult); |
| | | } |
| | | }); |
| | | } |
| | |
| | | keysList.Add($"{keys}_{position}"); |
| | | } |
| | | |
| | | var barcodeCell = alignmentSheet.Cells[1, aligneStartCol + 1, 1, aligneStartCol + 2]; |
| | | barcodeCell.Merge = true; |
| | | //var barcodeCell = alignmentSheet.Cells[1, aligneStartCol + 1, 1, aligneStartCol + 2]; |
| | | //barcodeCell.Merge = true; |
| | | //barcodeCell.Value = exportData.ProductionMeasurementRecord.ProductionBarcode; |
| | | //SetTitleCell(barcodeCell); |
| | | |
| | | var barcodeCell = alignmentSheet.Cells[1, aligneStartCol + 1]; |
| | | barcodeCell.Value = exportData.ProductionMeasurementRecord.ProductionBarcode; |
| | | SetTitleCell(barcodeCell); |
| | | |
| | |
| | | valueCell.Value = "Value"; |
| | | SetTitleCell(valueCell); |
| | | |
| | | var resultCell = alignmentSheet.Cells[2, aligneStartCol + 2]; |
| | | resultCell.Value = "Result"; |
| | | SetTitleCell(resultCell); |
| | | //var resultCell = alignmentSheet.Cells[2, aligneStartCol + 2]; |
| | | //resultCell.Value = "Result"; |
| | | //SetTitleCell(resultCell); |
| | | |
| | | alignmentMeasures.ForEach(a => |
| | | { |
| | |
| | | } |
| | | |
| | | var cellValue = alignmentSheet.Cells[rowIndex + 1 + 2, aligneStartCol + 1]; |
| | | var cellResult = alignmentSheet.Cells[rowIndex + 1 + 2, aligneStartCol + 2]; |
| | | //var cellResult = alignmentSheet.Cells[rowIndex + 1 + 2, aligneStartCol + 2]; |
| | | |
| | | cellValue.Value = a.MeasurementValue; |
| | | cellResult.Value = a.MeasurementResult; |
| | | //cellResult.Value = a.MeasurementResult; |
| | | |
| | | if (a.MeasurementResult != "OK") |
| | | { |
| | | SetNGCell(cellValue); |
| | | SetNGCell(cellResult); |
| | | //SetNGCell(cellResult); |
| | | } |
| | | }); |
| | | } |
| | |
| | | keysList.Add($"{keys}_{position}"); |
| | | } |
| | | |
| | | var barcodeCell = rowAlignmentSheet.Cells[1, aligneStartCol + 1, 1, aligneStartCol + 2]; |
| | | barcodeCell.Merge = true; |
| | | //var barcodeCell = rowAlignmentSheet.Cells[1, aligneStartCol + 1, 1, aligneStartCol + 2]; |
| | | //barcodeCell.Merge = true; |
| | | //barcodeCell.Value = exportData.ProductionMeasurementRecord.ProductionBarcode; |
| | | //SetTitleCell(barcodeCell); |
| | | |
| | | var barcodeCell = rowAlignmentSheet.Cells[1, aligneStartCol + 1]; |
| | | barcodeCell.Value = exportData.ProductionMeasurementRecord.ProductionBarcode; |
| | | SetTitleCell(barcodeCell); |
| | | |
| | |
| | | valueCell.Value = "Value"; |
| | | SetTitleCell(valueCell); |
| | | |
| | | var resultCell = rowAlignmentSheet.Cells[2, aligneStartCol + 2]; |
| | | resultCell.Value = "Result"; |
| | | SetTitleCell(resultCell); |
| | | //var resultCell = rowAlignmentSheet.Cells[2, aligneStartCol + 2]; |
| | | //resultCell.Value = "Result"; |
| | | //SetTitleCell(resultCell); |
| | | |
| | | rowAlignmentMeasures.ForEach(a => |
| | | { |
| | |
| | | } |
| | | |
| | | var cellValue = rowAlignmentSheet.Cells[rowIndex + 1 + 2, aligneStartCol + 1]; |
| | | var cellResult = rowAlignmentSheet.Cells[rowIndex + 1 + 2, aligneStartCol + 2]; |
| | | //var cellResult = rowAlignmentSheet.Cells[rowIndex + 1 + 2, aligneStartCol + 2]; |
| | | |
| | | cellValue.Value = a.MeasurementValue; |
| | | cellResult.Value = a.MeasurementResult; |
| | | //cellResult.Value = a.MeasurementResult; |
| | | |
| | | if (a.MeasurementResult != "OK") |
| | | { |
| | | SetNGCell(cellValue); |
| | | SetNGCell(cellResult); |
| | | //SetNGCell(cellResult); |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | private void SetNGCell(ExcelRange cell) |
| | | { |
| | | cell.Style.Font.Color.SetColor(Color.White); |
| | | cell.Style.Font.Color.SetColor(Color.Red); |
| | | cell.Style.Font.Bold = true; |
| | | cell.Style.Fill.PatternType = ExcelFillStyle.Solid; |
| | | cell.Style.Fill.BackgroundColor.SetColor(Color.Red); |
| | | //cell.Style.Fill.PatternType = ExcelFillStyle.Solid; |
| | | //cell.Style.Fill.BackgroundColor.SetColor(Color.Red); |
| | | } |
| | | |
| | | private void SetTitleCell(ExcelRange cell, bool isCenterAlign = true) |
| | |
| | | { |
| | | //results = results.Select(u => double.Parse(u.ToString("f2"))).ToList(); |
| | | LogAsync(DateTime.Now, $"{k.AliasName}原始数据", $"{string.Join(" ", results)}"); |
| | | |
| | | results.ForEach(u => u = u - Config.PlanCompensation); |
| | | resultDict = k.KeyResultList.ToDictionary(u => u, u => |
| | | { |
| | | int index = k.KeyResultList.IndexOf(u); |