From e1755eb11a983867ed0eeb5f8579a77d23c6d273 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Mon, 7 Jul 2025 15:52:59 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E8=AE=BE=E7=BD=AE?=
=?UTF-8?q?=E5=8C=85=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj
index b2df13578..12aa90fdc 100644
--- a/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj
+++ b/IRaCIS.Core.Infra.EFCore/IRaCIS.Core.Infra.EFCore.csproj
@@ -28,7 +28,7 @@
-
+
From 4c60a32c7e5397113bf103b90aea09876a7fda89 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Mon, 7 Jul 2025 16:09:10 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A3=80=E6=9F=A5?=
=?UTF-8?q?=E6=8A=80=E6=9C=AF=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/TrialSiteUser/TrialService.cs | 2 +
.../Common/AuditingData.cs | 42 +++++++++++--------
2 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs
index e5e3f45fa..ce8be47c4 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs
@@ -328,6 +328,8 @@ namespace IRaCIS.Core.Application.Service
trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|";
trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|";
+ trial.UpdateTime = DateTime.Now;
+
var success = await _trialRepository.SaveChangesAsync();
//维护CRO Sponsor
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 8ce111e68..819d4f7d5 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -169,6 +169,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var memoryClinicalDataSetNameList = entitys.Where(x => x.Entity.GetType() == typeof(ClinicalDataTrialSet)).Select(t => t.Entity as ClinicalDataTrialSet)
.Where(t => t.TrialId == entity.Id && t.IsConfirm).Select(t => _userInfo.IsEn_Us ? t.ClinicalDataSetEnName : t.ClinicalDataSetName).ToList();
+ //项目字典TrialDictionary
+
+ var memoryModalityIdList = entitys.Where(x => x.Entity.GetType() == typeof(TrialDictionary)).Select(t => t.Entity as TrialDictionary)
+ .Where(t => t.TrialId == entity.Id && t.KeyName == StaticData.Modality).Select(t => t.DictionaryId).ToList();
+
+ var modalityList = _dbContext.Dictionary.Where(t => memoryModalityIdList.Contains(t.Id)).Select(t => _userInfo.IsEn_Us ? t.Value : t.ValueCN).ToList();
+
Guid id = entity.Id;
var oldentity = await _dbContext.Trial.Where(x => x.Id == id).Select(t => new
@@ -210,6 +217,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
ExtraIndentification = extraIdentification,
}, new
{
+ ModalityListStr = string.Join(",", modalityList),
//TrialDicList = string.Join(",", trialDics)
//CalledAE = trialDicomAE?.CalledAE,
@@ -224,7 +232,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
ClinicalDataSetNames = string.Join(",", clinicalDataSetNameList.Union(memoryClinicalDataSetNameList).Distinct().OrderBy(t => t)),
- }); ;
+ });
}
#region 已修改
@@ -2014,10 +2022,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
break;
-
+
}
- if(_userInfo.RequestUrl== "NoneDicomStudy/deleteNoneDicomStudy"|| _userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudyFile")
+ if (_userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudy" || _userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudyFile")
{
isDistinctionInterface = false;
@@ -2176,8 +2184,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
SubjectVisitId = noneDicomStudy.SubjectVisitId,
SubjectId = noneDicomStudy.SubjectId,
ObjectRelationParentId = x.VisitTaskId,
- ObjectRelationParentId2=x.NoneDicomStudyId,
- ObjectRelationParentId3=x.OriginNoneDicomStudyId,
+ ObjectRelationParentId2 = x.NoneDicomStudyId,
+ ObjectRelationParentId3 = x.OriginNoneDicomStudyId,
ExtraIndentification = extraIdentification
}, new
{
@@ -2614,9 +2622,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (entity.ReadingScope == ReadingScopeEnum.Site)
{
var siteIds = entity.ReadingPeriodSites.Select(t => t.TrialSiteId).ToList();
- if(siteIds == null || siteIds.Count == 0)
+ if (siteIds == null || siteIds.Count == 0)
{
- siteIds= await _dbContext.ReadingPeriodSite.Where(c => c.ReadingPeriodSetId== entity.Id).Select(t => t.TrialSiteId).ToListAsync();
+ siteIds = await _dbContext.ReadingPeriodSite.Where(c => c.ReadingPeriodSetId == entity.Id).Select(t => t.TrialSiteId).ToListAsync();
}
var nameList = _dbContext.TrialSite.Where(c => c.TrialId == entity.TrialId && siteIds.Contains(c.Id)).Select(t => t.TrialSiteCode).ToList();
@@ -3137,12 +3145,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
- var mark = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark)).Select(x=>x.Entity as ReadingTaskQuestionMark).FirstOrDefault();
+ var mark = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark)).Select(x => x.Entity as ReadingTaskQuestionMark).FirstOrDefault();
- var markName= string.Empty;
+ var markName = string.Empty;
if (mark != null)
{
- markName=mark.OrderMarkName;
+ markName = mark.OrderMarkName;
}
await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO()
@@ -3158,8 +3166,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}, new
{
- MarkName= markName,
- PicturePath= mark!=null?mark.PicturePath:string.Empty,
+ MarkName = markName,
+ PicturePath = mark != null ? mark.PicturePath : string.Empty,
QuestionAnswerList = taskQuestionAnswerList.Join(quesionList,
t => t.ReadingQuestionTrialId,
u => u.QuestionId,
@@ -3193,16 +3201,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var tableQuestionAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer)
.Where(x => x.RowId == entity.RowId && x.TableQuestionId == entity.TableQuestionId).FirstOrDefault();
- var answer=string.Empty;
-
+ var answer = string.Empty;
+
if (tableQuestionAnswer != null)
{
answer = tableQuestionAnswer.Answer;
}
- var rowMark= await _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefaultAsync();
+ var rowMark = await _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefaultAsync();
- var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us? x.QuestionEnName:x.QuestionName).FirstOrDefaultAsync();
+ var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
var liverSegmentation = await _dbContext.ReadingTableQuestionAnswer.Where(x => x.RowId == entity.RowId && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Answer).FirstOrDefaultAsync();
@@ -3219,7 +3227,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
TableQuestionName = tableQuestionName,
Answer = answer,
LiverSegmentation = liverSegmentation,
- },_userInfo.AuditIdentification);
+ }, _userInfo.AuditIdentification);
}
From 8d811155252421e35fb018d731e86803fcd77a1c Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 8 Jul 2025 10:20:08 +0800
Subject: [PATCH 3/7] =?UTF-8?q?oss=20=E7=BB=B4=E6=8A=A4=E5=A4=A7=E5=B0=8F?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=8F=98=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.API/appsettings.Prod_IRC.json | 8 ++++----
IRaCIS.Core.Application/Helper/OSSService.cs | 6 ++++--
IRaCIS.Core.Application/TestService.cs | 10 +++++-----
3 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/IRaCIS.Core.API/appsettings.Prod_IRC.json b/IRaCIS.Core.API/appsettings.Prod_IRC.json
index b318514e2..183eb939d 100644
--- a/IRaCIS.Core.API/appsettings.Prod_IRC.json
+++ b/IRaCIS.Core.API/appsettings.Prod_IRC.json
@@ -7,10 +7,10 @@
}
},
"ConnectionStrings": {
- "RemoteNew": "Server=101.132.193.237,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
- "Hangfire": "Server=101.132.193.237,1434;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
- //"RemoteNew": "Server=prod_mssql_standard,1433;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
- //"Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
+ //"RemoteNew": "Server=101.132.193.237,1434;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
+ //"Hangfire": "Server=101.132.193.237,1434;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
+ "RemoteNew": "Server=prod_mssql_standard,1433;Database=Prod_IRC;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true",
+ "Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
},
"ObjectStoreService": {
"ObjectStoreUse": "AliyunOSS",
diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs
index 8882d7dd7..58877a5a1 100644
--- a/IRaCIS.Core.Application/Helper/OSSService.cs
+++ b/IRaCIS.Core.Application/Helper/OSSService.cs
@@ -18,6 +18,7 @@ using Minio.DataModel.Args;
using Minio.Exceptions;
using System.Reactive.Linq;
using System.Runtime.InteropServices;
+using System.Web;
namespace IRaCIS.Core.Application.Helper;
@@ -1022,9 +1023,10 @@ public class OSSService : IOSSService
var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint, AliyunOSSTempToken.AccessKeyId, AliyunOSSTempToken.AccessKeySecret, AliyunOSSTempToken.SecurityToken);
- var metadata = _ossClient.GetObjectMetadata(aliConfig.BucketName, objectkey);
+ var key = HttpUtility.UrlDecode(objectkey);
+ var metadata = _ossClient.GetObjectMetadata(aliConfig.BucketName, key);
- long fileSize = metadata.ContentLength; // 文件大小(字节)
+ long fileSize = metadata?.ContentLength??0; // 文件大小(字节)
return fileSize;
}
diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs
index c9fe6896b..e9d5c9588 100644
--- a/IRaCIS.Core.Application/TestService.cs
+++ b/IRaCIS.Core.Application/TestService.cs
@@ -396,7 +396,7 @@ namespace IRaCIS.Core.Application.Service
[FromServices] IRepository _noneDicomStudyFileRepository,
[FromServices] IRepository _readingClinicalDataPDFRepository)
{
- var noneDicomList = _noneDicomStudyFileRepository.Where(t => t.FileSize == 0 || t.FileSize == null).Select(t => new { t.Path, t.Id }).ToList();
+ var noneDicomList = _noneDicomStudyFileRepository/*.Where(t=>t.NoneDicomStudy.TrialId==Guid.Parse("01000000-ac13-0242-3ae4-08dc9b0495c6"))*/.Where(t => t.FileSize == 0 || t.FileSize == null).Select(t => new { t.Path, t.Id }).ToList();
var clinicalDataPDFList = _readingClinicalDataPDFRepository.Where(t => t.Size == 0).Select(t => new { t.Path, t.Id }).ToList();
@@ -409,9 +409,9 @@ namespace IRaCIS.Core.Application.Service
await _noneDicomStudyFileRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new NoneDicomStudyFile() { FileSize = fileSize });
}
- catch (Exception)
+ catch (Exception ex)
{
-
+ Console.WriteLine(item.Path+" : " + ex.Message);
}
@@ -427,9 +427,9 @@ namespace IRaCIS.Core.Application.Service
await _readingClinicalDataPDFRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new ReadingClinicalDataPDF() { Size = (int)fileSize });
}
- catch (Exception)
+ catch (Exception ex)
{
-
+ Console.WriteLine(item.Path + " : " + ex.Message);
}
}
From 546d8e2cc368b46bae4b82ad39d0c89f8130d602 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Wed, 9 Jul 2025 11:04:10 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9D=9Edicom=20?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A3=80=E6=9F=A5=20=E6=98=AF=E5=90=A6?=
=?UTF-8?q?=E9=98=85=E7=89=87=20=E6=98=AF=E5=90=A6=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E7=A8=BD=E6=9F=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 819d4f7d5..9765f482f 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -67,7 +67,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
typeof(TrialSiteSurvey),
typeof(TrialSiteUserRole),
typeof(VisitStage),
- typeof(TrialSite)
+ typeof(TrialSite),
+ typeof(NoneDicomStudy)
+
};
}
}
@@ -2311,6 +2313,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var enrollId = first.EnrollId;
+ var trialReadingCriterionId = first.TrialReadingCriterionId;
+
Guid? trialId = Guid.Empty;
if (first.Enroll != null)
@@ -2326,12 +2330,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection(first, type, x => new InspectionConvertDTO()
{
//GeneralId 和ObjectRelationParentId 一样 会成环 所以查询的时候 需要排除自身
- GeneralId = enrollId,
+ GeneralId = IdentifierHelper.CreateGuid(enrollId.ToString(), trialReadingCriterionId.ToString()),
TrialId = trialId,
ObjectRelationParentId = enrollId,
+ ObjectRelationParentId2=trialReadingCriterionId,
+
IsDistinctionInterface = false
}, new
{
From 5ac9a37de2d8bb60befdf23b8ff0a2addfc7b4b6 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Wed, 9 Jul 2025 11:29:03 +0800
Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E6=8E=A7?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E6=98=AF=E5=90=A6=E9=98=85=E7=89=87=20?=
=?UTF-8?q?=E6=98=AF=E5=90=A6=E5=88=A0=E9=99=A4=20=E7=A8=BD=E6=9F=A5?=
=?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 9765f482f..baf0e84e8 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -68,7 +68,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
typeof(TrialSiteUserRole),
typeof(VisitStage),
typeof(TrialSite),
- typeof(NoneDicomStudy)
+ typeof(NoneDicomStudy),
+ typeof(NoneDicomStudyFile),
+ typeof(DicomInstance),
+ typeof(DicomSeries),
+ typeof(DicomStudy)
};
}
From be4826a6ba662a5cecae6c72d828a15a191dfa89 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Wed, 9 Jul 2025 11:33:24 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9dicom=20=E6=A3=80?=
=?UTF-8?q?=E6=9F=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index baf0e84e8..865a1ad26 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -71,8 +71,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
typeof(NoneDicomStudy),
typeof(NoneDicomStudyFile),
typeof(DicomInstance),
- typeof(DicomSeries),
- typeof(DicomStudy)
+ typeof(DicomSeries)
};
}
From d567b9d2522ec66d27dab09a79b747ad39f56808 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Wed, 9 Jul 2025 11:47:09 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0dicom=20study?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 865a1ad26..baf0e84e8 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -71,7 +71,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
typeof(NoneDicomStudy),
typeof(NoneDicomStudyFile),
typeof(DicomInstance),
- typeof(DicomSeries)
+ typeof(DicomSeries),
+ typeof(DicomStudy)
};
}