检查清单导入
This commit is contained in:
parent
7a71c59630
commit
ce9729c176
@ -499,7 +499,7 @@ namespace APT.SK.WebApi.Controllers.Api
|
||||
var dataTables = FileUtils.ReadExcelByOledb(filePath, startRowIndexs);
|
||||
string Msg = string.Empty;
|
||||
|
||||
bool isOK = InsertModel2(dataTables.Tables[0], orgId, ref Msg);
|
||||
bool isOK = InsertModel5(dataTables.Tables[0], orgId, ref Msg);
|
||||
|
||||
try
|
||||
{
|
||||
@ -1872,16 +1872,23 @@ namespace APT.SK.WebApi.Controllers.Api
|
||||
}
|
||||
}
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
if (!string.IsNullOrEmpty(Msg))
|
||||
{
|
||||
throw new Exception(Msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (setLists != null && setLists.Any())
|
||||
BantchAddEntityNoCommit(setLists);
|
||||
if (setContentLists != null && setContentLists.Any())
|
||||
BantchAddEntityNoCommit(setContentLists);
|
||||
if (setUserLists != null && setUserLists.Any())
|
||||
BantchAddEntityNoCommit(setUserLists);
|
||||
});
|
||||
Msg = "导入成功!";
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (setLists != null && setLists.Any())
|
||||
BantchAddEntityNoCommit(setLists);
|
||||
if (setContentLists != null && setContentLists.Any())
|
||||
BantchAddEntityNoCommit(setContentLists);
|
||||
if (setUserLists != null && setUserLists.Any())
|
||||
BantchAddEntityNoCommit(setUserLists);
|
||||
});
|
||||
Msg = "导入成功!";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user