diff --git a/IRC.Core.SCP/appsettings.US_Prod_SCP.json b/IRC.Core.SCP/appsettings.US_Prod_SCP.json new file mode 100644 index 000000000..3387edb1d --- /dev/null +++ b/IRC.Core.SCP/appsettings.US_Prod_SCP.json @@ -0,0 +1,31 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "ObjectStoreService": { + "ObjectStoreUse": "AWS", + "AWS": { + "endPoint": "s3.us-east-1.amazonaws.com", + "useSSL": true, + "accessKey": "AKIAW3MEAFJX5P32P6NA", + "secretKey": "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", + "bucketName": "ei-med-s3-lili-store", + "viewEndpoint": "https://ei-med-s3-lili-store.s3.amazonaws.com/" + } + }, + "ConnectionStrings": { + "RemoteNew": "Server=us-prod-mssql-service,1433;Database=US_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true", + "Hangfire": "Server=us-prod-mssql-service,1433;Database=US_IRC_Hangfire;User ID=sa;Password=xc@123456;TrustServerCertificate=true" + }, + "DicomSCPServiceConfig": { + "CalledAEList": [ + "STORESCP" + ], + "ServerPort": 11112 + } + +} diff --git a/IRaCIS.Core.Application/Service/QC/QCListService.cs b/IRaCIS.Core.Application/Service/QC/QCListService.cs index 3d838ea42..731296631 100644 --- a/IRaCIS.Core.Application/Service/QC/QCListService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCListService.cs @@ -638,7 +638,7 @@ namespace IRaCIS.Core.Application.Image.QA public async Task> GetSubjectVisitSelectList(Guid subjectId) { - var maxNum = await _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TaskState == TaskState.Effect && t.SignTime != null && t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.InOrder).MaxAsync(x => x.VisitTaskNum); + var maxNum = _visitTaskRepository.Where(t => t.SubjectId == subjectId && t.TaskState == TaskState.Effect && t.SignTime != null && t.TrialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.InOrder).MaxOrDefault(x => x.VisitTaskNum,0); return await _subjectVisitRepository.Where(t => t.SubjectId == subjectId&&t.VisitNum>= maxNum).OrderBy(T => T.VisitNum).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); diff --git a/IRaCIS.Core.Test/Program.cs b/IRaCIS.Core.Test/Program.cs index c9771b296..41a6fe3cd 100644 --- a/IRaCIS.Core.Test/Program.cs +++ b/IRaCIS.Core.Test/Program.cs @@ -47,25 +47,31 @@ partial class Program } #endregion - using (var context = new YourDbContext()) + + #region 直接通过上下文拿到实体信息 + + + var contextOptions = new DbContextOptionsBuilder().UseSqlServer(@"Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true").Options; + + using var dbContext = new IRaCISDBContext(contextOptions); + + var dbModel = dbContext.Model; + + foreach (var entityType in dbModel.GetEntityTypes()) { - var model = context.Model; + string tableName = entityType.GetTableName(); + Console.WriteLine($"Table: {tableName}"); - foreach (var entityType in model.GetEntityTypes()) + foreach (var property in entityType.GetProperties()) { - string tableName = entityType.GetTableName(); - Console.WriteLine($"Table: {tableName}"); + string columnName = property.GetColumnName(); + string dataType = property.ClrType.Name; + bool isNullable = property.IsNullable; - foreach (var property in entityType.GetProperties()) - { - string columnName = property.GetColumnName(); - string dataType = property.ClrType.Name; - bool isNullable = property.IsNullable; - - Console.WriteLine($" Column: {columnName}, Data Type: {dataType}, Is Nullable: {isNullable}"); - } + Console.WriteLine($" Column: {columnName}, Data Type: {dataType}, Is Nullable: {isNullable}"); } } + #endregion // 要生成的表名数组 @@ -77,7 +83,7 @@ partial class Program foreach (var templateFilePath in Directory.GetFiles(templateFolderPath)) { - var fileName=Path.GetFileNameWithoutExtension(templateFilePath); + var fileName = Path.GetFileNameWithoutExtension(templateFilePath); //模板放入具体的文件夹 //var folder = fileName == "Entity" ? "Entity" : fileName.Replace("Entity", ""); @@ -142,7 +148,7 @@ partial class Program //删除主键属性名 public string LowercaseTableNameId => char.ToLower(TableName[0]) + TableName.Substring(1) + "Id"; - public string LowercaseRepositoryName => $"_{char.ToLower(TableName[0]) + TableName.Substring(1)}Repository" ; + public string LowercaseRepositoryName => $"_{char.ToLower(TableName[0]) + TableName.Substring(1)}Repository"; public string LowercaseQueryableName => $"{char.ToLower(TableName[0]) + TableName.Substring(1)}Queryable";