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

IRC_NewDev
he 2024-07-26 10:16:11 +08:00
commit 880525b015
14 changed files with 80 additions and 39 deletions

View File

@ -142,7 +142,7 @@ namespace IRaCIS.Application.Services.BackGroundJob
};
// 添加文件更改事件的处理程序
FileSystemWatcher_US.Changed += (sender, e) => LoadJsonFile(usJsonPath);
FileSystemWatcher_US.Changed += (sender, e) => LoadJsonFile(StaticData.Folder.Resources+"\\"+ StaticData.En_US_Json);
FileSystemWatcher_CN = new FileSystemWatcher
@ -153,7 +153,7 @@ namespace IRaCIS.Application.Services.BackGroundJob
EnableRaisingEvents = true,
};
FileSystemWatcher_CN.Changed += (sender, e) => LoadJsonFile(cnJsonPath);
FileSystemWatcher_CN.Changed += (sender, e) => LoadJsonFile(StaticData.Folder.Resources + "\\" + StaticData.Zh_CN_Json);
}
@ -163,7 +163,7 @@ namespace IRaCIS.Application.Services.BackGroundJob
private void LoadJsonFile(string filePath)
{
Console.WriteLine("刷新json内存数据");
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath,false,true);
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath,false,false);
IConfigurationRoot enConfiguration = builder.Build();

View File

@ -375,10 +375,6 @@ namespace IRaCIS.Core.Application.Helper
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
.Build();
//var reqParams = new Dictionary<string, string>(StringComparer.Ordinal)
// {
// { "response-content-type", "application/json" }
// };
var args = new PresignedGetObjectArgs()
.WithBucket(minIOConfig.bucketName)
@ -404,7 +400,19 @@ namespace IRaCIS.Core.Application.Helper
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
.Build();
return string.Empty;
var args = new PresignedGetObjectArgs()
.WithBucket(minIOConfig.bucketName)
.WithObject(ossRelativePath)
.WithExpiry(3600);
var presignedUrl = await minioClient.PresignedGetObjectAsync(args);
Uri uri = new Uri(presignedUrl);
string relativePath = uri.PathAndQuery;
return relativePath;
}
else
{

View File

@ -14096,12 +14096,6 @@
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingClinicalDataService.GetReadingClinicalList(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListIndto)">
<summary>
获取临床数据集合
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingClinicalDataService.GetReadingClinicalDataPDFList(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataPDFListIndto)">
<summary>
获取单个阅片临床数据的所有文件

View File

@ -1416,6 +1416,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
{
task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
//在PM 的申请重阅的影响列表里也不能申请重阅
var pmApply = await _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default).Include(t => t.OriginalReReadingTask).FirstOrDefaultAsync();
// 有序
if (criterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
{
@ -1429,10 +1436,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
//在PM 的申请重阅的影响列表里也不能申请重阅
var pmApply = await _visitTaskReReadingRepository.Where(t => t.OriginalReReadingTask.TrialId == task.TrialId && t.OriginalReReadingTask.SubjectId == task.SubjectId && t.OriginalReReadingTask.TaskState == TaskState.Effect && t.OriginalReReadingTask.ReadingCategory == ReadingCategory.Visit
&& t.OriginalReReadingTask.ReadingTaskState == ReadingTaskState.HaveSigned && t.RequestReReadingType == RequestReReadingType.TrialGroupApply && t.RequestReReadingResultEnum == RequestReReadingResult.Default).Include(t => t.OriginalReReadingTask).FirstOrDefaultAsync();
if (pmApply != null)
{
@ -1461,13 +1464,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
throw new BusinessValidationFailedException(_localizer["VisitTask_LastReading"]);
}
if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology)))
if (task.ReadingCategory == ReadingCategory.Oncology && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Oncology && t.ReadingTaskState==ReadingTaskState.HaveSigned)))
{
//---有序阅片,只允许申请该受试者阅片人最后一次完成肿瘤学任务重阅
throw new BusinessValidationFailedException(_localizer["VisitTask_LastOncologistRecheck"]);
}
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge)))
if (task.ReadingCategory == ReadingCategory.Judge && await _visitTaskRepository.AnyAsync(filterExpression.And(t => t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned)))
{
//---有序阅片,只允许申请该受试者阅片人最后一次完成裁判的任务重阅
throw new BusinessValidationFailedException(_localizer["VisitTask_LastAdjudicatorRecheck"]);
@ -1476,6 +1479,22 @@ namespace IRaCIS.Core.Application.Service.Allocation
}
else
{
if (pmApply != null)
{
var originalTask = pmApply.OriginalReReadingTask;
//PM 无序影响列表
if (await _visitTaskRepository.Where(t => t.TrialId == originalTask.TrialId && t.SubjectId == originalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.IsAnalysisCreate == false && t.TrialReadingCriterionId == originalTask.TrialReadingCriterionId )
.Where(t=>t.Id==originalTask.Id||t.Id==originalTask.JudgeVisitTaskId)
.AnyAsync(t => t.VisitTaskNum == task.VisitTaskNum))
{
//---当前为无序阅片,影像存在问题,项目组已申请回退,暂不能申请重阅
throw new BusinessValidationFailedException(_localizer["VisitTask_RandomInvalidRereading"]);
}
}
//也要支持裁判重阅240701
if (task.ReadingCategory != ReadingCategory.Visit && task.ReadingCategory != ReadingCategory.Judge)
@ -1608,8 +1627,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
if ((origenalTask.TaskState != TaskState.Effect && origenalTask.TaskState != TaskState.Freeze))
{
await _visitTaskReReadingRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new VisitTaskReReading() { RequestReReadingConfirmUserId = _userInfo.Id, RequestReReadingResultEnum = RequestReReadingResult.Invalid });
//---当前申请重阅任务的状态,已被其他任务重阅已影响,不允许对该状态下的任务进行重阅同意与否操作
return ResponseOutput.NotOk(_localizer["VisitTask_ReapplyStatusConflict"]);
return ResponseOutput.Ok(string.Empty, msg:_localizer["VisitTask_ReapplyStatusConflict"]);
}

