MET08DDUPSFS6420 - v2.43.0 - Remove unit for IQS
Remove RecordStart Update Mona Logistics update
This commit is contained in:
parent
acbbb75404
commit
b5244f1166
@ -135,7 +135,19 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
if (!Directory.Exists(duplicateDirectory))
|
if (!Directory.Exists(duplicateDirectory))
|
||||||
_ = Directory.CreateDirectory(duplicateDirectory);
|
_ = Directory.CreateDirectory(duplicateDirectory);
|
||||||
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath));
|
||||||
File.Copy(reportFullPath, duplicateFile, overwrite: true);
|
string lines = File.ReadAllText(reportFullPath);
|
||||||
|
lines = lines
|
||||||
|
.Replace("ppm\t", "\t")
|
||||||
|
.Replace("mm2\t", "\t")
|
||||||
|
.Replace("um\t", "\t")
|
||||||
|
.Replace("mm\t", "\t")
|
||||||
|
.Replace("nm\t", "\t")
|
||||||
|
.Replace("\t[ ", "\t")
|
||||||
|
.Replace("\t*0", "\t")
|
||||||
|
.Replace("\t*", "\t")
|
||||||
|
.Replace("%\t", "\t")
|
||||||
|
.Replace("]\t", "\t");
|
||||||
|
File.WriteAllText(duplicateFile, lines);
|
||||||
WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
WaitForFileConsumption(dateTime, isDummyRun, successDirectory, duplicateDirectory, tuples, duplicateFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,8 +103,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
Tuple<string, Test[], JsonElement[], List<FileInfo>> results = new(string.Empty, null, null, new List<FileInfo>());
|
||||||
_Logistics = new Logistics(this, reportFullPath, useSplitForMID: true);
|
_Logistics = new Logistics(this, reportFullPath, useSplitForMID: true);
|
||||||
SetFileParameterLotIDToLogisticsMID();
|
SetFileParameterLotIDToLogisticsMID();
|
||||||
if (reportFullPath.Length < _MinFileLength)
|
if (_Logistics.FileInfo.Length < _MinFileLength)
|
||||||
results.Item4.Add(new FileInfo(reportFullPath));
|
results.Item4.Add(_Logistics.FileInfo);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _GhostPCLFileName);
|
IProcessData iProcessData = new ProcessData(this, _Logistics, results.Item4, _GhostPCLFileName);
|
||||||
@ -112,9 +112,8 @@ public class FileRead : Shared.FileRead, IFileRead
|
|||||||
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
throw new Exception(string.Concat("A) No Data - ", dateTime.Ticks));
|
||||||
string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
|
string mid = string.Concat(processData.Reactor, "-", processData.RDS, "-", processData.PSN);
|
||||||
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
mid = Regex.Replace(mid, @"[\\,\/,\:,\*,\?,\"",\<,\>,\|]", "_").Split('\r')[0].Split('\n')[0];
|
||||||
_Logistics.MID = mid;
|
|
||||||
SetFileParameterLotID(mid);
|
SetFileParameterLotID(mid);
|
||||||
_Logistics.ProcessJobID = processData.Reactor;
|
_Logistics.Update(mid, processData.Reactor);
|
||||||
if (!iProcessData.Details.Any())
|
if (!iProcessData.Details.Any())
|
||||||
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
throw new Exception(string.Concat("B) No Data - ", dateTime.Ticks));
|
||||||
results = iProcessData.GetResults(this, _Logistics, results.Item4);
|
results = iProcessData.GetResults(this, _Logistics, results.Item4);
|
||||||
|
@ -626,7 +626,7 @@ public class ProcessData : IProcessData
|
|||||||
// dataFiles[i].Date = DateTime.Parse(dataFiles[i].Date).ToString();
|
// dataFiles[i].Date = DateTime.Parse(dataFiles[i].Date).ToString();
|
||||||
foreach (string sourceFile in sourceFiles)
|
foreach (string sourceFile in sourceFiles)
|
||||||
fileInfoCollection.Add(new FileInfo(sourceFile));
|
fileInfoCollection.Add(new FileInfo(sourceFile));
|
||||||
fileInfoCollection.Add(new FileInfo(logistics.ReportFullPath));
|
fileInfoCollection.Add(logistics.FileInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="FFMpegCore" Version="4.8.0" />
|
<PackageReference Include="FFMpegCore" Version="4.8.0" />
|
||||||
<PackageReference Include="Infineon.Monitoring.MonA" Version="2.0.0" />
|
<PackageReference Include="Infineon.Monitoring.MonA" Version="3.0.0" />
|
||||||
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
<PackageReference Include="Infineon.Yoda" Version="5.4.1" />
|
||||||
<PackageReference Include="Instances" Version="2.0.0" />
|
<PackageReference Include="Instances" Version="2.0.0" />
|
||||||
<PackageReference Include="RoboSharp" Version="1.2.7" />
|
<PackageReference Include="RoboSharp" Version="1.2.7" />
|
||||||
|
@ -9,34 +9,46 @@ namespace Adaptation.Shared;
|
|||||||
public class Logistics : ILogistics
|
public class Logistics : ILogistics
|
||||||
{
|
{
|
||||||
|
|
||||||
public object NullData { get; private set; }
|
protected readonly DateTime _DateTimeFromSequence;
|
||||||
public string JobID { get; private set; } //CellName
|
protected readonly FileInfo _FileInfo;
|
||||||
public long Sequence { get; private set; } //Ticks
|
protected readonly string _JobID;
|
||||||
public DateTime DateTimeFromSequence { get; private set; }
|
protected readonly List<string> _Logistics1;
|
||||||
public double TotalSecondsSinceLastWriteTimeFromSequence { get; private set; }
|
protected readonly List<Logistics2> _Logistics2;
|
||||||
public string MesEntity { get; private set; } //SPC
|
protected string _MID;
|
||||||
public string ReportFullPath { get; private set; } //Extract file
|
protected readonly string _MesEntity;
|
||||||
public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics)
|
protected readonly object _NullData;
|
||||||
public string MID { get; set; } //Lot & Pocket || Lot
|
protected string _ProcessJobID;
|
||||||
public List<string> Tags { get; set; }
|
protected readonly string _ReportFullPath;
|
||||||
public List<string> Logistics1 { get; set; }
|
protected readonly long _Sequence;
|
||||||
public List<Logistics2> Logistics2 { get; set; }
|
protected readonly double _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||||
|
|
||||||
|
public DateTime DateTimeFromSequence => _DateTimeFromSequence;
|
||||||
|
public FileInfo FileInfo => _FileInfo;
|
||||||
|
public string JobID => _JobID;
|
||||||
|
public List<string> Logistics1 => _Logistics1;
|
||||||
|
public List<Logistics2> Logistics2 => _Logistics2;
|
||||||
|
public string MID => _MID;
|
||||||
|
public string MesEntity => _MesEntity;
|
||||||
|
public object NullData => _NullData;
|
||||||
|
public string ProcessJobID => _ProcessJobID;
|
||||||
|
public string ReportFullPath => _ReportFullPath;
|
||||||
|
public long Sequence => _Sequence;
|
||||||
|
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||||
|
|
||||||
public Logistics(IFileRead fileRead)
|
public Logistics(IFileRead fileRead)
|
||||||
{
|
{
|
||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
NullData = null;
|
_NullData = null;
|
||||||
Sequence = dateTime.Ticks;
|
_Sequence = dateTime.Ticks;
|
||||||
DateTimeFromSequence = dateTime;
|
_DateTimeFromSequence = dateTime;
|
||||||
JobID = fileRead.CellInstanceName;
|
_JobID = fileRead.CellInstanceName;
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||||
MesEntity = DefaultMesEntity(dateTime);
|
_MesEntity = DefaultMesEntity(dateTime);
|
||||||
ReportFullPath = string.Empty;
|
_ReportFullPath = string.Empty;
|
||||||
ProcessJobID = nameof(ProcessJobID);
|
_ProcessJobID = nameof(ProcessJobID);
|
||||||
MID = nameof(MID);
|
_MID = nameof(MID);
|
||||||
Tags = new List<string>();
|
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
_Logistics2 = new List<Logistics2>();
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null)
|
public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null)
|
||||||
@ -45,19 +57,19 @@ public class Logistics : ILogistics
|
|||||||
throw new Exception();
|
throw new Exception();
|
||||||
if (string.IsNullOrEmpty(fileRead.MesEntity))
|
if (string.IsNullOrEmpty(fileRead.MesEntity))
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
NullData = fileRead.NullData;
|
_NullData = fileRead.NullData;
|
||||||
FileInfo fileInfo = new(reportFullPath);
|
_FileInfo = new(reportFullPath);
|
||||||
DateTime dateTime = fileInfo.LastWriteTime;
|
DateTime dateTime = _FileInfo.LastWriteTime;
|
||||||
if (fileInfoLength.HasValue && fileInfo.Length < fileInfoLength.Value)
|
if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value)
|
||||||
dateTime = dateTime.AddTicks(-1);
|
dateTime = dateTime.AddTicks(-1);
|
||||||
JobID = fileRead.CellInstanceName;
|
_JobID = fileRead.CellInstanceName;
|
||||||
Sequence = dateTime.Ticks;
|
_Sequence = dateTime.Ticks;
|
||||||
DateTimeFromSequence = dateTime;
|
_DateTimeFromSequence = dateTime;
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||||
MesEntity = fileRead.MesEntity;
|
_MesEntity = fileRead.MesEntity;
|
||||||
ReportFullPath = fileInfo.FullName;
|
_ReportFullPath = _FileInfo.FullName;
|
||||||
ProcessJobID = nameof(ProcessJobID);
|
_ProcessJobID = nameof(ProcessJobID);
|
||||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.FullName);
|
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(_FileInfo.FullName);
|
||||||
if (useSplitForMID)
|
if (useSplitForMID)
|
||||||
{
|
{
|
||||||
if (fileNameWithoutExtension.IndexOf(".") > -1)
|
if (fileNameWithoutExtension.IndexOf(".") > -1)
|
||||||
@ -67,10 +79,9 @@ public class Logistics : ILogistics
|
|||||||
if (fileNameWithoutExtension.IndexOf("-") > -1)
|
if (fileNameWithoutExtension.IndexOf("-") > -1)
|
||||||
fileNameWithoutExtension = fileNameWithoutExtension.Split('-')[0].Trim();
|
fileNameWithoutExtension = fileNameWithoutExtension.Split('-')[0].Trim();
|
||||||
}
|
}
|
||||||
MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower());
|
_MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower());
|
||||||
Tags = new List<string>();
|
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
_Logistics2 = new List<Logistics2>();
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logistics(string reportFullPath, string logistics)
|
public Logistics(string reportFullPath, string logistics)
|
||||||
@ -78,57 +89,57 @@ public class Logistics : ILogistics
|
|||||||
string key;
|
string key;
|
||||||
DateTime dateTime;
|
DateTime dateTime;
|
||||||
string[] segments;
|
string[] segments;
|
||||||
Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
_FileInfo = new(reportFullPath);
|
||||||
|
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
||||||
{
|
{
|
||||||
NullData = null;
|
_NullData = null;
|
||||||
JobID = "null";
|
_JobID = "null";
|
||||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
dateTime = _FileInfo.LastWriteTime;
|
||||||
Sequence = dateTime.Ticks;
|
_Sequence = dateTime.Ticks;
|
||||||
DateTimeFromSequence = dateTime;
|
_DateTimeFromSequence = dateTime;
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||||
MesEntity = DefaultMesEntity(dateTime);
|
_MesEntity = DefaultMesEntity(dateTime);
|
||||||
ReportFullPath = reportFullPath;
|
_ReportFullPath = reportFullPath;
|
||||||
ProcessJobID = "R##";
|
_ProcessJobID = "R##";
|
||||||
MID = "null";
|
_MID = "null";
|
||||||
Tags = new List<string>();
|
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
_Logistics2 = new List<Logistics2>();
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string logistics1Line1 = Logistics1[0];
|
string logistics1Line1 = Logistics1[0];
|
||||||
key = "NULL_DATA=";
|
key = "NULL_DATA=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
NullData = null;
|
_NullData = null;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
NullData = segments[1].Split(';')[0];
|
_NullData = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
key = "JOBID=";
|
key = "JOBID=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
JobID = "null";
|
_JobID = "null";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
JobID = segments[1].Split(';')[0];
|
_JobID = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
key = "SEQUENCE=";
|
key = "SEQUENCE=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
dateTime = _FileInfo.LastWriteTime;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
if (!long.TryParse(segments[1].Split(';')[0].Split('.')[0], out long sequence) || sequence < new DateTime(1999, 1, 1).Ticks)
|
if (!long.TryParse(segments[1].Split(';')[0].Split('.')[0], out long sequence) || sequence < new DateTime(1999, 1, 1).Ticks)
|
||||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
dateTime = _FileInfo.LastWriteTime;
|
||||||
else
|
else
|
||||||
dateTime = new DateTime(sequence);
|
dateTime = new DateTime(sequence);
|
||||||
}
|
}
|
||||||
Sequence = dateTime.Ticks;
|
_Sequence = dateTime.Ticks;
|
||||||
DateTimeFromSequence = dateTime;
|
_DateTimeFromSequence = dateTime;
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||||
DateTime lastWriteTime = new FileInfo(reportFullPath).LastWriteTime;
|
DateTime lastWriteTime = _FileInfo.LastWriteTime;
|
||||||
if (TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
if (TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
||||||
{
|
{
|
||||||
if (lastWriteTime != dateTime)
|
if (lastWriteTime != dateTime)
|
||||||
@ -138,33 +149,32 @@ public class Logistics : ILogistics
|
|||||||
}
|
}
|
||||||
key = "MES_ENTITY=";
|
key = "MES_ENTITY=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
MesEntity = DefaultMesEntity(dateTime);
|
_MesEntity = DefaultMesEntity(dateTime);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
MesEntity = segments[1].Split(';')[0];
|
_MesEntity = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
ReportFullPath = reportFullPath;
|
_ReportFullPath = reportFullPath;
|
||||||
key = "PROCESS_JOBID=";
|
key = "PROCESS_JOBID=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
ProcessJobID = "R##";
|
_ProcessJobID = "R##";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
ProcessJobID = segments[1].Split(';')[0];
|
_ProcessJobID = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
key = "MID=";
|
key = "MID=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
MID = "null";
|
_MID = "null";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
MID = segments[1].Split(';')[0];
|
_MID = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Logistics2 logistics2;
|
Logistics2 logistics2;
|
||||||
Tags = new List<string>();
|
_Logistics2 = new List<Logistics2>();
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
for (int i = 1; i < Logistics1.Count; i++)
|
for (int i = 1; i < Logistics1.Count; i++)
|
||||||
{
|
{
|
||||||
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
||||||
@ -180,29 +190,12 @@ public class Logistics : ILogistics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logistics ShallowCopy() => (Logistics)MemberwiseClone();
|
|
||||||
|
|
||||||
private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
||||||
|
|
||||||
internal string GetLotViaMostCommonMethod() => MID.Substring(0, MID.Length - 2);
|
internal void Update(string mid, string processJobID)
|
||||||
|
|
||||||
internal string GetPocketNumberViaMostCommonMethod() => MID.Substring(MID.Length - 2);
|
|
||||||
|
|
||||||
internal void Update(string dateTime, string processJobID, string mid)
|
|
||||||
{
|
{
|
||||||
if (!DateTime.TryParse(dateTime, out DateTime dateTimeCasted))
|
_MID = mid;
|
||||||
dateTimeCasted = DateTime.Now;
|
_ProcessJobID = processJobID;
|
||||||
NullData = null;
|
|
||||||
//JobID = Description.GetCellName();
|
|
||||||
Sequence = dateTimeCasted.Ticks;
|
|
||||||
DateTimeFromSequence = dateTimeCasted;
|
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTimeCasted).TotalSeconds;
|
|
||||||
//MesEntity = DefaultMesEntity(dateTime);
|
|
||||||
//ReportFullPath = string.Empty;
|
|
||||||
ProcessJobID = processJobID;
|
|
||||||
MID = mid;
|
|
||||||
Tags = new List<string>();
|
|
||||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -12,8 +12,6 @@ namespace Adaptation.Shared;
|
|||||||
public class ProcessDataStandardFormat
|
public class ProcessDataStandardFormat
|
||||||
{
|
{
|
||||||
|
|
||||||
public const string RecordStart = "RECORD_START";
|
|
||||||
|
|
||||||
public enum SearchFor
|
public enum SearchFor
|
||||||
{
|
{
|
||||||
EquipmentIntegration = 1,
|
EquipmentIntegration = 1,
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
namespace Adaptation.Shared.Properties;
|
namespace Adaptation.Shared.Properties;
|
||||||
|
|
||||||
public interface ILogistics
|
public interface ILogistics
|
||||||
{
|
{
|
||||||
|
|
||||||
public object NullData { get; }
|
|
||||||
public string JobID { get; } //CellName
|
|
||||||
public long Sequence { get; } //Ticks
|
|
||||||
public DateTime DateTimeFromSequence { get; }
|
public DateTime DateTimeFromSequence { get; }
|
||||||
|
public FileInfo FileInfo { get; }
|
||||||
|
public string JobID { get; }
|
||||||
|
public List<string> Logistics1 { get; }
|
||||||
|
public List<Logistics2> Logistics2 { get; }
|
||||||
|
public string MID { get; }
|
||||||
|
public string MesEntity { get; }
|
||||||
|
public object NullData { get; }
|
||||||
|
public string ProcessJobID { get; }
|
||||||
|
public string ReportFullPath { get; }
|
||||||
|
public long Sequence { get; }
|
||||||
public double TotalSecondsSinceLastWriteTimeFromSequence { get; }
|
public double TotalSecondsSinceLastWriteTimeFromSequence { get; }
|
||||||
public string MesEntity { get; } //SPC
|
|
||||||
public string ReportFullPath { get; } //Extract file
|
|
||||||
public string ProcessJobID { get; set; } //Reactor (duplicate but I want it in the logistics)
|
|
||||||
public string MID { get; set; } //Lot & Pocket || Lot
|
|
||||||
public List<string> Tags { get; set; }
|
|
||||||
public List<string> Logistics1 { get; set; }
|
|
||||||
public List<Logistics2> Logistics2 { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,86 +1,75 @@
|
|||||||
using System;
|
using Adaptation.Shared.Methods;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Shared
|
namespace Adaptation.Shared;
|
||||||
|
|
||||||
|
public class Logistics : ILogistics
|
||||||
{
|
{
|
||||||
|
|
||||||
public class Logistics
|
protected readonly DateTime _DateTimeFromSequence;
|
||||||
{
|
protected readonly FileInfo _FileInfo;
|
||||||
|
protected readonly string _JobID;
|
||||||
|
protected readonly List<string> _Logistics1;
|
||||||
|
protected readonly List<Logistics2> _Logistics2;
|
||||||
|
protected string _MID;
|
||||||
|
protected readonly string _MesEntity;
|
||||||
|
protected readonly object _NullData;
|
||||||
|
protected string _ProcessJobID;
|
||||||
|
protected readonly string _ReportFullPath;
|
||||||
|
protected readonly long _Sequence;
|
||||||
|
protected readonly double _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||||
|
|
||||||
public object NullData { get; private set; }
|
public DateTime DateTimeFromSequence => _DateTimeFromSequence;
|
||||||
public string JobID { get; private set; } //CellName
|
public FileInfo FileInfo => _FileInfo;
|
||||||
public long Sequence { get; private set; } //Ticks
|
public string JobID => _JobID;
|
||||||
public DateTime DateTimeFromSequence { get; private set; }
|
public List<string> Logistics1 => _Logistics1;
|
||||||
public double TotalSecondsSinceLastWriteTimeFromSequence { get; private set; }
|
public List<Logistics2> Logistics2 => _Logistics2;
|
||||||
public string MesEntity { get; private set; } //SPC
|
public string MID => _MID;
|
||||||
public string ReportFullPath { get; private set; } //Extract file
|
public string MesEntity => _MesEntity;
|
||||||
public string ProcessJobID { get; internal set; } //Reactor (duplicate but I want it in the logistics)
|
public object NullData => _NullData;
|
||||||
public string MID { get; internal set; } //Lot & Pocket || Lot
|
public string ProcessJobID => _ProcessJobID;
|
||||||
public List<string> Tags { get; internal set; }
|
public string ReportFullPath => _ReportFullPath;
|
||||||
public List<string> Logistics1 { get; internal set; }
|
public long Sequence => _Sequence;
|
||||||
public List<Logistics2> Logistics2 { get; internal set; }
|
public double TotalSecondsSinceLastWriteTimeFromSequence => _TotalSecondsSinceLastWriteTimeFromSequence;
|
||||||
|
|
||||||
public Logistics()
|
public Logistics(IFileRead fileRead)
|
||||||
{
|
{
|
||||||
DateTime dateTime = DateTime.Now;
|
DateTime dateTime = DateTime.Now;
|
||||||
NullData = null;
|
_NullData = null;
|
||||||
JobID = Description.GetCellName();
|
_Sequence = dateTime.Ticks;
|
||||||
Sequence = dateTime.Ticks;
|
_DateTimeFromSequence = dateTime;
|
||||||
DateTimeFromSequence = dateTime;
|
_JobID = fileRead.CellInstanceName;
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||||
MesEntity = DefaultMesEntity(dateTime);
|
_MesEntity = DefaultMesEntity(dateTime);
|
||||||
ReportFullPath = string.Empty;
|
_ReportFullPath = string.Empty;
|
||||||
ProcessJobID = nameof(ProcessJobID);
|
_ProcessJobID = nameof(ProcessJobID);
|
||||||
MID = nameof(MID);
|
_MID = nameof(MID);
|
||||||
Tags = new List<string>();
|
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
_Logistics2 = new List<Logistics2>();
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logistics(object nullData, Dictionary<string, string> cellNames, Dictionary<string, string> mesEntities, FileInfo fileInfo, bool useSplitForMID, int? fileInfoLength = null)
|
public Logistics(IFileRead fileRead, string reportFullPath, bool useSplitForMID, int? fileInfoLength = null)
|
||||||
{
|
{
|
||||||
NullData = nullData;
|
if (string.IsNullOrEmpty(fileRead.CellInstanceName))
|
||||||
string mesEntity = string.Empty;
|
throw new Exception();
|
||||||
string jobID = Description.GetCellName();
|
if (string.IsNullOrEmpty(fileRead.MesEntity))
|
||||||
DateTime dateTime = fileInfo.LastWriteTime;
|
throw new Exception();
|
||||||
if (fileInfoLength.HasValue && fileInfo.Length < fileInfoLength.Value)
|
_NullData = fileRead.NullData;
|
||||||
|
_FileInfo = new(reportFullPath);
|
||||||
|
DateTime dateTime = _FileInfo.LastWriteTime;
|
||||||
|
if (fileInfoLength.HasValue && _FileInfo.Length < fileInfoLength.Value)
|
||||||
dateTime = dateTime.AddTicks(-1);
|
dateTime = dateTime.AddTicks(-1);
|
||||||
if (string.IsNullOrEmpty(jobID))
|
_JobID = fileRead.CellInstanceName;
|
||||||
{
|
_Sequence = dateTime.Ticks;
|
||||||
if (cellNames.Count == 1)
|
_DateTimeFromSequence = dateTime;
|
||||||
jobID = cellNames.ElementAt(0).Key;
|
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||||
else
|
_MesEntity = fileRead.MesEntity;
|
||||||
{
|
_ReportFullPath = _FileInfo.FullName;
|
||||||
string reportFullPathLower = fileInfo.FullName.ToLower();
|
_ProcessJobID = nameof(ProcessJobID);
|
||||||
foreach (var element in cellNames)
|
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(_FileInfo.FullName);
|
||||||
{
|
|
||||||
if (reportFullPathLower.Contains(element.Key) || reportFullPathLower.Contains(element.Value))
|
|
||||||
{
|
|
||||||
jobID = element.Key;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (string.IsNullOrEmpty(jobID))
|
|
||||||
throw new Exception();
|
|
||||||
if (mesEntities.ContainsKey(jobID))
|
|
||||||
mesEntity = mesEntities[jobID];
|
|
||||||
else if (mesEntities.Count == 1)
|
|
||||||
mesEntity = mesEntities.ElementAt(0).Value;
|
|
||||||
//
|
|
||||||
if (string.IsNullOrEmpty(mesEntity))
|
|
||||||
throw new Exception();
|
|
||||||
JobID = jobID;
|
|
||||||
Sequence = dateTime.Ticks;
|
|
||||||
DateTimeFromSequence = dateTime;
|
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
|
||||||
MesEntity = mesEntity;
|
|
||||||
ReportFullPath = fileInfo.FullName;
|
|
||||||
ProcessJobID = nameof(ProcessJobID);
|
|
||||||
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileInfo.FullName);
|
|
||||||
if (useSplitForMID)
|
if (useSplitForMID)
|
||||||
{
|
{
|
||||||
if (fileNameWithoutExtension.IndexOf(".") > -1)
|
if (fileNameWithoutExtension.IndexOf(".") > -1)
|
||||||
@ -90,10 +79,9 @@ namespace Shared
|
|||||||
if (fileNameWithoutExtension.IndexOf("-") > -1)
|
if (fileNameWithoutExtension.IndexOf("-") > -1)
|
||||||
fileNameWithoutExtension = fileNameWithoutExtension.Split('-')[0].Trim();
|
fileNameWithoutExtension = fileNameWithoutExtension.Split('-')[0].Trim();
|
||||||
}
|
}
|
||||||
MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower());
|
_MID = string.Concat(fileNameWithoutExtension.Substring(0, 1).ToUpper(), fileNameWithoutExtension.Substring(1).ToLower());
|
||||||
Tags = new List<string>();
|
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
_Logistics2 = new List<Logistics2>();
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logistics(string reportFullPath, string logistics)
|
public Logistics(string reportFullPath, string logistics)
|
||||||
@ -101,92 +89,93 @@ namespace Shared
|
|||||||
string key;
|
string key;
|
||||||
DateTime dateTime;
|
DateTime dateTime;
|
||||||
string[] segments;
|
string[] segments;
|
||||||
Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
_FileInfo = new(reportFullPath);
|
||||||
|
_Logistics1 = logistics.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
if (!Logistics1.Any() || !Logistics1[0].StartsWith("LOGISTICS_1"))
|
||||||
{
|
{
|
||||||
NullData = null;
|
_NullData = null;
|
||||||
JobID = "null";
|
_JobID = "null";
|
||||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
dateTime = _FileInfo.LastWriteTime;
|
||||||
Sequence = dateTime.Ticks;
|
_Sequence = dateTime.Ticks;
|
||||||
DateTimeFromSequence = dateTime;
|
_DateTimeFromSequence = dateTime;
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||||
MesEntity = DefaultMesEntity(dateTime);
|
_MesEntity = DefaultMesEntity(dateTime);
|
||||||
ReportFullPath = reportFullPath;
|
_ReportFullPath = reportFullPath;
|
||||||
ProcessJobID = "R##";
|
_ProcessJobID = "R##";
|
||||||
MID = "null";
|
_MID = "null";
|
||||||
Tags = new List<string>();
|
_Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
||||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
_Logistics2 = new List<Logistics2>();
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string logistics1Line1 = Logistics1[0];
|
string logistics1Line1 = Logistics1[0];
|
||||||
key = "NULL_DATA=";
|
key = "NULL_DATA=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
NullData = null;
|
_NullData = null;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
NullData = segments[1].Split(';')[0];
|
_NullData = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
key = "JOBID=";
|
key = "JOBID=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
JobID = "null";
|
_JobID = "null";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
JobID = segments[1].Split(';')[0];
|
_JobID = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
key = "SEQUENCE=";
|
key = "SEQUENCE=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
dateTime = _FileInfo.LastWriteTime;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
if (!long.TryParse(segments[1].Split(';')[0], out long sequence) || sequence < new DateTime(1999, 1, 1).Ticks)
|
if (!long.TryParse(segments[1].Split(';')[0].Split('.')[0], out long sequence) || sequence < new DateTime(1999, 1, 1).Ticks)
|
||||||
dateTime = new FileInfo(reportFullPath).LastWriteTime;
|
dateTime = _FileInfo.LastWriteTime;
|
||||||
else
|
else
|
||||||
dateTime = new DateTime(sequence);
|
dateTime = new DateTime(sequence);
|
||||||
}
|
}
|
||||||
Sequence = dateTime.Ticks;
|
_Sequence = dateTime.Ticks;
|
||||||
DateTimeFromSequence = dateTime;
|
_DateTimeFromSequence = dateTime;
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
_TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTime).TotalSeconds;
|
||||||
DateTime lastWriteTime = new FileInfo(reportFullPath).LastWriteTime;
|
DateTime lastWriteTime = _FileInfo.LastWriteTime;
|
||||||
if (TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
if (TotalSecondsSinceLastWriteTimeFromSequence > 600)
|
||||||
{
|
{
|
||||||
if (lastWriteTime != dateTime)
|
if (lastWriteTime != dateTime)
|
||||||
try { File.SetLastWriteTime(reportFullPath, dateTime); } catch (Exception) { }
|
try
|
||||||
|
{ File.SetLastWriteTime(reportFullPath, dateTime); }
|
||||||
|
catch (Exception) { }
|
||||||
}
|
}
|
||||||
key = "MES_ENTITY=";
|
key = "MES_ENTITY=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
MesEntity = DefaultMesEntity(dateTime);
|
_MesEntity = DefaultMesEntity(dateTime);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
MesEntity = segments[1].Split(';')[0];
|
_MesEntity = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
ReportFullPath = reportFullPath;
|
_ReportFullPath = reportFullPath;
|
||||||
key = "PROCESS_JOBID=";
|
key = "PROCESS_JOBID=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
ProcessJobID = "R##";
|
_ProcessJobID = "R##";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
ProcessJobID = segments[1].Split(';')[0];
|
_ProcessJobID = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
key = "MID=";
|
key = "MID=";
|
||||||
if (!logistics1Line1.Contains(key))
|
if (!logistics1Line1.Contains(key))
|
||||||
MID = "null";
|
_MID = "null";
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
segments = logistics1Line1.Split(new string[] { key }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
MID = segments[1].Split(';')[0];
|
_MID = segments[1].Split(';')[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Logistics2 logistics2;
|
Logistics2 logistics2;
|
||||||
Tags = new List<string>();
|
_Logistics2 = new List<Logistics2>();
|
||||||
Logistics2 = new List<Logistics2>();
|
for (int i = 1; i < Logistics1.Count; i++)
|
||||||
for (int i = 1; i < Logistics1.Count(); i++)
|
|
||||||
{
|
{
|
||||||
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
||||||
{
|
{
|
||||||
@ -194,50 +183,19 @@ namespace Shared
|
|||||||
Logistics2.Add(logistics2);
|
Logistics2.Add(logistics2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = Logistics1.Count() - 1; i >= 0; i--)
|
for (int i = Logistics1.Count - 1; i > -1; i--)
|
||||||
{
|
{
|
||||||
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
if (Logistics1[i].StartsWith("LOGISTICS_2"))
|
||||||
Logistics1.RemoveAt(i);
|
Logistics1.RemoveAt(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Logistics ShallowCopy()
|
private static string DefaultMesEntity(DateTime dateTime) => string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
||||||
{
|
|
||||||
return (Logistics)this.MemberwiseClone();
|
|
||||||
}
|
|
||||||
|
|
||||||
private string DefaultMesEntity(DateTime dateTime)
|
internal void Update(string mid, string processJobID)
|
||||||
{
|
{
|
||||||
return string.Concat(dateTime.Ticks, "_MES_ENTITY");
|
_MID = mid;
|
||||||
}
|
_ProcessJobID = processJobID;
|
||||||
|
|
||||||
internal string GetLotViaMostCommonMethod()
|
|
||||||
{
|
|
||||||
return MID.Substring(0, MID.Length - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal string GetPocketNumberViaMostCommonMethod()
|
|
||||||
{
|
|
||||||
return MID.Substring(MID.Length - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void Update(string dateTime, string processJobID, string mid)
|
|
||||||
{
|
|
||||||
if (!DateTime.TryParse(dateTime, out DateTime dateTimeCasted))
|
|
||||||
dateTimeCasted = DateTime.Now;
|
|
||||||
NullData = null;
|
|
||||||
//JobID = Description.GetCellName();
|
|
||||||
Sequence = dateTimeCasted.Ticks;
|
|
||||||
DateTimeFromSequence = dateTimeCasted;
|
|
||||||
TotalSecondsSinceLastWriteTimeFromSequence = (DateTime.Now - dateTimeCasted).TotalSeconds;
|
|
||||||
//MesEntity = DefaultMesEntity(dateTime);
|
|
||||||
//ReportFullPath = string.Empty;
|
|
||||||
ProcessJobID = processJobID;
|
|
||||||
MID = mid;
|
|
||||||
Tags = new List<string>();
|
|
||||||
Logistics1 = new string[] { string.Concat("LOGISTICS_1", '\t', "A_JOBID=", JobID, ";A_MES_ENTITY=", MesEntity, ";") }.ToList();
|
|
||||||
Logistics2 = new List<Logistics2>();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user