修改编译错误
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
f99cab6983
commit
805176c3ea
|
@ -158,7 +158,7 @@ public interface IOSSService
|
||||||
|
|
||||||
public Task MoveObject(string sourcePath, string destPath, bool overwrite = true);
|
public Task MoveObject(string sourcePath, string destPath, bool overwrite = true);
|
||||||
|
|
||||||
public long GetObjectSizeAsync(string sourcePath);
|
public Task<long> GetObjectSizeAsync(string sourcePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,41 @@ namespace IRaCIS.Core.Application.Service
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 非dicom 临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_identityUserRepository"></param>
|
||||||
|
/// <param name="_trialUserRoleRepository"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[AllowAnonymous]
|
||||||
|
public async Task<IResponseOutput> DealTialFileSie([FromServices] IOSSService _oSSService,
|
||||||
|
[FromServices] IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||||
|
[FromServices] IRepository<ReadingClinicalDataPDF> _readingClinicalDataPDFRepository)
|
||||||
|
{
|
||||||
|
var noneDicomList = _noneDicomStudyFileRepository.Where(t => t.FileSize == 0 || t.FileSize == null).Select(t => new { t.Path, t.Id }).ToList();
|
||||||
|
|
||||||
|
foreach (var item in noneDicomList)
|
||||||
|
{
|
||||||
|
var fileSize = await _oSSService.GetObjectSizeAsync(item.Path);
|
||||||
|
|
||||||
|
await _noneDicomStudyFileRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new NoneDicomStudyFile() { FileSize = fileSize });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var clinicalDataPDFList = _readingClinicalDataPDFRepository.Where(t => t.Size == 0).Select(t => new { t.Path, t.Id }).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var item in clinicalDataPDFList)
|
||||||
|
{
|
||||||
|
var fileSize = await _oSSService.GetObjectSizeAsync(item.Path);
|
||||||
|
|
||||||
|
await _readingClinicalDataPDFRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new ReadingClinicalDataPDF() { Size = (int)fileSize });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[LowerCamelCaseJson]
|
[LowerCamelCaseJson]
|
||||||
|
|
Loading…
Reference in New Issue