From 410fdd3618b05618c3eb0149d362cfa7296298dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carson=20-=20=E5=AE=9D=E9=B1=BC?= <44496710+kteong1012@users.noreply.github.com> Date: Fri, 18 Nov 2022 12:26:13 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8D=E4=BA=86$type-$value?= =?UTF-8?q?=E7=9A=84=E5=BD=A2=E5=BC=8F=E6=B2=A1=E6=9C=89=E8=AF=BB=E5=8F=96?= =?UTF-8?q?bean=E5=9C=A8=E8=A1=A8=E6=A0=BC=E6=B7=BB=E5=8A=A0=E7=9A=84sep?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7=E7=9A=84bug=E3=80=82=20(#30)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 宝鱼 --- src/Luban.Job.Cfg/Source/DataCreators/SheetDataCreator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Luban.Job.Cfg/Source/DataCreators/SheetDataCreator.cs b/src/Luban.Job.Cfg/Source/DataCreators/SheetDataCreator.cs index be5ce86..189f1d0 100644 --- a/src/Luban.Job.Cfg/Source/DataCreators/SheetDataCreator.cs +++ b/src/Luban.Job.Cfg/Source/DataCreators/SheetDataCreator.cs @@ -429,7 +429,6 @@ namespace Luban.Job.Cfg.DataCreators public DType Accept(TBean type, RowColumnSheet sheet, TitleRow row) { string sep = row.SelfTitle.Sep;// type.GetBeanAs().Sep; - if (row.Row != null) { var s = row.AsStream(sep); @@ -460,6 +459,8 @@ namespace Luban.Job.Cfg.DataCreators throw new Exception($"type:'{originBean.FullName}' 是多态类型,需要定义'{DefBean.EXCEL_TYPE_NAME_KEY}'列来指定具体子类型"); } TitleRow valueTitle = row.GetSubTitleNamedRow(DefBean.EXCEL_VALUE_NAME_KEY); + sep += valueTitle.SelfTitle.Sep; + sep += type.GetTag("sep"); string subType = typeTitle.Current?.ToString()?.Trim(); if (subType == null || subType == DefBean.BEAN_NULL_STR) {