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