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
6ef41cae1d
|
@ -7,10 +7,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=101.132.193.237,1434;Database=Prod_IRC;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"
|
//"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",
|
"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"
|
"Hangfire": "Server=prod_mssql_standard,1433;Database=Prod_IRC_Hangfire;User ID=sa;Password=zhanying@2021;TrustServerCertificate=true"
|
||||||
},
|
},
|
||||||
"ObjectStoreService": {
|
"ObjectStoreService": {
|
||||||
"ObjectStoreUse": "AliyunOSS",
|
"ObjectStoreUse": "AliyunOSS",
|
||||||
|
|
|
@ -18,6 +18,7 @@ using Minio.DataModel.Args;
|
||||||
using Minio.Exceptions;
|
using Minio.Exceptions;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper;
|
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 _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;
|
return fileSize;
|
||||||
}
|
}
|
||||||
|
|
|
@ -328,6 +328,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|";
|
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.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|";
|
||||||
|
|
||||||
|
trial.UpdateTime = DateTime.Now;
|
||||||
|
|
||||||
var success = await _trialRepository.SaveChangesAsync();
|
var success = await _trialRepository.SaveChangesAsync();
|
||||||
|
|
||||||
//维护CRO Sponsor
|
//维护CRO Sponsor
|
||||||
|
|
|
@ -396,7 +396,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[FromServices] IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
[FromServices] IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||||
[FromServices] IRepository<ReadingClinicalDataPDF> _readingClinicalDataPDFRepository)
|
[FromServices] IRepository<ReadingClinicalDataPDF> _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();
|
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 });
|
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 });
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
typeof(TrialSiteSurvey),
|
typeof(TrialSiteSurvey),
|
||||||
typeof(TrialSiteUserRole),
|
typeof(TrialSiteUserRole),
|
||||||
typeof(VisitStage),
|
typeof(VisitStage),
|
||||||
typeof(TrialSite)
|
typeof(TrialSite),
|
||||||
|
typeof(NoneDicomStudy),
|
||||||
|
typeof(NoneDicomStudyFile),
|
||||||
|
typeof(DicomInstance),
|
||||||
|
typeof(DicomSeries),
|
||||||
|
typeof(DicomStudy)
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,6 +175,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
var memoryClinicalDataSetNameList = entitys.Where(x => x.Entity.GetType() == typeof(ClinicalDataTrialSet)).Select(t => t.Entity as ClinicalDataTrialSet)
|
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();
|
.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;
|
Guid id = entity.Id;
|
||||||
var oldentity = await _dbContext.Trial.Where(x => x.Id == id).Select(t => new
|
var oldentity = await _dbContext.Trial.Where(x => x.Id == id).Select(t => new
|
||||||
|
@ -210,6 +223,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
ExtraIndentification = extraIdentification,
|
ExtraIndentification = extraIdentification,
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
ModalityListStr = string.Join(",", modalityList),
|
||||||
//TrialDicList = string.Join(",", trialDics)
|
//TrialDicList = string.Join(",", trialDics)
|
||||||
|
|
||||||
//CalledAE = trialDicomAE?.CalledAE,
|
//CalledAE = trialDicomAE?.CalledAE,
|
||||||
|
@ -224,7 +238,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
ClinicalDataSetNames = string.Join(",", clinicalDataSetNameList.Union(memoryClinicalDataSetNameList).Distinct().OrderBy(t => t)),
|
ClinicalDataSetNames = string.Join(",", clinicalDataSetNameList.Union(memoryClinicalDataSetNameList).Distinct().OrderBy(t => t)),
|
||||||
|
|
||||||
|
|
||||||
}); ;
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 已修改
|
#region 已修改
|
||||||
|
@ -2019,7 +2033,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_userInfo.RequestUrl== "NoneDicomStudy/deleteNoneDicomStudy"|| _userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudyFile")
|
if (_userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudy" || _userInfo.RequestUrl == "NoneDicomStudy/deleteNoneDicomStudyFile")
|
||||||
{
|
{
|
||||||
isDistinctionInterface = false;
|
isDistinctionInterface = false;
|
||||||
|
|
||||||
|
@ -2178,8 +2192,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
SubjectVisitId = noneDicomStudy.SubjectVisitId,
|
SubjectVisitId = noneDicomStudy.SubjectVisitId,
|
||||||
SubjectId = noneDicomStudy.SubjectId,
|
SubjectId = noneDicomStudy.SubjectId,
|
||||||
ObjectRelationParentId = x.VisitTaskId,
|
ObjectRelationParentId = x.VisitTaskId,
|
||||||
ObjectRelationParentId2=x.NoneDicomStudyId,
|
ObjectRelationParentId2 = x.NoneDicomStudyId,
|
||||||
ObjectRelationParentId3=x.OriginNoneDicomStudyId,
|
ObjectRelationParentId3 = x.OriginNoneDicomStudyId,
|
||||||
ExtraIndentification = extraIdentification
|
ExtraIndentification = extraIdentification
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
@ -2305,6 +2319,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
var enrollId = first.EnrollId;
|
var enrollId = first.EnrollId;
|
||||||
|
|
||||||
|
var trialReadingCriterionId = first.TrialReadingCriterionId;
|
||||||
|
|
||||||
Guid? trialId = Guid.Empty;
|
Guid? trialId = Guid.Empty;
|
||||||
|
|
||||||
if (first.Enroll != null)
|
if (first.Enroll != null)
|
||||||
|
@ -2320,12 +2336,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
await InsertInspection<EnrollReadingCategory>(first, type, x => new InspectionConvertDTO()
|
await InsertInspection<EnrollReadingCategory>(first, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
//GeneralId 和ObjectRelationParentId 一样 会成环 所以查询的时候 需要排除自身
|
//GeneralId 和ObjectRelationParentId 一样 会成环 所以查询的时候 需要排除自身
|
||||||
GeneralId = enrollId,
|
GeneralId = IdentifierHelper.CreateGuid(enrollId.ToString(), trialReadingCriterionId.ToString()),
|
||||||
|
|
||||||
TrialId = trialId,
|
TrialId = trialId,
|
||||||
|
|
||||||
ObjectRelationParentId = enrollId,
|
ObjectRelationParentId = enrollId,
|
||||||
|
|
||||||
|
ObjectRelationParentId2=trialReadingCriterionId,
|
||||||
|
|
||||||
IsDistinctionInterface = false
|
IsDistinctionInterface = false
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
@ -2616,9 +2634,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
if (entity.ReadingScope == ReadingScopeEnum.Site)
|
if (entity.ReadingScope == ReadingScopeEnum.Site)
|
||||||
{
|
{
|
||||||
var siteIds = entity.ReadingPeriodSites.Select(t => t.TrialSiteId).ToList();
|
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();
|
var nameList = _dbContext.TrialSite.Where(c => c.TrialId == entity.TrialId && siteIds.Contains(c.Id)).Select(t => t.TrialSiteCode).ToList();
|
||||||
|
|
||||||
|
@ -3139,12 +3157,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)
|
if (mark != null)
|
||||||
{
|
{
|
||||||
markName=mark.OrderMarkName;
|
markName = mark.OrderMarkName;
|
||||||
}
|
}
|
||||||
|
|
||||||
await InsertInspection<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
|
||||||
|
@ -3160,8 +3178,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
|
||||||
MarkName= markName,
|
MarkName = markName,
|
||||||
PicturePath= mark!=null?mark.PicturePath:string.Empty,
|
PicturePath = mark != null ? mark.PicturePath : string.Empty,
|
||||||
QuestionAnswerList = taskQuestionAnswerList.Join(quesionList,
|
QuestionAnswerList = taskQuestionAnswerList.Join(quesionList,
|
||||||
t => t.ReadingQuestionTrialId,
|
t => t.ReadingQuestionTrialId,
|
||||||
u => u.QuestionId,
|
u => u.QuestionId,
|
||||||
|
@ -3195,16 +3213,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
var tableQuestionAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(x => x.Entity as ReadingTableQuestionAnswer)
|
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();
|
.Where(x => x.RowId == entity.RowId && x.TableQuestionId == entity.TableQuestionId).FirstOrDefault();
|
||||||
var answer=string.Empty;
|
var answer = string.Empty;
|
||||||
|
|
||||||
if (tableQuestionAnswer != null)
|
if (tableQuestionAnswer != null)
|
||||||
{
|
{
|
||||||
answer = tableQuestionAnswer.Answer;
|
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 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();
|
var liverSegmentation = await _dbContext.ReadingTableQuestionAnswer.Where(x => x.RowId == entity.RowId && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.liverSegmentation).Select(x => x.Answer).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
@ -3221,7 +3239,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
TableQuestionName = tableQuestionName,
|
TableQuestionName = tableQuestionName,
|
||||||
Answer = answer,
|
Answer = answer,
|
||||||
LiverSegmentation = liverSegmentation,
|
LiverSegmentation = liverSegmentation,
|
||||||
},_userInfo.AuditIdentification);
|
}, _userInfo.AuditIdentification);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<PackageReference Include="MassTransit" Version="8.4.0" />
|
<PackageReference Include="MassTransit" Version="8.4.0" />
|
||||||
<PackageReference Include="MassTransit.EntityFrameworkCore" Version="8.4.0" />
|
<PackageReference Include="MassTransit.EntityFrameworkCore" Version="8.4.0" />
|
||||||
<PackageReference Include="MassTransit.Hangfire" Version="8.4.0" />
|
<PackageReference Include="MassTransit.Hangfire" Version="8.4.0" />
|
||||||
<PackageReference Include="Hangfire.Core" Version="1.8.20" />
|
<PackageReference Include="Hangfire.Core" Version="1.8.18" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.10" />
|
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.10" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.15" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.15" />
|
||||||
|
|
Loading…
Reference in New Issue