|
|
|
@ -661,17 +661,19 @@ public class GradingResultVM : BaseViewModel |
|
|
|
|
col = 0; |
|
|
|
|
dataRow = sheet.CreateRow(row); |
|
|
|
|
Measurements info = algorithmResult.measurements; |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.M1}(mm)"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.M2}(mm)"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.M3}(mm)"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.TABLE*100}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.CROWN_HEIGHT * 100}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.PAV_DEPTH * 100}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.TOTAL_DEPTH * 100}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.CROWN_ANGLE}°"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.PAV_ANGLE}°"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.CULET}(mm)"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.GIRDLE * 100}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_A(info.M1)}(mm)"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_A(info.M2)}(mm)"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_A(info.M3)}(mm)"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_P(info.TABLE)}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_P(info.CROWN_HEIGHT)}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_P(info.PAV_DEPTH)}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_P(info.TOTAL_DEPTH)}%"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_A(info.CROWN_ANGLE)}°"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_A(info.PAV_ANGLE)}°"); |
|
|
|
|
// TODO 底尖直径 |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_A(info.CULET)}(mm)"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{FormatDouble_P(info.GIRDLE)}%"); |
|
|
|
|
// TODO 腰部厚度英文 |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($"{info.M1}"); |
|
|
|
|
dataRow.CreateCell(col++).SetCellValue($""); |
|
|
|
|
string sysmlevel = ""; |
|
|
|
@ -687,7 +689,24 @@ public class GradingResultVM : BaseViewModel |
|
|
|
|
{ |
|
|
|
|
workbook.Write(stream); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// 百分比用的小数格式化 |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="value"></param> |
|
|
|
|
/// <returns></returns> |
|
|
|
|
private string FormatDouble_P(double value) |
|
|
|
|
{ |
|
|
|
|
return (Math.Floor(value*1000)/10).ToString(digitsFormat); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// 直接值(角度,直径)用的小数格式化 |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="value"></param> |
|
|
|
|
/// <returns></returns> |
|
|
|
|
private string FormatDouble_A(double value) |
|
|
|
|
{ |
|
|
|
|
return (Math.Floor(value * 10) / 10).ToString(digitsFormat); |
|
|
|
|
} |
|
|
|
|
private void DatFile(string filePath) |
|
|
|
|
{ |
|
|
|
|