Compare commits
8 Commits
b68e91b71e
...
1aad2c6a3f
| Author | SHA1 | Date |
|---|---|---|
|
|
1aad2c6a3f | |
|
|
08ff24b14a | |
|
|
530d11c769 | |
|
|
24135801ac | |
|
|
d225e26d95 | |
|
|
a0b14d5957 | |
|
|
f776d2e663 | |
|
|
5099ad654e |
|
|
@ -205,6 +205,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public bool IsShowStudyName { get; set; } = false;
|
||||
|
||||
public bool IsQCQuestionConfirmed { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -485,12 +485,17 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
var sv = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).FirstNotNullAsync();
|
||||
|
||||
if (sv.AuditState == AuditStateEnum.QCPassed && inDto.CurrentQCEnum != CurrentQC.SecondReview)
|
||||
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))
|
||||
{
|
||||
|
||||
//现在之前历史质控的展示要从答案为主表取数据,添加和编辑按照之前方式
|
||||
//之前质控完的,+二次复核完的,都要从答案表中取 二次复核完的还需要加时间
|
||||
|
||||
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,
|
||||
|
|
@ -509,8 +514,6 @@ 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 }, true);
|
||||
await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.Id == subjectVisitId && t.CurrentActionUserId == null, u => new SubjectVisit() { CurrentActionUserId = _userInfo.UserRoleId, IsTake = true }, true);
|
||||
}
|
||||
//验证是否能操作
|
||||
await VerifyIsCanQCAsync(null, subjectVisitId);
|
||||
|
|
@ -1189,6 +1189,8 @@ 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)
|
||||
{
|
||||
|
||||
|
|
@ -2109,6 +2111,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
if (isSecondPass)
|
||||
{
|
||||
sv.SecondReviewState = SecondReviewState.AuditPassed;
|
||||
sv.IsTake = false;
|
||||
sv.CurrentActionUserId = null;
|
||||
sv.CurrentActionUserExpireTime = null;
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -874,10 +874,11 @@ namespace IRaCIS.Core.Application
|
|||
if (trialConfirmTime != null)
|
||||
{
|
||||
//删除复审中间临时数据
|
||||
await _qcQuestionAnswerRepository.BatchDeleteNoTrackingAsync(t => t.SubjectVisit.TrialId == signConfirmDTO.TrialId && t.SubjectVisit.SecondReviewState != SecondReviewState.AuditPassed && t.CurrentQCEnum == CurrentQC.SecondReview);
|
||||
await _qcQuestionAnswerRepository.BatchDeleteNoTrackingAsync(t => t.SubjectVisit.TrialId == signConfirmDTO.TrialId && t.SubjectVisit.SecondReviewState == SecondReviewState.WaitAudit
|
||||
&& t.CurrentQCEnum == CurrentQC.SecondReview && t.UpdateTime> trialConfirmTime);
|
||||
|
||||
//重复二次复核签名
|
||||
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == signConfirmDTO.TrialId && t.AuditState == AuditStateEnum.QCPassed
|
||||
await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.TrialId == signConfirmDTO.TrialId && t.AuditState == AuditStateEnum.QCPassed
|
||||
&& !t.TrialQCQuestionAnswerList.Any(t => t.SecondReviewTime == trialConfirmTime), u => new SubjectVisit() { SecondReviewState = SecondReviewState.WaitAudit });
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2012,7 +2012,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
//待处理?
|
||||
case "qcoperation/qcpassedorfailed":
|
||||
|
||||
extraIdentification = "/" + (40 % (int)entity.AuditState).ToString();
|
||||
if (entity.AuditState == AuditStateEnum.QCPassed && (entity.SecondReviewState == SecondReviewState.AuditPassed || entity.SecondReviewState == SecondReviewState.AuditFailed))
|
||||
{
|
||||
extraIdentification = "/SecondReviewFinished";
|
||||
}
|
||||
else
|
||||
{
|
||||
extraIdentification = "/" + (40 % (int)entity.AuditState).ToString();
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue