【优化】对于有标题头限定的可空bean,如果所有单元格为空,则取null(之前强制要求填null)

main
walon 2021-10-25 16:44:23 +08:00
parent 1494bb9cf8
commit dd582a37ee
1 changed files with 8 additions and 0 deletions

View File

@ -310,11 +310,19 @@ namespace Luban.Job.Cfg.DataCreators
if (row.Row != null)
{
var s = row.AsStream("");
if (type.IsNullable && s.TryReadEOF())
{
return null;
}
return type.Apply(ExcelStreamDataCreator.Ins, s);
}
else if (row.Rows != null)
{
var s = row.AsMultiRowConcatStream("");
if (type.IsNullable && s.TryReadEOF())
{
return null;
}
return type.Apply(ExcelStreamDataCreator.Ins, s);
}
else if (row.Fields != null)