commit
c146cf6031
|
|
@ -257,10 +257,33 @@ namespace Luban.Job.Cfg.DataConverts
|
|||
}
|
||||
|
||||
public int Accept(DMap data, TType type, Title x)
|
||||
{
|
||||
if (x.SelfMultiRows)
|
||||
{
|
||||
int oldStartRow = _startRowIndex;
|
||||
int totalRow = 0;
|
||||
try
|
||||
{
|
||||
var elementType = data.Type.ElementType;
|
||||
foreach (var ele in data.Datas)
|
||||
{
|
||||
int row = Math.Max(ele.Key.Apply(this, elementType, x), ele.Value.Apply(this, elementType, x));
|
||||
totalRow += row;
|
||||
_startRowIndex = oldStartRow + totalRow;
|
||||
}
|
||||
return totalRow;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_startRowIndex = oldStartRow;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetTitleValue(x, data.Apply(ToExcelStringVisitor.Ins, type.GetTag("sep")));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public int Accept(DVector2 data, TType type, Title x)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -443,7 +443,8 @@ namespace Luban.Job.Cfg.Defs
|
|||
{
|
||||
var source = new ExcelDataSource();
|
||||
var bytes = await this.Agent.GetFromCacheOrReadAllBytesAsync(file.ActualFile, file.MD5);
|
||||
var records = DataLoaderUtil.LoadCfgRecords(tableRecordType, file.OriginFile, null, bytes, true);
|
||||
(var actualFile, var sheetName) = FileUtil.SplitFileAndSheetName(FileUtil.Standardize(file.OriginFile));
|
||||
var records = DataLoaderUtil.LoadCfgRecords(tableRecordType, actualFile, sheetName, bytes, true);
|
||||
foreach (var r in records)
|
||||
{
|
||||
DBean data = r.Data;
|
||||
|
|
@ -541,7 +542,8 @@ namespace Luban.Job.Cfg.Defs
|
|||
{
|
||||
var source = new ExcelDataSource();
|
||||
var bytes = await this.Agent.GetFromCacheOrReadAllBytesAsync(file.ActualFile, file.MD5);
|
||||
var records = DataLoaderUtil.LoadCfgRecords(tableRecordType, file.OriginFile, null, bytes, true);
|
||||
(var actualFile, var sheetName) = FileUtil.SplitFileAndSheetName(FileUtil.Standardize(file.OriginFile));
|
||||
var records = DataLoaderUtil.LoadCfgRecords(tableRecordType, actualFile, sheetName, bytes, true);
|
||||
|
||||
foreach (var r in records)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue