检查清单BUG

This commit is contained in:
何美荣 2025-11-22 16:18:43 +08:00
parent 2670c3a18f
commit 2dc63f37c2

View File

@ -63,8 +63,9 @@ namespace APT.SK.WebApi.Controllers.Api
var checkUsers = entity.Nav_CheckUsers; var checkUsers = entity.Nav_CheckUsers;
entity.Nav_CheckUsers = null; entity.Nav_CheckUsers = null;
List<Guid> detailIds = new List<Guid>(); List<Guid> detailIds = new List<Guid>();
//List<Guid> hiddenIds = new List<Guid>(); List<Guid> deleteCheckUserIds = new List<Guid>();
List<Guid> basicIds = new List<Guid>(); List<Guid> basicIds = new List<Guid>();
deleteCheckUserIds = this.GetEntities<T_SK_CHECK_SET_USER>(t => t.CHECK_SET_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList();
detailIds = this.GetEntities<T_SK_CHECK_SET_CONTENTS>(t => t.CHECK_SET_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList(); detailIds = this.GetEntities<T_SK_CHECK_SET_CONTENTS>(t => t.CHECK_SET_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList();
basicIds = this.GetEntities<T_SK_CHECK_SET_CONTENTS_BASIC>(t => detailIds.Contains(t.CHECK_CONTENTS_SET_ID), new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList(); basicIds = this.GetEntities<T_SK_CHECK_SET_CONTENTS_BASIC>(t => detailIds.Contains(t.CHECK_CONTENTS_SET_ID), new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList();
//hiddenIds = this.GetEntities<T_SK_CHECK_SET_CONTENTS_HIDDEN>(t => detailIds.Contains(t.CHECK_CONTENTS_SET_ID), new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList(); //hiddenIds = this.GetEntities<T_SK_CHECK_SET_CONTENTS_HIDDEN>(t => detailIds.Contains(t.CHECK_CONTENTS_SET_ID), new BaseFilter(entity.ORG_ID)).Select(t => t.ID).ToList();
@ -76,6 +77,7 @@ namespace APT.SK.WebApi.Controllers.Api
if (checkUsers != null && checkUsers.Any()) if (checkUsers != null && checkUsers.Any())
{ {
checkUsers = checkUsers.Where(t => !t.IS_DELETED).ToList(); checkUsers = checkUsers.Where(t => !t.IS_DELETED).ToList();
checkUsers.ForEach(t => t.Nav_User = null);
} }
if (details != null && details.Any()) if (details != null && details.Any())
{ {
@ -393,8 +395,8 @@ namespace APT.SK.WebApi.Controllers.Api
{ {
if (basicIds != null && basicIds.Any()) if (basicIds != null && basicIds.Any())
this.BantchDeleteEntityNoCommit<T_SK_CHECK_SET_CONTENTS_BASIC>(basicIds); this.BantchDeleteEntityNoCommit<T_SK_CHECK_SET_CONTENTS_BASIC>(basicIds);
//if (hiddenIds != null && hiddenIds.Any()) if (deleteCheckUserIds != null && deleteCheckUserIds.Any())
// this.BantchDeleteEntityNoCommit<T_SK_CHECK_SET_CONTENTS_HIDDEN>(hiddenIds); this.BantchDeleteEntityNoCommit<T_SK_CHECK_SET_USER>(deleteCheckUserIds);
if (detailIds != null && detailIds.Any()) if (detailIds != null && detailIds.Any())
this.BantchDeleteEntityNoCommit<T_SK_CHECK_SET_CONTENTS>(detailIds); this.BantchDeleteEntityNoCommit<T_SK_CHECK_SET_CONTENTS>(detailIds);
if (entity != null) if (entity != null)