Compare commits
No commits in common. "1aad2c6a3f374e521fc8619ef643a0d954f16df8" and "b68e91b71e4adec5659e8ce1ba2e399fb9c193c8" have entirely different histories.
1aad2c6a3f
...
b68e91b71e
|
|
@ -205,8 +205,6 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public bool IsShowStudyName { get; set; } = false;
|
||||
|
||||
public bool IsQCQuestionConfirmed { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -485,17 +485,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
var sv = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).FirstNotNullAsync();
|
||||
|
||||
var trialConfirmTime = _trialRepository.Where(t => t.Id == sv.TrialId).Select(t => t.QCQuestionConfirmedTime).FirstOrDefault();
|
||||
|
||||
var secondReviewTime = inDto.SecondReviewTime != null ? (DateTime)inDto.SecondReviewTime : trialConfirmTime == null ? DateTime.Now : (DateTime)trialConfirmTime;
|
||||
|
||||
if ((sv.AuditState == AuditStateEnum.QCPassed && inDto.CurrentQCEnum != CurrentQC.SecondReview) || (inDto.CurrentQCEnum == CurrentQC.SecondReview && secondReviewTime.AddSeconds(1) < trialConfirmTime))
|
||||
if (sv.AuditState == AuditStateEnum.QCPassed && inDto.CurrentQCEnum != CurrentQC.SecondReview)
|
||||
{
|
||||
|
||||
//之前质控完的,+二次复核完的,都要从答案表中取 二次复核完的还需要加时间
|
||||
//现在之前历史质控的展示要从答案为主表取数据,添加和编辑按照之前方式
|
||||
|
||||
questionAnswerlist = await _trialQCQuestionAnswerRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId && x.QCProcessEnum == inDto.QCProcessEnum && x.CurrentQCEnum == inDto.CurrentQCEnum)
|
||||
.Where(t => inDto.CurrentQCEnum == CurrentQC.SecondReview ? t.SecondReviewTime >= secondReviewTime && t.SecondReviewTime <= secondReviewTime.AddSeconds(1) : true)
|
||||
.Select(data => new QCQuestionAnswer()
|
||||
{
|
||||
AnswerId = data.Id,
|
||||
|
|
@ -514,6 +509,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
else
|
||||
{
|
||||
|
||||
var secondReviewTime = inDto.SecondReviewTime != null ? (DateTime)inDto.SecondReviewTime : DateTime.Now;
|
||||
|
||||
#region 之前编辑和审核通过后展示都是通过这个接口
|
||||
|
||||
questionAnswerlist = await (from data in _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.IsEnable)
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
if (currentQCType == CurrentQC.SecondReview)
|
||||
{
|
||||
//二次复核自动领取,如果有人先领取了,那么后续不能操作
|
||||
await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.Id == subjectVisitId && t.CurrentActionUserId == null, u => new SubjectVisit() { CurrentActionUserId = _userInfo.UserRoleId, IsTake = true }, true);
|
||||
await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.Id == subjectVisitId && t.CurrentActionUserId == null, u => new SubjectVisit() { CurrentActionUserId = _userInfo.UserRoleId }, true);
|
||||
}
|
||||
//验证是否能操作
|
||||
await VerifyIsCanQCAsync(null, subjectVisitId);
|
||||
|
|
@ -1189,8 +1189,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
var dbSubjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId)).IfNullThrowException();
|
||||
|
||||
//await VerifyIsCanQCAsync(dbSubjectVisit);
|
||||
|
||||
if (dbSubjectVisit.CurrentActionUserId == null && dbSubjectVisit.IsTake == false)
|
||||
{
|
||||
|
||||
|
|
@ -2111,9 +2109,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
if (isSecondPass)
|
||||
{
|
||||
sv.SecondReviewState = SecondReviewState.AuditPassed;
|
||||
sv.IsTake = false;
|
||||
sv.CurrentActionUserId = null;
|
||||
sv.CurrentActionUserExpireTime = null;
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -874,11 +874,10 @@ namespace IRaCIS.Core.Application
|
|||
if (trialConfirmTime != null)
|
||||
{
|
||||
//删除复审中间临时数据
|
||||
await _qcQuestionAnswerRepository.BatchDeleteNoTrackingAsync(t => t.SubjectVisit.TrialId == signConfirmDTO.TrialId && t.SubjectVisit.SecondReviewState == SecondReviewState.WaitAudit
|
||||
&& t.CurrentQCEnum == CurrentQC.SecondReview && t.UpdateTime> trialConfirmTime);
|
||||
await _qcQuestionAnswerRepository.BatchDeleteNoTrackingAsync(t => t.SubjectVisit.TrialId == signConfirmDTO.TrialId && t.SubjectVisit.SecondReviewState != SecondReviewState.AuditPassed && t.CurrentQCEnum == CurrentQC.SecondReview);
|
||||
|
||||
//重复二次复核签名
|
||||
await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.TrialId == signConfirmDTO.TrialId && t.AuditState == AuditStateEnum.QCPassed
|
||||
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == signConfirmDTO.TrialId && t.AuditState == AuditStateEnum.QCPassed
|
||||
&& !t.TrialQCQuestionAnswerList.Any(t => t.SecondReviewTime == trialConfirmTime), u => new SubjectVisit() { SecondReviewState = SecondReviewState.WaitAudit });
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2012,15 +2012,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
//待处理?
|
||||
case "qcoperation/qcpassedorfailed":
|
||||
|
||||
if (entity.AuditState == AuditStateEnum.QCPassed && (entity.SecondReviewState == SecondReviewState.AuditPassed || entity.SecondReviewState == SecondReviewState.AuditFailed))
|
||||
{
|
||||
extraIdentification = "/SecondReviewFinished";
|
||||
}
|
||||
else
|
||||
{
|
||||
extraIdentification = "/" + (40 % (int)entity.AuditState).ToString();
|
||||
|
||||
}
|
||||
extraIdentification = "/" + (40 % (int)entity.AuditState).ToString();
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue