外部人员管理端查看培训记录
parent
e9c6d123d3
commit
6dce301ff7
|
|
@ -92,6 +92,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public class UnionDocumentWithConfirmInfoView : UnionDocumentView
|
public class UnionDocumentWithConfirmInfoView : UnionDocumentView
|
||||||
{
|
{
|
||||||
|
public DocUserSignType SysDocUserSignType { get; set; }
|
||||||
|
|
||||||
|
public bool IsConfirmIdentityUserInner { get; set; }
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public bool IsNeedSendEmial { get; set; }
|
public bool IsNeedSendEmial { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
Task<IResponseOutput> UserConfirm(UserConfirmCommand userConfirmCommand);
|
Task<IResponseOutput> UserConfirm(UserConfirmCommand userConfirmCommand);
|
||||||
Task<List<TrialUserDto>> GetTrialUserSelect(Guid trialId);
|
Task<List<TrialUserDto>> GetTrialUserSelect(Guid trialId);
|
||||||
|
|
||||||
|
Task<IResponseOutput<PageOutput<UnionDocumentWithConfirmInfoView>>> GetSysDocumentConfirmList(SystemDocQuery inQuery);
|
||||||
|
|
||||||
|
|
||||||
//Task<PageOutput<DocumentUnionWithUserStatView>> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument);
|
//Task<PageOutput<DocumentUnionWithUserStatView>> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument);
|
||||||
//List<TrialUserUnionDocumentView> GetTrialUserDocumentList(Guid trialId);
|
//List<TrialUserUnionDocumentView> GetTrialUserDocumentList(Guid trialId);
|
||||||
|
|
|
||||||
|
|
@ -951,10 +951,13 @@ namespace IRaCIS.Core.Application.Services
|
||||||
return ResponseOutput.Ok(new PageOutput<UnionDocumentWithConfirmInfoView>());
|
return ResponseOutput.Ok(new PageOutput<UnionDocumentWithConfirmInfoView>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var systemDocQuery =
|
var systemDocQuery =
|
||||||
from sysDoc in _systemDocumentRepository.AsQueryable(false)
|
from sysDoc in _systemDocumentRepository.Where(t => t.IsPublish)
|
||||||
.Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true)
|
.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)))
|
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.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 => inQuery.UserTypeId != null ? t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserTypeId && t.IsUserRoleDisabled == false) : true)
|
||||||
.Where(t => isEA ? t.IsZhiZhun == true : true) //EA 只能查看内部人员文档
|
.Where(t => isEA ? t.IsZhiZhun == true : true) //EA 只能查看内部人员文档
|
||||||
|
|
@ -963,6 +966,8 @@ namespace IRaCIS.Core.Application.Services
|
||||||
select new UnionDocumentWithConfirmInfoView()
|
select new UnionDocumentWithConfirmInfoView()
|
||||||
{
|
{
|
||||||
IsSystemDoc = true,
|
IsSystemDoc = true,
|
||||||
|
SysDocUserSignType = sysDoc.DocUserSignType,
|
||||||
|
IsConfirmIdentityUserInner = identityUser.IsZhiZhun,
|
||||||
Id = sysDoc.Id,
|
Id = sysDoc.Id,
|
||||||
CreateTime = sysDoc.CreateTime,
|
CreateTime = sysDoc.CreateTime,
|
||||||
IsDeleted = sysDoc.IsDeleted,
|
IsDeleted = sysDoc.IsDeleted,
|
||||||
|
|
@ -994,6 +999,8 @@ namespace IRaCIS.Core.Application.Services
|
||||||
};
|
};
|
||||||
|
|
||||||
var unionQuery = systemDocQuery.IgnoreQueryFilters().Where(t => !(t.IsDeleted == true && t.ConfirmTime == null))
|
var unionQuery = systemDocQuery.IgnoreQueryFilters().Where(t => !(t.IsDeleted == true && t.ConfirmTime == null))
|
||||||
|
//外部人员 只签署 外部需要签署的
|
||||||
|
.Where(t => t.IsConfirmIdentityUserInner == false ? t.SysDocUserSignType == DocUserSignType.InnerAndOuter : true)
|
||||||
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
|
||||||
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
|
||||||
.WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null)
|
.WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue