修改斑块明细表,增加单位-修改1
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user