Indirectly disabled tickoffset by setting it to 0
This commit is contained in:
@ -100,7 +100,7 @@ public class FileRead : Shared.FileRead, IFileRead
|
||||
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
|
||||
{
|
||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||
_TickOffset ??= new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_TickOffset ??= 0; // new FileInfo(reportFullPath).LastWriteTime.Ticks - dateTime.Ticks;
|
||||
_Logistics = new Logistics(this, _TickOffset.Value, reportFullPath, useSplitForMID: true);
|
||||
SetFileParameterLotIDToLogisticsMID();
|
||||
if (_Logistics.FileInfo.Length < _MinFileLength)
|
||||
|
@ -246,15 +246,15 @@ public partial class ProcessData : IProcessData
|
||||
return result;
|
||||
}
|
||||
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments, bool hasRDS)
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
|
||||
{
|
||||
string rds;
|
||||
string reactor;
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText) || (segments.Length > 1 && !hasRDS))
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
|
||||
reactor = defaultReactor;
|
||||
else
|
||||
reactor = segments[0];
|
||||
if (segments.Length <= 1 || !int.TryParse(segments[1].Replace("QP", string.Empty), out int rdsValue) || rdsValue < 99)
|
||||
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99)
|
||||
rds = defaultRDS;
|
||||
else
|
||||
rds = segments[1];
|
||||
@ -266,11 +266,11 @@ public partial class ProcessData : IProcessData
|
||||
return new(reactor, rds);
|
||||
}
|
||||
|
||||
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments, bool hasRDS)
|
||||
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
|
||||
{
|
||||
string psn;
|
||||
string layer;
|
||||
if (segments.Length <= 2 || (segments.Length > 1 && !hasRDS))
|
||||
if (segments.Length <= 2)
|
||||
{
|
||||
psn = defaultPSN;
|
||||
layer = defaultLayer;
|
||||
@ -360,9 +360,9 @@ public partial class ProcessData : IProcessData
|
||||
segments = cassette.Split(new char[] { '.' });
|
||||
else
|
||||
segments = cassette.Split(new char[] { '\u005F' });
|
||||
bool hasRDS = Regex.IsMatch(cassette, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?");
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, cassette, segments, hasRDS);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments, hasRDS);
|
||||
// bool hasRDS = Regex.IsMatch(cassette, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?");
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, cassette, segments);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
|
||||
zone = GetZone(segments);
|
||||
if (segments.Length <= 3 || segments[3].Length <= 1)
|
||||
employee = defaultEmployee;
|
||||
|
@ -435,7 +435,7 @@ public partial class ProcessData
|
||||
log.Debug($"****Extract(FDR): DataType = {dataType}");
|
||||
if (!isBioRad)
|
||||
{
|
||||
cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(tickOffset).AddTicks(i * -1);
|
||||
cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(i * -1);
|
||||
results.Add(new Tuple<string, bool, DateTime, string>(cassetteID, isBioRad, cassetteDateTime, dataText));
|
||||
}
|
||||
else
|
||||
@ -452,7 +452,7 @@ public partial class ProcessData
|
||||
throw new Exception();
|
||||
count += 1;
|
||||
_ = contents.Clear();
|
||||
cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(tickOffset).AddTicks(count * -1);
|
||||
cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(count * -1);
|
||||
user = processData.Employee?.ToString() ?? "";
|
||||
recipe = detail.Recipe?.ToString() ?? "";
|
||||
_ = contents.Append("Bio-Rad ").Append("QS400MEPI".PadRight(17)).Append("Recipe: ").Append(recipe.PadRight(25)).AppendLine(processData.Date.ToString(Stratus.Description.GetDateFormat()));
|
||||
|
Reference in New Issue
Block a user