修改文档返回状态

Uat_IRC_Net8
hang 2025-01-08 11:32:24 +08:00
parent cbfc2f9538
commit a21cca53f8
4 changed files with 20 additions and 13 deletions

View File

@ -58,12 +58,7 @@ namespace IRaCIS.Core.Application.Contracts
public string RealName { get; set; } = string.Empty;
//[JsonIgnore]
//public string IdentityUserTypes { get; set; }
//[JsonIgnore]
//public string DocNeedSignUserTypes { get; set; }
public string DocTypeCode { get; set; }
public List<string> UserConfirmedUserTypeList => (DocNeedSignUserTypeList != null && IdentityUserTypeList != null) ? IdentityUserTypeList.Intersect(DocNeedSignUserTypeList).ToList() : new List<string>();

View File

@ -150,7 +150,7 @@ namespace IRaCIS.Core.Application.Services
var query = from sysDoc in _systemDocumentRepository.AsQueryable(true)
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
.WhereIf(!string.IsNullOrEmpty(inQuery.Name), t => t.Name.Contains(inQuery.Name))
//外部人员 只签署 文档类型枚举值有值
//外部人员 只签署 外部需要签署
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
.WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId)
join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = _userInfo.IdentityUserId, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc
@ -178,6 +178,8 @@ namespace IRaCIS.Core.Application.Services
RealName = user.FullName,
UserName = user.UserName,
DocTypeCode=sysDoc.FileType.Code
//UserTypeId = user.UserTypeId,
//UserTypeShortName = user.UserTypeRole.UserTypeShortName
};
@ -187,7 +189,7 @@ namespace IRaCIS.Core.Application.Services
.Where(t => !(t.IsDeleted == true && t.ConfirmTime == null))
.WhereIf(inQuery.IsSigned == true, t => t.ConfirmTime != null)
.WhereIf(inQuery.IsSigned == false, t => t.ConfirmTime == null)
.ToPagedListAsync(inQuery);
.ToPagedListAsync(inQuery,nameof(UnionDocumentWithConfirmInfoView.DocTypeCode));
return list;

View File

@ -461,6 +461,8 @@ namespace IRaCIS.Core.Application.Contracts
public bool IsHaveSysDocNeedNeedSign { get; set; }
public bool IsFirstSysDocNeedSign { get; set; }
//public List<TrialDocNeedSign> TrialNeedSignList { get; set; }=new List<TrialDocNeedSign>();
}

View File

@ -665,7 +665,7 @@ namespace IRaCIS.Core.Application
{
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t=>t.UserRole.UserTypeId==_userInfo.UserTypeId)))
.Where(t => t.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
.Select(t => new ImageQualityToBeDoneDto()
{
@ -695,7 +695,7 @@ namespace IRaCIS.Core.Application
var toBeClaimedCount = _subjectVisitRepository.Where(t => t.Trial.TrialStatusStr == StaticData.TrialState.TrialOngoing)
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId))
&& t.SubmitState == SubmitStateEnum.Submitted && t.AuditState != AuditStateEnum.QCPassed && t.AuditState != AuditStateEnum.QCFailed)
.Where(u => u.CurrentActionUserId == null && (u.PreliminaryAuditUserId == null || (u.PreliminaryAuditUserId != _userInfo.UserRoleId && u.ReviewAuditUserId == null))).Count();
@ -1124,10 +1124,18 @@ namespace IRaCIS.Core.Application
var needSignSysDocCont = await _systemDocumentRepository.AsQueryable(true)
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
//外部人员 只签署 文档类型枚举值有值
//外部人员 只签署 外部需要签署
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
.SelectMany(t => t.NeedConfirmedUserTypeList)
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
//电子阅片声明是否已经签署
var isfirstSysDocNeedSign = await _systemDocumentRepository.AsQueryable(true)
.Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
//外部人员 只签署 外部需要签署的
.WhereIf(isInternal == false, t => t.DocUserSignType == DocUserSignType.InnerAndOuter)
.SelectMany(t => t.NeedConfirmedUserTypeList)
.AnyAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId && t.SystemDocument.FileType.Code == "-1");
var signedTrialCount = await _trialDocumentRepository.AsQueryable(true)
.Where(t => t.Trial.TrialIdentityUserList.Any(t => t.IdentityUserId == _userInfo.IdentityUserId && t.TrialUserRoleList.Any(t => t.UserRole.UserTypeId == _userInfo.UserTypeId)))
@ -1135,7 +1143,7 @@ namespace IRaCIS.Core.Application
.Where(t => t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null)).CountAsync();
var signedSysDocCont = await _systemDocumentRepository.AsQueryable(true)
.Where(t => t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
.Where(t => t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.IdentityUserId && t.ConfirmTime != null))
.SelectMany(t => t.NeedConfirmedUserTypeList)
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
@ -1170,7 +1178,7 @@ namespace IRaCIS.Core.Application
var record = new UserToBeDoneRecord()
{
IsFirstSysDocNeedSign= isfirstSysDocNeedSign,
IsHaveSysDocNeedNeedSign = needSignSysDocCont > 0,
//TrialNeedSignList= trialNeedSignList,