View File

@ -63,6 +63,8 @@ namespace IRaCIS.Core.Application.Contracts
public bool? IsDistinguishCriteria { get; set; }
public bool IsSystemLevel { get; set; } = false;
}
///<summary> EmailNoticeConfigAddOrEdit 列表查询参数模型</summary>

View File

@ -28,7 +28,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpPost]
public async Task<PageOutput<EmailNoticeConfigView>> GetEmailNoticeConfigList(EmailNoticeConfigQuery queryEmailNoticeConfig)
{
var emailNoticeConfigQueryable = _emailNoticeConfigrepository
var emailNoticeConfigQueryable = _emailNoticeConfigrepository.Where(t=>t.IsSystemLevel==queryEmailNoticeConfig.IsSystemLevel)
.WhereIf(queryEmailNoticeConfig.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == queryEmailNoticeConfig.IsDistinguishCriteria)
.WhereIf(queryEmailNoticeConfig.CriterionTypeEnum != null, t => t.CriterionTypeEnum == queryEmailNoticeConfig.CriterionTypeEnum)
.WhereIf(queryEmailNoticeConfig.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == queryEmailNoticeConfig.BusinessScenarioEnum)

View File

@ -53,7 +53,8 @@ namespace IRaCIS.Core.Application.Service
{
VerifyExp = u => u.IsDeleted == addOrEditExploreRecommend.IsDeleted && u.ExploreType == addOrEditExploreRecommend.ExploreType,
VerifyMsg = "当前浏览器启用版本只允许有一个",
// "当前类型浏览器启用版本只允许有一个"
VerifyMsg = _localizer["ExploreRecommend_OnlyOneTypePerType"] ,
IsVerify = addOrEditExploreRecommend.IsDeleted == false
};
@ -68,7 +69,7 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{exploreRecommendId:guid}")]
public async Task<IResponseOutput> DeleteExploreRecommend(Guid exploreRecommendId)
{
var success = await _exploreRecommendRepository.DeleteFromQueryAsync(t => t.Id == exploreRecommendId, true);
var success = await _exploreRecommendRepository.DeleteFromQueryAsync(t => t.Id == exploreRecommendId, true,true);
return ResponseOutput.Ok();
}
@ -80,8 +81,8 @@ namespace IRaCIS.Core.Application.Service
var result = await _exploreRecommendRepository.Where(t => t.IsDeleted == false).ProjectTo<ExploreRecommendView>(_mapper.ConfigurationProvider).ToListAsync();
if (result .Count==0)
{
throw new QueryBusinessObjectNotExistException("系统浏览器版本推荐未维护,请联系维护人员");
{ //"系统浏览器版本推荐未维护,请联系维护人员"
throw new QueryBusinessObjectNotExistException(_localizer["ExploreRecommend_NoExporeRecord"]);
}
return result;

View File

@ -50,21 +50,24 @@ namespace IRaCIS.Core.Application.Service
if (!Version.TryParse(addOrEditPublishLog.Version, out version))
{
return ResponseOutput.NotOk("版本号不符合要求");
//"版本号不符合要求"
return ResponseOutput.NotOk(_localizer["PublishLog_NotValidVersion"] );
}
var verifyExp1 = new EntityVerifyExp<PublishLog>()
{
VerifyExp = u => u.Version == addOrEditPublishLog.Version,
VerifyMsg = "发布编号不能重复"
//"发布编号不能重复"
VerifyMsg = _localizer["PublishLog_RepeatVersion"]
};
var verifyExp2 = new EntityVerifyExp<PublishLog>()
{
VerifyExp = u => u.IsCurrentVersion == addOrEditPublishLog.IsCurrentVersion,
VerifyMsg = "当前发布版本只允许有一个",
//"当前发布版本只允许有一个"
VerifyMsg = _localizer["PublishLog_OnlyOneCurrentVersion"] ,
IsVerify=addOrEditPublishLog.IsCurrentVersion==true
};
@ -90,8 +93,8 @@ namespace IRaCIS.Core.Application.Service
if (result == null)
{
//系统当前版本未标记,请联系维护人员
throw new QueryBusinessObjectNotExistException("系统当前版本未标记,请联系维护人员");
//"系统当前版本未标记,请联系维护人员"
throw new QueryBusinessObjectNotExistException(_localizer["PublishLog_NoCurrentVersion"] );
}
return result;

View File

@ -1346,12 +1346,15 @@ namespace IRaCIS.Core.Application
public async Task<IResponseOutput> AddOrUpdateTrialBodyPart(AddOrUpdateTrialBodyPartCommand incommand)
{
var codeList = await _repository.Where<TrialBodyPart>(t => t.TrialId == incommand.TrialId).Select(t => t.Code).ToListAsync();
var codeList = await _repository.Where<TrialBodyPart>(t => t.TrialId == incommand.TrialId)
.WhereIf(incommand.Id!=null,t=>t.Id!=incommand.Id)
.Select(t => t.Code).ToListAsync();
var newString = incommand.Code;
// 检查字符串是否在集合中存在,如果存在,则在后面加上一个数字
int count = 1;
while (codeList.Contains(newString))
{
newString = $"{newString}{count}";

View File

@ -72,7 +72,8 @@ namespace IRaCIS.Core.Application.Service
{
VerifyExp = u => u.IP == addOrEditDicomAE.IP && u.Port == addOrEditDicomAE.Port && u.TrialId == addOrEditDicomAE.TrialId,
VerifyMsg = "不允许添加相同的IP和端口的记录"
//"不允许添加相同的IP和端口的记录"
VerifyMsg = _localizer["TrialDicomAE_RepeatIPAndPort"]
};
//var verifyExp2 = new EntityVerifyExp<TrialDicomAE>()

View File

@ -55,13 +55,15 @@ namespace IRaCIS.Core.Application.Service
&& u.CallingAE == addOrEditTrialSiteDicomAE.CallingAE && u.TrialId == addOrEditTrialSiteDicomAE.TrialId
&& u.TrialSiteId == addOrEditTrialSiteDicomAE.TrialSiteId,
VerifyMsg = "不允许添加相同的记录"
//"不允许添加相同的记录"
VerifyMsg = _localizer["TrialSiteDicomAE_RepeatRecord"]
};
var verifyExp2 = new EntityVerifyExp<TrialSiteDicomAE>()
{
VerifyExp = u => u.CallingAE == addOrEditTrialSiteDicomAE.CallingAE && u.TrialId == addOrEditTrialSiteDicomAE.TrialId && u.TrialSiteId!=addOrEditTrialSiteDicomAE.TrialSiteId,
VerifyMsg = "其他中心已有该CallingAE"
// "其他中心已有该CallingAE"
VerifyMsg = _localizer["TrialSiteDicomAE_OtherSiteExistCallingAE"]
};

View File

@ -120,11 +120,14 @@ namespace IRaCIS.Application.Services
public async Task<IResponseOutput> TestMinIO([FromServices] IOSSService oSSService)
{
await oSSService.UploadToOSSAsync("C:\\Users\\Administrator\\Desktop\\TrialSiteUserImportTemplate.xlsx", "myfolder");
var str= await oSSService.GetSignedUrl("/01000000-c0a8-0242-1c98-08dc7ebcd37d/Read/01000000-c0a8-0242-1c98-08dc7ebcd37d/Visit/1716872544006_1716872544003.png");
await oSSService.DownLoadFromOSSAsync("/myfolder/TrialSiteUserImportTemplate.xlsx", "C:\\Users\\Administrator\\Desktop\\aws.xlsx");
return ResponseOutput.Ok();
//await oSSService.UploadToOSSAsync("C:\\Users\\Administrator\\Desktop\\TrialSiteUserImportTemplate.xlsx", "myfolder");
//await oSSService.DownLoadFromOSSAsync("/myfolder/TrialSiteUserImportTemplate.xlsx", "C:\\Users\\Administrator\\Desktop\\aws.xlsx");
return ResponseOutput.Ok(str);
}
[AllowAnonymous]

View File

@ -368,7 +368,9 @@ namespace IRaCIS.Core.Domain.Share
Agree = 1,
Reject = 2
Reject = 2,
Invalid = 3,
}
public enum ReReadingApplyState

View File

@ -69,6 +69,7 @@ namespace IRaCIS.Core.Domain.Models
public bool IsSystemLevel { get; set; }
/// <summary>
/// 是否区分标准