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
447d3fc36f
|
@ -1000,9 +1000,15 @@ public class OSSService : IOSSService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool isFirstCall = true;
|
||||||
public async Task<long> GetObjectSizeAsync(string sourcePath)
|
public async Task<long> GetObjectSizeAsync(string sourcePath)
|
||||||
|
{
|
||||||
|
if (isFirstCall)
|
||||||
{
|
{
|
||||||
GetObjectStoreTempToken();
|
GetObjectStoreTempToken();
|
||||||
|
isFirstCall = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var objectkey = sourcePath.Trim('/');
|
var objectkey = sourcePath.Trim('/');
|
||||||
|
|
||||||
|
|
|
@ -218,23 +218,41 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
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.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();
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in noneDicomList)
|
foreach (var item in noneDicomList)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var fileSize = await _oSSService.GetObjectSizeAsync(item.Path);
|
var fileSize = await _oSSService.GetObjectSizeAsync(item.Path);
|
||||||
|
|
||||||
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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var clinicalDataPDFList = _readingClinicalDataPDFRepository.Where(t => t.Size == 0).Select(t => new { t.Path, t.Id }).ToList();
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in clinicalDataPDFList)
|
foreach (var item in clinicalDataPDFList)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var fileSize = await _oSSService.GetObjectSizeAsync(item.Path);
|
var fileSize = await _oSSService.GetObjectSizeAsync(item.Path);
|
||||||
|
|
||||||
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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
Loading…
Reference in New Issue