diff --git a/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppAnnouncementService.cs b/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppAnnouncementService.cs index 09d32ed..725807f 100644 --- a/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppAnnouncementService.cs +++ b/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppAnnouncementService.cs @@ -117,9 +117,8 @@ namespace ATS.NonCustodial.Application.Impl.Business var appAnnouncementViewStatistics = await _appAnnouncementViewStatisticsRepository.AsQueryable(false, true).Where(w => caseIdList.Contains(w.CaseId ?? -1)).Select(s => s.AnnouncementId).ToListAsync(); var express = GetExpression(input, _appAnnouncementRepository.AsQueryable(false, true)); - + express = express.Where(w => appAnnouncementViewStatistics.Contains(w.Id)); var rtn = (await base.GetPageAsync(input, express)); - rtn.Data = rtn.Data.Where(w => appAnnouncementViewStatistics.Contains(w.Id)).ToList(); return ResultOutput.Ok(rtn); } diff --git a/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppEarlyWarningService.cs b/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppEarlyWarningService.cs index 7046f50..8230c44 100644 --- a/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppEarlyWarningService.cs +++ b/src/2.services/ATS.NonCustodial.Application/Impl/Business/AppEarlyWarningService.cs @@ -265,7 +265,18 @@ namespace ATS.NonCustodial.Application.Impl.Business [AllowAnonymous] public async Task GetPageAsync(AppEarlyWarningGetPageInput input) { + //获取当前用户权限下的案件ids + var limits = User.limits; + var selectLimits = await _appCaseSupervisorRepository.AsQueryable(false, true) + .Where(w => limits.Contains(w.UnitId.ToString())) + .ToListAsync(); + var caseIdList = selectLimits.Select(w => w.CaseId).Distinct().ToList(); + + var express = await GetExpression(input, _appEarlyWarningRepository.AsQueryable(false, true)); + // 先应用案件ID过滤条件 + express = express.Where(w => caseIdList.Contains(w.CaseId)); + // 然后再获取分页数据 return await base.GetEntityAddPageAsync(input, express); }