修改斑块明细表,增加单位-修改1

This commit is contained in:
2025-12-18 13:44:39 +08:00
parent 2591a794bf
commit c55f7a427c
6 changed files with 151 additions and 29 deletions
@@ -699,7 +699,7 @@ public static class ExcelExportHelper
}
else
{
enumValues = JsonConvert.DeserializeObject<int[]>(itemValue)?? new int[0];
enumValues = JsonConvert.DeserializeObject<int[]>(itemValue) ?? new int[0];
}
@@ -709,7 +709,7 @@ public static class ExcelExportHelper
enumValues.Select(code =>
dynamicTranslateDataList[itemDicName]
.FirstOrDefault(t =>
string.Equals(code.ToString(),t.Code, StringComparison.OrdinalIgnoreCase)
string.Equals(code.ToString(), t.Code, StringComparison.OrdinalIgnoreCase)
) is var r && r != null
? (isEn_US ? r.Value : r.ValueCN)
: string.Empty
@@ -718,7 +718,7 @@ public static class ExcelExportHelper
else
{
translatedItemData = dynamicTranslateDataList[itemDicName].Where(t => t.Code.ToLower() == itemValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
translatedItemData = dynamicTranslateDataList[itemDicName].Where(t => t.Code.ToLower() == itemValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
}
@@ -727,7 +727,19 @@ public static class ExcelExportHelper
}
else
{
row.GetCell(writeIndex).SetCellValue(itemValue);
var unit = iteObjDic.ContainsKey("Unit") ? iteObjDic["Unit"]?.ToString() : null;
if (unit.IsNotNullOrEmpty() && unit == "9")
{
row.GetCell(writeIndex).SetCellValue(itemValue + "%");
}
else
{
row.GetCell(writeIndex).SetCellValue(itemValue);
}
}