Get text from OI
This commit is contained in:
@ -28,13 +28,15 @@ public class WaferCounterRepository : IWaferCounterRepository
|
||||
_RepositoryName = nameof(WaferCounterRepository)[..^10];
|
||||
}
|
||||
|
||||
private void MoveFile(string waferSizeDirectory, NginxFileSystemSortable nginxFileSystemSortable)
|
||||
private void MoveFile(string area, string waferSize, string text, string waferSizeDirectory, NginxFileSystemSortable nginxFileSystemSortable)
|
||||
{
|
||||
Calendar calendar = new CultureInfo("en-US").Calendar;
|
||||
string from = Path.Combine(waferSizeDirectory, nginxFileSystemSortable.Name);
|
||||
string archive = Path.Combine(_AppSettings.EcCharacterizationSi, "Archive", $"{area}-{waferSize}");
|
||||
string weekOfYear = $"{nginxFileSystemSortable.DateTime:yyyy}_Week_{calendar.GetWeekOfYear(nginxFileSystemSortable.DateTime, CalendarWeekRule.FirstDay, DayOfWeek.Sunday):00}";
|
||||
string to = Path.Combine(waferSizeDirectory, "Archive", weekOfYear, nginxFileSystemSortable.Name);
|
||||
string to = Path.Combine(archive, weekOfYear, nginxFileSystemSortable.DateTime.ToString("yyyy-MM-dd"), nginxFileSystemSortable.Name);
|
||||
_FileShareRepository.MoveFile(from, to);
|
||||
_FileShareRepository.FileWrite($"{to}.txt", text);
|
||||
}
|
||||
|
||||
private static Record GetRecord(string line1, string line2)
|
||||
@ -172,7 +174,7 @@ public class WaferCounterRepository : IWaferCounterRepository
|
||||
return result;
|
||||
}
|
||||
|
||||
WaferCounter? IWaferCounterRepository.GetLastQuantityAndSlotMap(string area, string waferSize)
|
||||
WaferCounter? IWaferCounterRepository.GetLastQuantityAndSlotMap(string area, string waferSize, string text)
|
||||
{
|
||||
WaferCounter? result;
|
||||
Uri waferSizeUri = GetWaferSizeUri(area, waferSize);
|
||||
@ -185,7 +187,7 @@ public class WaferCounterRepository : IWaferCounterRepository
|
||||
{
|
||||
result = GetLastQuantityAndSlotMap(waferSize, httpClient, nginxFileSystemSortableCollection[0]);
|
||||
for (int i = 0; i < nginxFileSystemSortableCollection.Count; i++)
|
||||
MoveFile(waferSizeDirectory, nginxFileSystemSortableCollection[i]);
|
||||
MoveFile(area, waferSize, text, waferSizeDirectory, nginxFileSystemSortableCollection[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user