S_014
This commit is contained in:
@@ -105,6 +105,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public int? ToBeApprovalCount { get; set; }
|
||||
}
|
||||
|
||||
public class GetPMClinicalDataToBeDoneListOutDto: TrialBaseInfoDto
|
||||
{
|
||||
public int? ToBeApprovalCount { get; set; }
|
||||
}
|
||||
|
||||
public class ReviewerSelectToBeDoneQuery : PageInput
|
||||
{
|
||||
|
||||
@@ -294,6 +294,33 @@ namespace IRaCIS.Core.Application
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取PM核对临床数据
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput<PageOutput<GetPMClinicalDataToBeDoneListOutDto>>> GetPMClinicalDataToBeDoneList(ReviewerSelectToBeDoneQuery inQuery)
|
||||
{
|
||||
var query = _trialRepository
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
||||
{
|
||||
TrialId = t.Id,
|
||||
ResearchProgramNo = t.ResearchProgramNo,
|
||||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
|
||||
|
||||
ToBeApprovalCount = t.ReadModuleList.Where(u => u.IsCRCConfirm&&!u.IsPMConfirm).Count()
|
||||
});
|
||||
|
||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||
|
||||
|
||||
return ResponseOutput.Ok(result, new { ToBeApprovalCount = query.Sum(x=>x.ToBeApprovalCount) }); ;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user