Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
95fbe6085a
|
@ -541,10 +541,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var trialReadingCriterionId = filterObj.TrialReadingCriterionId;
|
var trialReadingCriterionId = filterObj.TrialReadingCriterionId;
|
||||||
|
|
||||||
|
//防止生成sql生成GETDATE() 时区导致的问题
|
||||||
|
var appDateTimeNow = DateTime.Now;
|
||||||
|
|
||||||
#region Subejct 维度
|
#region Subejct 维度
|
||||||
|
|
||||||
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && u.TrialReadingCriterionId == trialReadingCriterionId &&
|
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && u.TrialReadingCriterionId == trialReadingCriterionId &&
|
||||||
u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject) && u.DoctorUserId == doctorUserId;
|
u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < appDateTimeNow && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject) && u.DoctorUserId == doctorUserId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -562,7 +565,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//{
|
//{
|
||||||
// //这里的过滤条件 不能用 where(comonTaskFilter) 会报错,奇怪的问题 只能重新写一遍
|
// //这里的过滤条件 不能用 where(comonTaskFilter) 会报错,奇怪的问题 只能重新写一遍
|
||||||
// visitTaskFilter = visitTaskFilter.And(c => c.Subject.SubjectVisitTaskList.Any(t => t.VisitTaskNum == c.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global] && t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
// visitTaskFilter = visitTaskFilter.And(c => c.Subject.SubjectVisitTaskList.Any(t => t.VisitTaskNum == c.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global] && t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||||
// t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && (t.ReReadingApplyState == ReReadingApplyState.Default || t.ReReadingApplyState == ReReadingApplyState.Reject)));
|
// t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < appDateTimeNow && (t.ReReadingApplyState == ReReadingApplyState.Default || t.ReReadingApplyState == ReReadingApplyState.Reject)));
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
@ -758,9 +761,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var trialId = inQuery.TrialId;
|
var trialId = inQuery.TrialId;
|
||||||
|
|
||||||
|
//防止生成sql生成GETDATE() 时区导致的问题
|
||||||
|
var appDateTimeNow = DateTime.Now;
|
||||||
|
|
||||||
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject);
|
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject);
|
||||||
|
|
||||||
//&& u.TrialReadingCriterionId == trialReadingCriterionId &&u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && u.DoctorUserId == doctorUserId;
|
//&& u.TrialReadingCriterionId == trialReadingCriterionId &&u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < appDateTimeNow && u.DoctorUserId == doctorUserId;
|
||||||
|
|
||||||
Expression<Func<VisitTask, bool>> visitTaskFilter = comonTaskFilter.And(t => t.ReadingCategory == ReadingCategory.Visit);
|
Expression<Func<VisitTask, bool>> visitTaskFilter = comonTaskFilter.And(t => t.ReadingCategory == ReadingCategory.Visit);
|
||||||
|
|
||||||
|
@ -792,16 +798,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
MatchSubejctCount = taskConsistentRule.Trial.SubjectList.AsQueryable()
|
MatchSubejctCount = taskConsistentRule.Trial.SubjectList.AsQueryable()
|
||||||
.Where(t => taskConsistentRule.IsHaveReadingPeriod == false ? t.SubjectVisitTaskList.AsQueryable()
|
.Where(t => taskConsistentRule.IsHaveReadingPeriod == false ? t.SubjectVisitTaskList.AsQueryable()
|
||||||
.Where(visitTaskFilter).Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id)
|
.Where(visitTaskFilter).Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < appDateTimeNow && t.DoctorUserId == user.Id)
|
||||||
.Count() >= taskConsistentRule.PlanVisitCount :
|
.Count() >= taskConsistentRule.PlanVisitCount :
|
||||||
|
|
||||||
//全局要>计划访视数量后面
|
//全局要>计划访视数量后面
|
||||||
t.SubjectVisitTaskList.AsQueryable().Where(comonTaskFilter)
|
t.SubjectVisitTaskList.AsQueryable().Where(comonTaskFilter)
|
||||||
.Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id)
|
.Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < appDateTimeNow && t.DoctorUserId == user.Id)
|
||||||
.Where(t => t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global).Any(t => t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum>taskConsistentRule.PlanVisitCount-1)
|
.Where(t => t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global).Any(t => t.ReadingCategory == ReadingCategory.Global && t.VisitTaskNum>taskConsistentRule.PlanVisitCount-1)
|
||||||
&&
|
&&
|
||||||
t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter)
|
t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter)
|
||||||
.Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id)
|
.Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < appDateTimeNow && t.DoctorUserId == user.Id)
|
||||||
.Count()>= taskConsistentRule.PlanVisitCount
|
.Count()>= taskConsistentRule.PlanVisitCount
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -164,7 +164,6 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
.WhereIf(queryParam.UserTypeId != null, t => t.UserTypeId == queryParam.UserTypeId)
|
.WhereIf(queryParam.UserTypeId != null, t => t.UserTypeId == queryParam.UserTypeId)
|
||||||
.WhereIf(queryParam.IsGenerateAccount != null, t => t.IsGenerateAccount == queryParam.IsGenerateAccount)
|
.WhereIf(queryParam.IsGenerateAccount != null, t => t.IsGenerateAccount == queryParam.IsGenerateAccount)
|
||||||
.WhereIf(queryParam.State != null && queryParam.State != TrialSiteUserStateEnum.OverTime, t => t.InviteState == queryParam.State)
|
.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))
|
.WhereIf(!string.IsNullOrEmpty(queryParam.OrganizationName), t => t.OrganizationName.Contains(queryParam.OrganizationName))
|
||||||
.ProjectTo<TrialSiteUserSummaryDto>(_mapper.ConfigurationProvider);
|
.ProjectTo<TrialSiteUserSummaryDto>(_mapper.ConfigurationProvider);
|
||||||
|
@ -1153,6 +1152,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
|
|
||||||
var resultList = list.Where(t => t.ReadingCategory != ReadingCategory.Judge).ToList();
|
var resultList = list.Where(t => t.ReadingCategory != ReadingCategory.Judge).ToList();
|
||||||
|
|
||||||
|
|
||||||
if (arbitrationRule == ArbitrationRule.Visit)
|
if (arbitrationRule == ArbitrationRule.Visit)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1165,11 +1165,30 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
}
|
}
|
||||||
if (arbitrationRule == ArbitrationRule.Reading)
|
if (arbitrationRule == ArbitrationRule.Reading)
|
||||||
{
|
{
|
||||||
|
//先确定裁判选定的是谁
|
||||||
foreach (var item in resultList)
|
foreach (var item in resultList)
|
||||||
{
|
{
|
||||||
|
//以最后一次裁判为准 找到最大的裁判的裁判选择的Arm,相同就设置裁判标记
|
||||||
item.IsGenerateJudge = list.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.SubjectCode == item.SubjectCode && t.VisitTaskNum > item.VisitTaskNum
|
item.IsGenerateJudge = list.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.SubjectCode == item.SubjectCode && t.VisitTaskNum > item.VisitTaskNum
|
||||||
).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault()?.JudgeArmEnum == item.ArmEnum ? true : false;
|
).OrderByDescending(t => t.VisitTaskNum).FirstOrDefault()?.JudgeArmEnum == item.ArmEnum ? true : false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//全局裁判了,选择了那个全局,那么对应全局下面的访视 设置裁判标记
|
||||||
|
foreach (var item in resultList.Where(t => t.ReadingCategory == ReadingCategory.Visit))
|
||||||
|
{
|
||||||
|
|
||||||
|
var selectJudegeGlobalList = resultList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsGenerateJudge == true).ToList();
|
||||||
|
|
||||||
|
//全局修改了答案,那么给访视上赋值全局的结果 并且取的是最后的全局
|
||||||
|
var existGlobalAnswer = selectJudegeGlobalList.Where(t => t.SubjectCode == item.SubjectCode).SelectMany(t => t.GlobalTaskAnswerList).Where(t => t.VisitTaskId == item.Id)
|
||||||
|
.OrderByDescending(t => t.GlobalTaskVisitNum).FirstOrDefault()?.Answer;
|
||||||
|
|
||||||
|
item.OverallTumorEvaluationResult = string.IsNullOrEmpty(existGlobalAnswer) ? item.OverallTumorEvaluationResult : existGlobalAnswer;
|
||||||
|
|
||||||
|
item.IsGenerateJudge = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果没有产生裁判,默认选择R1
|
//如果没有产生裁判,默认选择R1
|
||||||
|
@ -1247,7 +1266,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||||
|
|
||||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
|
@ -1307,7 +1326,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||||
//处理裁判标记
|
//处理裁判标记
|
||||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||||
|
|
||||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t=>t.ReadingCategory!=ReadingCategory.Global).ToList(), _userInfo.TimeZoneId);
|
||||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||||
|
|
||||||
|
|
|
@ -536,10 +536,13 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpGet("{doctorId:guid}")]
|
[HttpGet("{doctorId:guid}")]
|
||||||
public async Task<ResumeConfirmDTO> GetAuditState(Guid doctorId)
|
public async Task<ResumeConfirmDTO> GetAuditState(Guid doctorId)
|
||||||
{
|
{
|
||||||
|
//防止生成sql生成GETDATE() 时区导致的问题
|
||||||
|
var appDateTimeNow = DateTime.Now;
|
||||||
|
|
||||||
var doctor = (await _doctorRepository
|
var doctor = (await _doctorRepository
|
||||||
.ProjectTo<ResumeConfirmDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync(t => t.Id == doctorId)).IfNullThrowException();
|
.ProjectTo<ResumeConfirmDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync(t => t.Id == doctorId)).IfNullThrowException();
|
||||||
|
|
||||||
doctor.InHoliday = (await _repository.CountAsync<Vacation>(x => x.DoctorId == doctorId && x.EndDate <= DateTime.Now && x.StartDate <= DateTime.Now)) > 0;
|
doctor.InHoliday = (await _repository.CountAsync<Vacation>(x => x.DoctorId == doctorId && x.EndDate <= appDateTimeNow && x.StartDate <= appDateTimeNow)) > 0;
|
||||||
|
|
||||||
return doctor;
|
return doctor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,10 @@ namespace IRaCIS.Application.Services
|
||||||
[NonDynamicMethod]
|
[NonDynamicMethod]
|
||||||
public async Task<IResponseOutput> OnVacation(Guid doctorId)
|
public async Task<IResponseOutput> OnVacation(Guid doctorId)
|
||||||
{
|
{
|
||||||
var count = await _vacationRepository.CountAsync(u => u.DoctorId == doctorId && u.EndDate >= DateTime.Now && u.StartDate <= DateTime.Now);
|
//防止生成sql生成GETDATE() 时区导致的问题
|
||||||
|
var appDateTimeNow = DateTime.Now;
|
||||||
|
|
||||||
|
var count = await _vacationRepository.CountAsync(u => u.DoctorId == doctorId && u.EndDate >= appDateTimeNow && u.StartDate <= appDateTimeNow);
|
||||||
|
|
||||||
return ResponseOutput.Result(count > 0);
|
return ResponseOutput.Result(count > 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,14 +27,15 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<SystemNoticeView>> GetSystemNoticeList(SystemNoticeQuery querySystemNotice)
|
public async Task<PageOutput<SystemNoticeView>> GetSystemNoticeList(SystemNoticeQuery querySystemNotice)
|
||||||
{
|
{
|
||||||
|
//防止生成sql生成GETDATE() 时区导致的问题
|
||||||
|
var appDateTimeNow = DateTime.Now;
|
||||||
|
|
||||||
var systemNoticeQueryable = _systemNoticeRepository
|
var systemNoticeQueryable = _systemNoticeRepository
|
||||||
.WhereIf(querySystemNotice.ApplicableProjectEnum != null, t => t.ApplicableProjectEnum == querySystemNotice.ApplicableProjectEnum)
|
.WhereIf(querySystemNotice.ApplicableProjectEnum != null, t => t.ApplicableProjectEnum == querySystemNotice.ApplicableProjectEnum)
|
||||||
.WhereIf(querySystemNotice.NoticeLevelEnum != null, t => t.NoticeLevelEnum == querySystemNotice.NoticeLevelEnum)
|
.WhereIf(querySystemNotice.NoticeLevelEnum != null, t => t.NoticeLevelEnum == querySystemNotice.NoticeLevelEnum)
|
||||||
.WhereIf(querySystemNotice.NoticeModeEnum != null, t => t.NoticeModeEnum == querySystemNotice.NoticeModeEnum)
|
.WhereIf(querySystemNotice.NoticeModeEnum != null, t => t.NoticeModeEnum == querySystemNotice.NoticeModeEnum)
|
||||||
.WhereIf(querySystemNotice.NoticeStateEnum != null && querySystemNotice.NoticeStateEnum != Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == querySystemNotice.NoticeStateEnum)
|
.WhereIf(querySystemNotice.NoticeStateEnum != null && querySystemNotice.NoticeStateEnum != Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == querySystemNotice.NoticeStateEnum)
|
||||||
.WhereIf(querySystemNotice.NoticeModeEnum != null && querySystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && t.EndDate !=null && t.EndDate < DateTime.Now)
|
.WhereIf(querySystemNotice.NoticeModeEnum != null && querySystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && t.EndDate !=null && t.EndDate < appDateTimeNow)
|
||||||
.WhereIf(querySystemNotice.NoticeTypeEnum != null, t => t.NoticeTypeEnum == querySystemNotice.NoticeTypeEnum)
|
.WhereIf(querySystemNotice.NoticeTypeEnum != null, t => t.NoticeTypeEnum == querySystemNotice.NoticeTypeEnum)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.FileName), t => t.FileName.Contains(querySystemNotice.FileName))
|
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.FileName), t => t.FileName.Contains(querySystemNotice.FileName))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.NoticeContent), t => t.NoticeContent.Contains(querySystemNotice.NoticeContent))
|
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.NoticeContent), t => t.NoticeContent.Contains(querySystemNotice.NoticeContent))
|
||||||
|
@ -117,13 +118,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<PageOutput<SystemNoticeReadDTO>> GetUserSystemNoticeList(SystemNoticeQuery querySystemNotice)
|
public async Task<PageOutput<SystemNoticeReadDTO>> GetUserSystemNoticeList(SystemNoticeQuery querySystemNotice)
|
||||||
{
|
{
|
||||||
|
//防止生成sql生成GETDATE() 时区导致的问题
|
||||||
|
var appDateTimeNow = DateTime.Now;
|
||||||
|
|
||||||
var systemNoticeQueryable = _systemNoticeRepository
|
var systemNoticeQueryable = _systemNoticeRepository
|
||||||
.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum==Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished)
|
.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum==Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished)
|
||||||
.WhereIf(querySystemNotice.ApplicableProjectEnum != null, t => t.ApplicableProjectEnum == querySystemNotice.ApplicableProjectEnum)
|
.WhereIf(querySystemNotice.ApplicableProjectEnum != null, t => t.ApplicableProjectEnum == querySystemNotice.ApplicableProjectEnum)
|
||||||
.WhereIf(querySystemNotice.NoticeLevelEnum != null, t => t.NoticeLevelEnum == querySystemNotice.NoticeLevelEnum)
|
.WhereIf(querySystemNotice.NoticeLevelEnum != null, t => t.NoticeLevelEnum == querySystemNotice.NoticeLevelEnum)
|
||||||
.WhereIf(querySystemNotice.NoticeModeEnum != null, t => t.NoticeModeEnum == querySystemNotice.NoticeModeEnum)
|
.WhereIf(querySystemNotice.NoticeModeEnum != null, t => t.NoticeModeEnum == querySystemNotice.NoticeModeEnum)
|
||||||
.WhereIf(querySystemNotice.NoticeStateEnum != null && querySystemNotice.NoticeStateEnum != Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == querySystemNotice.NoticeStateEnum)
|
.WhereIf(querySystemNotice.NoticeStateEnum != null && querySystemNotice.NoticeStateEnum != Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == querySystemNotice.NoticeStateEnum)
|
||||||
.WhereIf(querySystemNotice.NoticeModeEnum != null && querySystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && t.EndDate != null && t.EndDate < DateTime.Now)
|
.WhereIf(querySystemNotice.NoticeModeEnum != null && querySystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HaveExpired, t => t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && t.EndDate != null && t.EndDate < appDateTimeNow)
|
||||||
.WhereIf(querySystemNotice.NoticeTypeEnum != null, t => t.NoticeTypeEnum == querySystemNotice.NoticeTypeEnum)
|
.WhereIf(querySystemNotice.NoticeTypeEnum != null, t => t.NoticeTypeEnum == querySystemNotice.NoticeTypeEnum)
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.FileName), t => t.FileName.Contains(querySystemNotice.FileName))
|
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.FileName), t => t.FileName.Contains(querySystemNotice.FileName))
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.NoticeContent), t => t.NoticeContent.Contains(querySystemNotice.NoticeContent))
|
.WhereIf(!string.IsNullOrWhiteSpace(querySystemNotice.NoticeContent), t => t.NoticeContent.Contains(querySystemNotice.NoticeContent))
|
||||||
|
@ -135,9 +139,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
public async Task<List<SystemNoticeView>> GetUserNoticeList()
|
public async Task<List<SystemNoticeView>> GetUserNoticeList()
|
||||||
{
|
{
|
||||||
|
//防止生成sql生成GETDATE() 时区导致的问题
|
||||||
|
var appDateTimeNow = DateTime.Now;
|
||||||
|
|
||||||
var query = _systemNoticeRepository
|
var query = _systemNoticeRepository
|
||||||
.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id))
|
.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id))
|
||||||
.Where(t=>t.EndDate==null || t.EndDate != null && t.EndDate > DateTime.Now)
|
.Where(t=>t.EndDate==null || t.EndDate != null && t.EndDate > appDateTimeNow)
|
||||||
.ProjectTo<SystemNoticeView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
.ProjectTo<SystemNoticeView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
||||||
|
|
||||||
return await query.ToListAsync();
|
return await query.ToListAsync();
|
||||||
|
|
|
@ -865,13 +865,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public string OverallTumorEvaluationResult { get; set; }
|
public string OverallTumorEvaluationResult { get; set; }
|
||||||
|
|
||||||
|
|
||||||
#region old 废弃
|
|
||||||
|
|
||||||
//public Guid? JudgeResultTaskId { get; set; }
|
|
||||||
|
|
||||||
//[DictionaryTranslateAttribute("YesOrNo")]
|
|
||||||
//public bool IsGenerateJudge => JudgeResultTaskId != null;
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
public Arm? JudgeArmEnum { get; set; }
|
public Arm? JudgeArmEnum { get; set; }
|
||||||
|
@ -882,8 +875,20 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public bool IsGenerateJudge { get; set; }
|
public bool IsGenerateJudge { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
|
||||||
|
public List<GlobalAnswerInfo> GlobalTaskAnswerList { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GlobalAnswerInfo
|
||||||
|
{
|
||||||
|
public decimal GlobalTaskVisitNum { get; set; }
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public string Answer { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class RECIST1Point1EvaluationOfTumorEfficacyExport : OverallTumorEvaluationExport
|
public class RECIST1Point1EvaluationOfTumorEfficacyExport : OverallTumorEvaluationExport
|
||||||
|
|
|
@ -182,7 +182,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
|
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
|
||||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
|
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
|
||||||
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName));
|
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
||||||
|
.ForMember(o => o.GlobalTaskAnswerList, t => t.MapFrom(u => u.GlobalVisitResultList.Where(t=>t.GlobalAnswerType== GlobalAnswerType.Question)
|
||||||
|
.Select(c=>new GlobalAnswerInfo() { GlobalTaskVisitNum=c.VisitTask.VisitTaskNum,VisitTaskId=c.TaskId ,Answer=c.Answer})))
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
CreateMap<VisitTask, RECIST1Point1EvaluationOfTumorEfficacyExport>().IncludeBase<VisitTask, OverallTumorEvaluationExport>()
|
CreateMap<VisitTask, RECIST1Point1EvaluationOfTumorEfficacyExport>().IncludeBase<VisitTask, OverallTumorEvaluationExport>()
|
||||||
.ForMember(o => o.TargetlesionEvaluationResult, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.TargetLesion).FirstOrDefault()!.Answer))
|
.ForMember(o => o.TargetlesionEvaluationResult, t => t.MapFrom(u => u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.TargetLesion).FirstOrDefault()!.Answer))
|
||||||
|
|
|
@ -53,9 +53,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public string CalledAE { get; set; }
|
public string CalledAE { get; set; } = string.Empty;
|
||||||
public string IP { get; set; }
|
public string IP { get; set; } = string.Empty;
|
||||||
public int Port { get; set; }
|
public int? Port { get; set; }
|
||||||
public string Modality { get; set; } = string.Empty;
|
public string Modality { get; set; } = string.Empty;
|
||||||
public string Description { get; set; } = string.Empty;
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
|
@ -1248,7 +1248,8 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
//防止生成sql生成GETDATE() 时区导致的问题
|
||||||
|
var appDateTimeNow = DateTime.Now;
|
||||||
|
|
||||||
var record = new UserToBeDoneRecord()
|
var record = new UserToBeDoneRecord()
|
||||||
{
|
{
|
||||||
|
@ -1264,7 +1265,7 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
SysNoticeUnReadCount= await _systemNoticeRepository.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished
|
SysNoticeUnReadCount= await _systemNoticeRepository.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished
|
||||||
&& !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id))
|
&& !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id))
|
||||||
.Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > DateTime.Now)
|
.Where(t => t.EndDate == null || t.EndDate != null && t.EndDate > appDateTimeNow)
|
||||||
.CountAsync(),
|
.CountAsync(),
|
||||||
|
|
||||||
#region PM
|
#region PM
|
||||||
|
|
|
@ -83,12 +83,21 @@ namespace IRaCIS.Core.Application.Service
|
||||||
// IsVerify=addOrEditDicomAE.Id==null
|
// IsVerify=addOrEditDicomAE.Id==null
|
||||||
//};
|
//};
|
||||||
|
|
||||||
|
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == addOrEditDicomAE.TrialId, u => new Trial() { IsPACSConnect = addOrEditDicomAE.IsPACSConnect }, true);
|
||||||
|
|
||||||
|
|
||||||
|
if (addOrEditDicomAE.IsPACSConnect)
|
||||||
|
{
|
||||||
// 在此处拷贝automapper 映射
|
// 在此处拷贝automapper 映射
|
||||||
var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp1);
|
var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp1);
|
||||||
|
|
||||||
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == addOrEditDicomAE.TrialId, u => new Trial() { IsPACSConnect = addOrEditDicomAE.IsPACSConnect }, true);
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ using System.Collections.Generic;
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 项目的临床数据
|
/// 一致性分析临床数据
|
||||||
///</summary>
|
///</summary>
|
||||||
[Table("ReadingConsistentClinicalData")]
|
[Table("ReadingConsistentClinicalData")]
|
||||||
public class ReadingConsistentClinicalData : Entity, IAuditAdd
|
public class ReadingConsistentClinicalData : Entity, IAuditAdd
|
||||||
|
|
|
@ -8,7 +8,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
/// 项目的临床数据
|
/// 一致性分析临床数据
|
||||||
///</summary>
|
///</summary>
|
||||||
[Table("ReadingConsistentClinicalDataPDF")]
|
[Table("ReadingConsistentClinicalDataPDF")]
|
||||||
public class ReadingConsistentClinicalDataPDF : Entity, IAuditAdd
|
public class ReadingConsistentClinicalDataPDF : Entity, IAuditAdd
|
||||||
|
|
Loading…
Reference in New Issue