导表Excel 移除指定列修改
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
33e0470f5d
commit
55132ff36f
|
@ -11677,6 +11677,20 @@
|
|||
阅片问题.标准
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.SetTrialQuestionExportResult(IRaCIS.Core.Application.Service.Reading.Dto.SetTrialQuestionExportResultInDto)">
|
||||
<summary>
|
||||
设置项目问题导出
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetTrialQuestionExportResult(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialQuestionExportResultInDto)">
|
||||
<summary>
|
||||
获取项目的导出信息
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetCustomTableQuestionPreview(IRaCIS.Core.Application.Service.Reading.Dto.GetCustomQuestionPreviewInDto)">
|
||||
<summary>
|
||||
获取自定义表格问题预览
|
||||
|
@ -12827,6 +12841,13 @@
|
|||
<param name="trialAddModel"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialService.MarkTrialDelete(System.Guid)">
|
||||
<summary>
|
||||
标记项目删除
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TrialService.DeleteTrial(System.Guid,IRaCIS.Core.Infra.EFCore.IRepository)">
|
||||
<summary> 真删除项目 方便清理测试数据 </summary>
|
||||
<param name="trialId">临床试验项目Id</param>
|
||||
|
|
|
@ -1958,15 +1958,19 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var list = new List<ExportDocumentDes>();
|
||||
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == trialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync();
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == trialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName, t.ArbitrationRule, t.IsArbitrationReading }).FirstNotNullAsync();
|
||||
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonReading_Export, ExportCatogory = ExportResult.TableOfAssessmentResults });
|
||||
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonReadingDetail_Export, ExportCatogory = ExportResult.DetailedTableOfAssessmentResults });
|
||||
|
||||
if (criterion.IsArbitrationReading)
|
||||
{
|
||||
//仲裁阅片 才有裁判阅片明细表 同时要把模板里面的三列给去掉
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonJudgeReadingDetail_Export, ExportCatogory = ExportResult.DetailedTableOfAdjudicationResults });
|
||||
|
||||
}
|
||||
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonJudgeReadingDetail_Export, ExportCatogory = ExportResult.DetailedTableOfAdjudicationResults });
|
||||
|
||||
|
||||
if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB
|
||||
|
@ -2048,7 +2052,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
//每次查询必须是单标准的
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.IsGlobalReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync();
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId).Select(t => new { t.CriterionType, t.IsGlobalReading, t.IsArbitrationReading, t.CriterionName, t.ArbitrationRule }).FirstNotNullAsync();
|
||||
|
||||
|
||||
var query = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsAnalysisCreate == false && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze))
|
||||
|
@ -2075,6 +2079,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
#region 区分导表类型
|
||||
|
||||
var removeColumnIndexList = new List<int>() { 6, 7, 8 };
|
||||
var export_Template = StaticData.Export.CommonReading_Export;
|
||||
|
||||
if (inQuery.ReadingExportType == ExportResult.DetailedTableOfAdjudicationResults)
|
||||
|
@ -2579,9 +2584,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
{
|
||||
if (filteredList.Any(t => t.DoctorUserId == doctor.DoctorUserId))
|
||||
{
|
||||
doctor.TotalJudgeCount= filteredList.Where(t=>t.DoctorUserId==doctor.DoctorUserId).Count();
|
||||
doctor.TotalJudgeCount = filteredList.Where(t => t.DoctorUserId == doctor.DoctorUserId).Count();
|
||||
|
||||
doctor.JudgeAgreeCount= filteredList.Where(t => t.DoctorUserId == doctor.DoctorUserId).Count(t => t.JudgeResultTaskId == t.VisitTaskId);
|
||||
doctor.JudgeAgreeCount = filteredList.Where(t => t.DoctorUserId == doctor.DoctorUserId).Count(t => t.JudgeResultTaskId == t.VisitTaskId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<TrialPaymentPrice> _trialPaymentPriceRepository,
|
||||
IRepository<TrialDictionary> _trialDictionaryRepository,
|
||||
IRepository<TrialBodyPart> _trialBodyPartRepository,
|
||||
IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig,
|
||||
IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, ITrialService
|
||||
{
|
||||
|
||||
|
@ -411,7 +411,18 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标记项目删除
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete, Route("{trialId:guid}")]
|
||||
public async Task<IResponseOutput> MarkTrialDelete(Guid trialId)
|
||||
{
|
||||
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialId, u => new Trial() { IsDeleted = true });
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary> 真删除项目 方便清理测试数据 </summary>
|
||||
/// <param name="trialId">临床试验项目Id</param>
|
||||
|
@ -630,7 +641,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <returns></returns>
|
||||
[HttpPost("{trialId:guid}/{status:int}")]
|
||||
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
public async Task<IResponseOutput> UpdateEnrollStatus(Guid trialId, EnrollStatus status)
|
||||
{
|
||||
await _enrollDetailRepository.AddAsync(new EnrollDetail()
|
||||
|
|
|
@ -93,6 +93,60 @@ namespace IRaCIS.Core.Application.Service
|
|||
// await _oSSService.DeleteFromPrefix($"{deleteId}");
|
||||
//}
|
||||
|
||||
|
||||
var trialIdExistList = _trialRepository.Select(t => t.Id).ToList().Select(t=>t.ToString());
|
||||
|
||||
#region 列出根目录
|
||||
|
||||
var aliConfig = _oSSService.ObjectStoreServiceOptions.AliyunOSS;
|
||||
|
||||
var tempToken = _oSSService.GetObjectStoreTempToken();
|
||||
|
||||
var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint,
|
||||
tempToken.AliyunOSS.AccessKeyId,
|
||||
tempToken.AliyunOSS.AccessKeySecret,
|
||||
tempToken.AliyunOSS.SecurityToken);
|
||||
|
||||
|
||||
|
||||
var folderList = new List<string>();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ObjectListing objectListing = null;
|
||||
string nextMarker = null;
|
||||
do
|
||||
{
|
||||
// 使用 prefix 模拟目录结构,设置 MaxKeys 和 NextMarker
|
||||
objectListing = _ossClient.ListObjects(new Aliyun.OSS.ListObjectsRequest(aliConfig.BucketName)
|
||||
{
|
||||
Prefix = "", // 根目录,留空即可
|
||||
Delimiter = "/", // 使用 "/" 来区分目录
|
||||
MaxKeys = 100,
|
||||
Marker = nextMarker
|
||||
});
|
||||
|
||||
folderList.AddRange(objectListing.CommonPrefixes.Select(t => t.Trim('/')).ToList());
|
||||
|
||||
|
||||
// 设置 NextMarker 以获取下一页的数据
|
||||
nextMarker = objectListing.NextMarker;
|
||||
|
||||
} while (objectListing.IsTruncated);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Error: {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
//清理项
|
||||
|
||||
var needDeleteTrialIdList = folderList.Except(trialIdExistList).ToList();
|
||||
|
||||
#endregion
|
||||
|
||||
await _oSSService.DeleteFromPrefix($"{rootFolder}");
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
|
Loading…
Reference in New Issue