处理直接添加组织 报错 bantchupdate_nodatabase
This commit is contained in:
parent
be9f3debc1
commit
04f94694b7
@ -549,6 +549,14 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
{
|
{
|
||||||
throw new Exception(message);
|
throw new Exception(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var listDepChange = entityUpdateList;
|
||||||
|
if (entityUpdateList != null && entityUpdateList.Count() > 0)
|
||||||
|
{
|
||||||
|
var listDepID = entityUpdateList.Select(e => e.ID);
|
||||||
|
entityUpdateList = GetEntities<T_FM_DEPARTMENT>(e => listDepID.Contains(e.ID), null).ToList();
|
||||||
|
listDepChange = listDepChange.Where(e => !e.IS_DELETED).ToList();
|
||||||
|
}
|
||||||
this.UnifiedCommit(() =>
|
this.UnifiedCommit(() =>
|
||||||
{
|
{
|
||||||
//BantchUpdateEntity_noneBase
|
//BantchUpdateEntity_noneBase
|
||||||
@ -572,6 +580,8 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
|||||||
this.BantchUpdateEntity_noneBase(teamInfos);
|
this.BantchUpdateEntity_noneBase(teamInfos);
|
||||||
if (entityUpdateList != null && entityUpdateList.Any())
|
if (entityUpdateList != null && entityUpdateList.Any())
|
||||||
this.BantchUpdateEntity_noneBase(entityUpdateList);
|
this.BantchUpdateEntity_noneBase(entityUpdateList);
|
||||||
|
if (listDepChange != null && listDepChange.Any())
|
||||||
|
BantchSaveEntityNoCommit(listDepChange);
|
||||||
//if (entity != null)
|
//if (entity != null)
|
||||||
// this.UpdateEntityNoCommit(entity);
|
// this.UpdateEntityNoCommit(entity);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user