修改检查时间

Uat_Study
hang 2022-04-19 12:52:04 +08:00
parent 16a38b4e4d
commit fe6ac1a8be
4 changed files with 555 additions and 554 deletions

View File

@ -985,7 +985,7 @@ namespace IRaCIS.Core.Application.Image.QA
bodyPart=x.BodyPartForEdit,
seriesNum=x.SeriesCount,
fileNum = x.InstanceCount,
studyTime=x.StudyTime.ToString("yyyy-MM-dd")
studyTime=x.StudyTime?.ToString("yyyy-MM-dd")
})
});

View File

@ -130,23 +130,24 @@ namespace IRaCIS.Core.Application.Contracts
//var verificationRecord = await _repository
// .FirstOrDefaultAsync<VerificationCode>(t => (t.EmailOrPhone == userInfo.EmailOrPhone) && t.Code == userInfo.verificationCode && t.CodeType == userInfo.verificationType);
var verificationRecord = await _repository
.FirstOrDefaultAsync<VerificationCode>(t => (t.EmailOrPhone == userInfo.EmailOrPhone) && t.Code == userInfo.verificationCode && t.CodeType == userInfo.verificationType);
////检查数据库是否存在该验证码
//if (verificationRecord == null)
//{
// return ResponseOutput.NotOk("Verification code error");
//}
//else
//{
// //检查验证码是否失效
// if (verificationRecord.ExpirationTime < DateTime.Now)
// {
// return ResponseOutput.NotOk("The verification code has expired");
// }
// else //验证码正确 并且 没有超时
//检查数据库是否存在该验证码
if (verificationRecord == null)
{
return ResponseOutput.NotOk("Verification code error");
}
else
{
//检查验证码是否失效
if (verificationRecord.ExpirationTime < DateTime.Now)
{
return ResponseOutput.NotOk("The verification code has expired");
}
else //验证码正确 并且 没有超时
{
TrialSiteSurvey dbEntity = null;
@ -295,7 +296,7 @@ namespace IRaCIS.Core.Application.Contracts
});
}
//}
}
}
@ -393,13 +394,13 @@ namespace IRaCIS.Core.Application.Contracts
var query = _trialSiteUserSurveyRepository
.Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId) )
.Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId))
.WhereIf(queryParam.UserTypeId != null, t => t.UserTypeId == queryParam.UserTypeId)
.WhereIf(queryParam.IsGenerateAccount != null, t => t.IsGenerateAccount == queryParam.IsGenerateAccount)
.WhereIf(queryParam.TrialRoleNameId != null, t => t.TrialRoleNameId == queryParam.TrialRoleNameId)
.WhereIf(queryParam.State != null && queryParam.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == queryParam.State)
.WhereIf(queryParam.State != null && queryParam.State == TrialSiteUserStateEnum.OverTime, t => t.InviteState == TrialSiteUserStateEnum.HasSend && t.ExpireTime < DateTime.Now)
.WhereIf(!string.IsNullOrEmpty(queryParam.UserName), t => (t.LastName + " / " + t.FirstName).Contains(queryParam.UserName) )
.WhereIf(!string.IsNullOrEmpty(queryParam.UserName), t => (t.LastName + " / " + t.FirstName).Contains(queryParam.UserName))
.WhereIf(!string.IsNullOrEmpty(queryParam.OrganizationName), t => t.OrganizationName.Contains(queryParam.OrganizationName))
.ProjectTo<TrialSiteUserSurveyAllDTO>(_mapper.ConfigurationProvider);
@ -624,7 +625,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpPut("{trialId:guid}/{trialSiteSurveyId:guid}")]
public async Task<IResponseOutput> AbandonSiteSurvey(Guid trialSiteSurveyId)
{
var survey = (await _trialSiteSurveyRepository.FirstOrDefaultAsync(t => t.Id == trialSiteSurveyId,true)).IfNullThrowConvertException();
var survey = (await _trialSiteSurveyRepository.FirstOrDefaultAsync(t => t.Id == trialSiteSurveyId, true)).IfNullThrowConvertException();
if (survey.State != TrialSiteSurveyEnum.ToSubmit)
{
@ -815,4 +816,4 @@ namespace IRaCIS.Core.Application.Contracts
}
}
}

View File

@ -59,7 +59,7 @@ namespace IRaCIS.Core.Application.MediatR.Handlers
{
SubjectVisitId = sv.Id,
SiteCode = trialSite.TrialSiteCode,
StudyDate = study.StudyTime.ToString("yyyy-MM-dd"),
StudyDate = study.StudyTime == null?string.Empty: ((DateTime)study.StudyTime).ToString("yyyy-MM-dd"),
StudyId = study.Id,
Modality = study.Modalities,
SubjectCode = subject.Code,

View File

@ -26,7 +26,7 @@ namespace IRaCIS.Core.Domain.Models
public bool IsOverWindowNowNotOverWindow { get; set; }
public DateTime StudyTime { get; set; }
public DateTime? StudyTime { get; set; }
public string HistoryWindow { get; set; }