From 36856864477832989bfe48dc3f38c728bab97e6c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 29 Sep 2025 10:42:41 +0800 Subject: [PATCH] =?UTF-8?q?EA=20=E6=9F=A5=E7=9C=8B=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E7=94=A8=E6=88=B7=20=E6=96=87=E4=BB=B6=E7=BA=A7=E5=88=AB?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/TrialDocumentService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 06fdd2181..520bff7fb 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -911,12 +911,15 @@ namespace IRaCIS.Core.Application.Services var isInternal = _userInfo.IsZhiZhun; + var isEA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.EA; + var systemDocQuery = from sysDoc in _systemDocumentRepository.AsQueryable(false) .Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true) from identityUser in _identityUserRepository.AsQueryable(false).Where(t => t.Status == UserStateEnum.Enable && t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId))) .Where(t => inQuery.UserId != null ? t.Id == inQuery.UserId : true) .Where(t => inQuery.UserTypeId != null ? t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserTypeId && t.IsUserRoleDisabled == false) : true) + .Where(t => isEA ? t.IsZhiZhun == true : true) //EA 只能查看内部人员文档 join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = identityUser.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc from confirm in cc.DefaultIfEmpty() select new UnionDocumentWithConfirmInfoView() @@ -956,13 +959,13 @@ namespace IRaCIS.Core.Application.Services .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) .WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) - .WhereIf(isInternal == false, t => t.ConfirmTime != null); + .WhereIf(isInternal == false, t => t.ConfirmTime != null); //不是内部的人,看有签名时间的 var result = await unionQuery.ToPagedListAsync(inQuery); #region 处理文档 需要签署的角色类型 和每个人的角色信息 - var trialDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList(); + //var trialDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList(); var sysDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();