【项目签名文档限制】
parent
fd2b13b391
commit
f23963896d
|
@ -395,14 +395,14 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public bool IsHaveSysDocNeedNeedSign { get; set; }
|
||||
|
||||
public List<TrialDocNeedSign> TrialNeedSignList { get; set; }=new List<TrialDocNeedSign>();
|
||||
//public List<TrialDocNeedSign> TrialNeedSignList { get; set; }=new List<TrialDocNeedSign>();
|
||||
|
||||
}
|
||||
|
||||
public class TrialDocNeedSign: TrialBaseInfoDto
|
||||
{
|
||||
public bool IsHaveTrialDocNeedSign { get; set; }
|
||||
}
|
||||
//public class TrialDocNeedSign: TrialBaseInfoDto
|
||||
//{
|
||||
// public bool IsHaveTrialDocNeedSign { get; set; }
|
||||
//}
|
||||
|
||||
public class TrialUserToBeDoneDto
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using IRaCIS.Application.Contracts;
|
||||
using DocumentFormat.OpenXml.Office2010.ExcelAc;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Reading.Interface;
|
||||
|
@ -1174,6 +1175,22 @@ namespace IRaCIS.Core.Application
|
|||
#region 项目列表查询 + 待办详情
|
||||
|
||||
|
||||
public async Task<List<Guid>> GetNeedSignTrialDocTrialIdList()
|
||||
{
|
||||
if (!_userInfo.IsAdmin)
|
||||
{
|
||||
var list = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(!_userInfo.IsAdmin, 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)
|
||||
.Select(t => t.Id).ToListAsync();
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
return new List<Guid>();
|
||||
}
|
||||
|
||||
public async Task<UserToBeDoneRecord> GetUserTobeDoneRecord([FromServices] IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
[FromServices] IRepository<VisitTaskReReading> _visitTaskReReadingRepository,
|
||||
[FromServices] IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
||||
|
@ -1201,24 +1218,24 @@ namespace IRaCIS.Core.Application
|
|||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.CRCSubmitted).Count() > 0)
|
||||
.CountAsync();
|
||||
|
||||
var trialNeedSignList = new List<TrialDocNeedSign>();
|
||||
//var trialNeedSignList = new List<TrialDocNeedSign>();
|
||||
|
||||
if (!_userInfo.IsAdmin)
|
||||
{
|
||||
trialNeedSignList = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.WhereIf(!_userInfo.IsAdmin, 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)
|
||||
.Select(t=>new TrialDocNeedSign()
|
||||
{
|
||||
TrialId=t.Id,
|
||||
TrialCode=t.TrialCode,
|
||||
ExperimentName=t.ExperimentName,
|
||||
ResearchProgramNo=t.ResearchProgramNo,
|
||||
IsHaveTrialDocNeedSign=true
|
||||
}).ToListAsync();
|
||||
//if (!_userInfo.IsAdmin)
|
||||
//{
|
||||
// trialNeedSignList = await _trialRepository.Where(t => t.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||
// .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
// .WhereIf(!_userInfo.IsAdmin, 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)
|
||||
// .Select(t=>new TrialDocNeedSign()
|
||||
// {
|
||||
// TrialId=t.Id,
|
||||
// TrialCode=t.TrialCode,
|
||||
// ExperimentName=t.ExperimentName,
|
||||
// ResearchProgramNo=t.ResearchProgramNo,
|
||||
// IsHaveTrialDocNeedSign=true
|
||||
// }).ToListAsync();
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
@ -1227,7 +1244,7 @@ namespace IRaCIS.Core.Application
|
|||
#region sign document
|
||||
|
||||
IsHaveSysDocNeedNeedSign = needSignSysDocCont > 0,
|
||||
TrialNeedSignList= trialNeedSignList,
|
||||
//TrialNeedSignList= trialNeedSignList,
|
||||
|
||||
PM_SysWaitSignDocCount = isPM ? needSignSysDocCont : 0,
|
||||
PM_TrialWaitSignDocCount = isPM ? needSignTrialCount : 0,
|
||||
|
|
Loading…
Reference in New Issue