This commit is contained in:
2024-06-06 15:25:51 +08:00
parent 46023f56c1
commit 9e177b69f7
3 changed files with 7 additions and 7 deletions

View File

@@ -518,7 +518,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
{
var jsonObj = input.propertyJson;
var eqpVal = jsonObj.GetValue("roweqp");
if (eqpVal is not null)
if (eqpVal is not null && eqpVal.Count()>0)
{
var eqpList = (jsonObj.Value<JArray>("roweqp"));
var eqpIds = eqpList.Select(x => x.Value<string>("id")).ToList();
@@ -550,7 +550,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
await _repository.AsSugarClient().Insertable(OrganizeRelationEntitys).ExecuteCommandAsync();
}
var processVal = jsonObj.GetValue("rowprocess");
if (processVal is not null)
if (processVal is not null && processVal.Count()>0)
{
//modifyby zhoukeda 2023.06.25
var dic = _repository.GetList(x => x.DeleteMark == null).ToDictionary(x => x.FullName, x => x.Id);
@@ -583,7 +583,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
}
}
var correlation = jsonObj.GetValue("correlation");
if (correlation is not null)
if (correlation is not null && correlation.Count()>0)
{
await _repository.AsSugarClient().Deleteable<OrganizeRelationEntity>(p => p.OrganizeId == id && p.ObjectType == "User").ExecuteCommandAsync();
var OrganizeRelationEntitys = new List<OrganizeRelationEntity>();