增加统计字段
parent
21cc610095
commit
cd7318dd63
|
@ -382,6 +382,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public int? TrialWaitSignDocCount { get; set; }
|
||||
|
||||
public int? SysWaitSignDocCount { get; set; }
|
||||
|
||||
public int? TrialSignedDocCount { get; set; }
|
||||
public int? SysSignedDocCount { get; set; }
|
||||
|
||||
#region PM/APM
|
||||
public int? PM_SiteSurveryCount { get; set; }
|
||||
public int? PM_CheckCount { get; set; }
|
||||
|
|
|
@ -1212,6 +1212,17 @@ namespace IRaCIS.Core.Application
|
|||
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
||||
|
||||
var signedTrialCount = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped).Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Where(c => c.TrialDocumentList.Where(t => t.IsDeleted == false && t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)
|
||||
&& t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null)).Count() > 0).CountAsync();
|
||||
|
||||
var signedSysDocCont = await _systemDocumentRepository
|
||||
.Where(t => t.IsDeleted == false && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime != null))
|
||||
.SelectMany(t => t.NeedConfirmedUserTypeList)
|
||||
.CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId);
|
||||
|
||||
|
||||
|
||||
var siteSurveyCount = await _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0)
|
||||
|
@ -1248,6 +1259,9 @@ namespace IRaCIS.Core.Application
|
|||
SysWaitSignDocCount = needSignSysDocCont,
|
||||
TrialWaitSignDocCount = needSignTrialCount ,
|
||||
|
||||
TrialSignedDocCount=signedTrialCount,
|
||||
SysSignedDocCount=signedSysDocCont,
|
||||
|
||||
#region PM
|
||||
|
||||
PM_SiteSurveryCount = isPM ? siteSurveyCount : 0,
|
||||
|
|
Loading…
Reference in New Issue