From a86a5aa087f032695ebfa9f11d859b88eee3038d Mon Sep 17 00:00:00 2001 From: zhaozhenjing Date: Wed, 17 Sep 2025 17:10:24 +0800 Subject: [PATCH] =?UTF-8?q?[MODIFY]=20=E8=B6=8A=E7=95=8C=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Impl/Business/AppAnnouncementService.cs | 3 +-- .../Impl/Business/AppEarlyWarningService.cs | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) 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); }