组织架构禁用
This commit is contained in:
parent
2cd428e446
commit
ecd013d264
@ -428,10 +428,10 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
var userList = new List<T_FM_USER>();
|
||||
var deleteDepartIds = new List<Guid>();
|
||||
var deleteUserIds = new List<Guid>();
|
||||
if (entity.MineType != null)
|
||||
if (entity.PRODUCTION_UNIT_ID != null)
|
||||
{
|
||||
//var enumIds = productionUnit.Select(t => t.ENUMS_ID).Distinct().ToList();
|
||||
var enumList = this.GetEntity<T_FM_ENUMS>(t => t.CODE == "BSMineTypeEnum" && t.VALUE == entity.MineType);
|
||||
//var enumList = this.GetEntity<T_FM_ENUMS>(t => t.CODE == "BSMineTypeEnum" && t.VALUE == entity.MineType);
|
||||
//查所有下级部门组织
|
||||
List<Guid> departmentId = new List<Guid>();
|
||||
departmentId.Add(entity.ID);
|
||||
@ -444,7 +444,7 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
t.MineType = entity.MineType;
|
||||
t.PRODUCTION_UNIT_ID = entity.PRODUCTION_UNIT_ID;
|
||||
T_FM_DEPARTMENT_PRODUCTION_UNIT unit = new T_FM_DEPARTMENT_PRODUCTION_UNIT();
|
||||
unit.ORG_ID = t.ORG_ID; unit.DEPARTMENT_ID = t.ID; unit.ENUMS_ID = enumList?.ID;
|
||||
unit.ORG_ID = t.ORG_ID; unit.DEPARTMENT_ID = t.ID; //unit.ENUMS_ID = enumList?.ID;
|
||||
unit.Nav_Enums = null; unit.DEPART_UNIT_ID = entity.PRODUCTION_UNIT_ID;
|
||||
unitList.Add(unit);
|
||||
if (t.Nav_ProdutionUnit != null && t.Nav_ProdutionUnit.Any())
|
||||
@ -468,9 +468,8 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
// enumValues.Add(value);
|
||||
//});
|
||||
//t.MineType = string.Join(",", enumValues);
|
||||
t.MineType = entity.MineType.ToString();
|
||||
T_FM_USER_PRODUCTION_UNIT unit = new T_FM_USER_PRODUCTION_UNIT();
|
||||
unit.ORG_ID = t.ORG_ID; unit.USER_ID = t.ID; unit.ENUMS_ID = enumList?.ID;
|
||||
unit.ORG_ID = t.ORG_ID; unit.USER_ID = t.ID; //unit.ENUMS_ID = enumList?.ID;
|
||||
unit.Nav_Enums = null; unit.PRODUCTION_UNIT_ID = entity.PRODUCTION_UNIT_ID;
|
||||
userUnitList.Add(unit);
|
||||
if (t.Nav_ProdutionUnit != null && t.Nav_ProdutionUnit.Any())
|
||||
@ -480,8 +479,22 @@ namespace APT.FM.WebApi.Controllers.Api.FM
|
||||
}
|
||||
});
|
||||
}
|
||||
if (entity.ENABLE_STATUS == 1)
|
||||
{
|
||||
entity.IS_DELETED = true;
|
||||
if (teamInfo != null)
|
||||
{
|
||||
teamInfo.ENABLE_STATUS = 1;
|
||||
teamInfo.IS_DELETED = true;
|
||||
}
|
||||
foreach (var item in unitList.Where(m => m.DEPARTMENT_ID == entity.ID))
|
||||
{
|
||||
item.IS_DELETED = true;
|
||||
}
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
//BantchUpdateEntity_noneBase
|
||||
//if (safeUser != null && safeUser.Any())
|
||||
// this.BantchSaveEntityNoCommit(safeUser);
|
||||
if (teamInfo != null)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user