Commit e9c7ba17 by lcx

返回log信息修改

parent a5ad549c
......@@ -104,8 +104,16 @@ private PerExcel Import(per_allot allot)
if (SheetType.Unidentifiable != sheetType)
{
logManageService.WriteMsg("开始读取excel文件", $"开始读取sheet -- {sheet.SheetName}", 1, allot.ID, "ReceiveMessage", true);
var st = perSheetService.Sheet(sheet, isnew);
excel.PerSheet.Add(st);
try
{
var st = perSheetService.Sheet(sheet, isnew);
excel.PerSheet.Add(st);
}
catch (Exception ex)
{
logManageService.WriteMsg("读取excel文件", ex.Message.ToString(), 4, allot.ID, "ReceiveMessage", true);
throw ex;
}
}
else
{
......
......@@ -43,7 +43,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
foreach (var item in headers)
{
if (!perHeader.Any(p => p.CellValue == item))
throw new NullReferenceException($"{sheet.SheetName}{item}为空");
throw new NullReferenceException($"sheet '{sheet.SheetName}'中列'{item}'为空");
}
for (int r = Point.DataFirstRowNum.Value; r < sheet.LastRowNum + 1; r++)
{
......
......@@ -46,7 +46,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
foreach (var item in headers)
{
if (!perHeader.Any(p => p.CellValue == item))
throw new NullReferenceException($"{sheet.SheetName}{item}为空");
throw new NullReferenceException($"sheet '{sheet.SheetName}'中列'{item}'为空");
}
for (int r = Point.DataFirstRowNum.Value; r < sheet.LastRowNum + 1; r++)
{
......
......@@ -45,7 +45,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
foreach (var item in headers)
{
if (!perHeader.Any(p => p.CellValue == item))
throw new NullReferenceException($"{sheet.SheetName}{item}为空");
throw new NullReferenceException($"sheet '{sheet.SheetName}'中列'{item}'为空");
}
for (int r = Point.DataFirstRowNum.Value; r < sheet.LastRowNum + 1; r++)
{
......
......@@ -38,7 +38,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
foreach (var item in headers)
{
if (!perHeader.Any(p => p.CellValue == item))
throw new NullReferenceException($"{sheet.SheetName}{item}为空");
throw new NullReferenceException($"sheet '{sheet.SheetName}'中列'{item}'为空");
}
// 特殊科室多科室聚合,合并时保留科室名称
string lastAccount = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment