@@ -17,6 +17,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
[ApiExplorerSettings(GroupName = "Trial")]
|
||||
public class SystemDocumentService(
|
||||
IRepository<SystemDocument> _systemDocumentRepository,
|
||||
IRepository<User> _userRepository,
|
||||
IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository) : BaseService, ISystemDocumentService
|
||||
{
|
||||
|
||||
@@ -146,10 +147,10 @@ namespace IRaCIS.Core.Application.Services
|
||||
var query = from sysDoc in _systemDocumentRepository.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||
join confirm in _repository.GetQueryable<SystemDocConfirmedUser>() on new { ConfirmUserId = _userInfo.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
|
||||
join user in _repository.GetQueryable<User>() on _userInfo.Id equals user.Id
|
||||
join user in _userRepository.Where() on _userInfo.Id equals user.Id
|
||||
|
||||
select new UnionDocumentWithConfirmInfoView()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user