Update to 2025-02-18 and 2025-02-19
This commit is contained in:
parent
919279a917
commit
23c0ff9683
91
.vscode/launch.json
vendored
91
.vscode/launch.json
vendored
@ -13,43 +13,74 @@
|
|||||||
"args": [
|
"args": [
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"L:/DevOps/EAF-Mesa-Integration/met08thftirqs408m/bin/Debug",
|
"\\\\mesfs.infineon.com\\EC_EDA\\Production\\Traces",
|
||||||
"Day-Helper-2025-03-06",
|
|
||||||
"*.pdsf",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/ProgramData/VisualStudioCode",
|
|
||||||
"Day-Helper-2025-03-05",
|
|
||||||
"isccvm57294f1ed.infineon.com",
|
|
||||||
".vscode/extensions/bennycode.sort-everything-1.4.1",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive\\BIORAD4\\2025_Week_10\\2025-03-03\\03--_2025-03-03_05;54_AM_1292405457",
|
|
||||||
"Day-Helper-2025-02-19",
|
|
||||||
"csv-*.pdsf",
|
|
||||||
"*.pdsf",
|
|
||||||
"Test,Count,MesEntity,HeaderUniqueId,UniqueId,Date,Wafer,Position,BIORAD4",
|
|
||||||
",BIORAD4",
|
|
||||||
",BIORAD4",
|
|
||||||
"MID|Cassette,Lot|Batch,Title|Batch,Wafer|Text,Thickness|Site,MeanThickness|GradeMean,|BIORAD4",
|
|
||||||
"888",
|
|
||||||
"999",
|
|
||||||
"s",
|
|
||||||
"X",
|
|
||||||
"D:/Tmp",
|
|
||||||
"Day-Helper-2025-02-18",
|
"Day-Helper-2025-02-18",
|
||||||
|
"Source",
|
||||||
"*.pdsf",
|
"*.pdsf",
|
||||||
"A_MES_ENTITY=",
|
"A_MES_ENTITY=",
|
||||||
"B_SEQUENCE=",
|
"B_SEQUENCE=",
|
||||||
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive",
|
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive",
|
||||||
"666",
|
|
||||||
"777",
|
|
||||||
"888",
|
|
||||||
"999",
|
|
||||||
"s",
|
"s",
|
||||||
"X",
|
"X",
|
||||||
"D:/5-Other-Small/Kanban-mestsa003/{}/2025/2025_Week_05/223065",
|
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive\\HGCV1\\2025_Week_14\\2025-03-31\\35-664269-4830_2025-03-31_05;27_PM_473734776",
|
||||||
"Day-Helper-2025-02-04",
|
"Day-Helper-2025-02-19",
|
||||||
|
"csv-HGCV1_250331172757000.pdsf",
|
||||||
|
"*.pdsf",
|
||||||
|
"Time,Test,Count,MesEntity,HeaderUniqueId,UniqueId,Id,Recipe,Date,AreaDeltaFromLastRun,GLimit,HGCV1",
|
||||||
|
"Nine10mmEdgeMean,Nine4mmEdgeMean,NineCriticalPointsAverage,NineCriticalPointsPhaseAngleAverage,NineCriticalPointsStdDev,NineEdgeMeanDelta,NineMean,NineResRangePercent,AreaDeltaFromLastRun,Variation,Percentage HgCV 4PP Delta,HGCV1",
|
||||||
|
"RhoAvg01,RhoAvg02,RhoAvg03,RhoAvg04,RhoAvg05,RhoAvg06,RhoAvg07,RhoAvg08,RhoAvg09,HGCV1",
|
||||||
|
"FlatZMean|MeanFlatZ,GradeMean|MeanGrade,NAvgMean|MeanNAvg,NslMean|MeanNsl,PhaseMean|MeanPhase,RhoAvgMean|MeanRhoAvg,RhoslMean|MeanRhosl,RsMean|MeanRs,VdMean|MeanVd,FlatZRadialGradient|RadialGradientFlatZ,GradeRadialGradient|RadialGradientGrade,NAvgRadialGradient|RadialGradientNAvg,NslRadialGradient|RadialGradientNsl,PhaseRadialGradient|RadialGradientPhase,RhoAvgRadialGradient|RadialGradientRhoAvg,RhoslRadialGradient|RadialGradientRhosl,RsRadialGradient|RadialGradientRs,VdRadialGradient|RadialGradientVd,FlatZStdDev|StandardDeviationPercentageFlatZ,GradeStdDev|StandardDeviationPercentageGrade,NAvgStdDev|StandardDeviationPercentageNAvg,NslStdDev|StandardDeviationPercentageNsl,PhaseStdDev|StandardDeviationPercentagePhase,RhoAvgStdDev|StandardDeviationPercentageRhoAvg,RhoslStdDev|StandardDeviationPercentageRhosl,RsStdDev|StandardDeviationPercentageRs,VdStdDev|StandardDeviationPercentageVd,|HGCV1",
|
||||||
|
"Time,A_LOGISTICS,B_LOGISTICS,Test,Count,Index,MesEntity,Date,Employee,Lot,PSN,Reactor,Recipe,Area,Folder,HeaderUniqueId,Id,Layer,Model,Pattern,Phase,Plan,RampRate,RDS,SetupFile,StartVoltage,StopVoltage,UniqueId,Wafer,WaferSize,Zone,Ccomp,CondType,FlatZ,FlatZMean,FlatZRadialGradient,FlatZStdDev,GLimit,Grade,GradeMean,GradeRadialGradient,GradeStdDev,NAvg,NAvgMean,NAvgRadialGradient,NAvgStdDev,Nsl,NslMean,NslRadialGradient,NslStdDev,PhaseMean,PhaseRadialGradient,PhaseStdDev,RhoAvg,RhoAvgMean,RhoAvgRadialGradient,RhoAvgStdDev,RhoMethod,Rhosl,RhoslMean,RhoslRadialGradient,RhoslStdDev,RsMean,RsRadialGradient,RsStdDev,Vd,VdMean,VdRadialGradient,VdStdDev,Variation,AreaDeltaFromLastRun,Nine10mmEdgeMean,Nine4mmEdgeMean,NineCriticalPointsAverage,NineCriticalPointsPhaseAngleAverage,NineCriticalPointsStdDev,NineEdgeMeanDelta,NineMean,NineResRangePercent,RhoAvg01,RhoAvg02,RhoAvg03,RhoAvg04,RhoAvg05,RhoAvg06,RhoAvg07,RhoAvg08,RhoAvg09",
|
||||||
|
"Time,A_LOGISTICS,B_LOGISTICS,Count,Sequence,MesEntity,Index,Operator,StartVoltage,Wafer,StopVoltage,Lot,RampRate,Plan,GLimit,Date,Time,SetupFile,WaferSize,Folder,Ccomp,Pattern,Area,CondType,RhoMethod,Model,MeanNAvg,MeanNsl,MeanVd,MeanFlatZ,MeanRhoAvg,MeanRhosl,MeanPhase,MeanGrade,MeanRs,StandardDeviationPercentageNAvg,StandardDeviationPercentageNsl,StandardDeviationPercentageVd,StandardDeviationPercentageFlatZ,StandardDeviationPercentageRhoAvg,StandardDeviationPercentageRhosl,StandardDeviationPercentagePhase,StandardDeviationPercentageGrade,StandardDeviationPercentageRs,RadialGradientNAvg,RadialGradientNsl,RadialGradientVd,RadialGradientFlatZ,RadialGradientRhoAvg,RadialGradientRhosl,RadialGradientPhase,RadialGradientGrade,RadialGradientRs,Site,X,Y,NAvg,RhoAvg,Nsl,Rhosl,Vd,Phase,FlatZ,Grade,XLeft,XRight,BottomY,TopY,RDS,PSN,Reactor,Layer,Zone,Employee,InferredLot,Nine10mmEdgeMean,Nine4mmEdgeMean,NineCriticalPointsAverage,NineCriticalPointsPhaseAngleAverage,NineCriticalPointsStdDev,NineEdgeMeanDelta,NineMean,NineResRangePercent,AreaDeltaFromLastRun,Variation,Percentage HgCV 4PP Delta,RhoAvg01,RhoAvg02,RhoAvg03,RhoAvg04,RhoAvg05,RhoAvg06,RhoAvg07,RhoAvg08,RhoAvg09",
|
||||||
|
"0,1,2,-1,3,6,5,15,73,11,69,70,-1,22,19,-1,-1,71,25,21,61,13,12,68,17,8,10,-1,9,18,72,20,23,62,29,47,38,14,63,33,51,42,56,26,44,35,58,27,45,36,32,50,41,57,30,48,39,24,59,31,49,40,34,52,43,60,28,46,37,84,83,75,76,77,78,79,80,81,82,86,87,88,89,90,91,92,93,94",
|
||||||
|
"s",
|
||||||
|
"X",
|
||||||
|
"Day-Helper-2025-02-19",
|
||||||
|
"csv-*.pdsf",
|
||||||
|
"*.pdsf",
|
||||||
|
"",
|
||||||
|
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive\\HGCV1\\2025_Week_14\\2025-03-31",
|
||||||
|
"",
|
||||||
|
"Time,Test,Count,MesEntity,HeaderUniqueId,UniqueId,Id,Recipe,Date,AreaDeltaFromLastRun,GLimit,HGCV1",
|
||||||
|
"Nine10mmEdgeMean,Nine4mmEdgeMean,NineCriticalPointsAverage,NineCriticalPointsPhaseAngleAverage,NineCriticalPointsStdDev,NineEdgeMeanDelta,NineMean,NineResRangePercent,AreaDeltaFromLastRun,Variation,Percentage HgCV 4PP Delta,HGCV1",
|
||||||
|
"RhoAvg01,RhoAvg02,RhoAvg03,RhoAvg04,RhoAvg05,RhoAvg06,RhoAvg07,RhoAvg08,RhoAvg09,HGCV1",
|
||||||
|
"FlatZMean|MeanFlatZ,GradeMean|MeanGrade,NAvgMean|MeanNAvg,NslMean|MeanNsl,PhaseMean|MeanPhase,RhoAvgMean|MeanRhoAvg,RhoslMean|MeanRhosl,RsMean|MeanRs,VdMean|MeanVd,FlatZRadialGradient|RadialGradientFlatZ,GradeRadialGradient|RadialGradientGrade,NAvgRadialGradient|RadialGradientNAvg,NslRadialGradient|RadialGradientNsl,PhaseRadialGradient|RadialGradientPhase,RhoAvgRadialGradient|RadialGradientRhoAvg,RhoslRadialGradient|RadialGradientRhosl,RsRadialGradient|RadialGradientRs,VdRadialGradient|RadialGradientVd,FlatZStdDev|StandardDeviationPercentageFlatZ,GradeStdDev|StandardDeviationPercentageGrade,NAvgStdDev|StandardDeviationPercentageNAvg,NslStdDev|StandardDeviationPercentageNsl,PhaseStdDev|StandardDeviationPercentagePhase,RhoAvgStdDev|StandardDeviationPercentageRhoAvg,RhoslStdDev|StandardDeviationPercentageRhosl,RsStdDev|StandardDeviationPercentageRs,VdStdDev|StandardDeviationPercentageVd,|HGCV1",
|
||||||
|
"",
|
||||||
|
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive\\TENCOR1\\2025_Week_14\\2025-03-31",
|
||||||
|
"",
|
||||||
|
"Time,Test,Count,MesEntity,HeaderUniqueId,UniqueId,Date,TENCOR1",
|
||||||
|
",TENCOR1",
|
||||||
|
"TENCOR1",
|
||||||
|
"Lot|Id,Slot|WaferId,AreaTotal|WaferAreaTotal,HazeAverage|WaferHazeAverage,HazeRegion|WaferHazeRegion,ScratchTotal|WaferScratchTotal,|TENCOR1",
|
||||||
|
"",
|
||||||
|
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive\\CDE5\\2025_Week_14\\2025-03-31",
|
||||||
|
"",
|
||||||
|
"Time,Test,Count,MesEntity,HeaderUniqueId,UniqueId,Date,Id,Lot,CDE5",
|
||||||
|
",CDE5",
|
||||||
|
"StandardDeviationPercentage,SheetRhoVariation,CDE5",
|
||||||
|
"Run|Title,Employee|Operator,EquipId|Equipment,Recipe|RecipeName,FileName|TheFileName,DataReject|DataRejectSigma,Merit|MeritGOF,T|Th,StdDev|StandardDeviationPercentage,|CDE5",
|
||||||
|
"",
|
||||||
|
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive\\SP101\\2025_Week_14\\2025-03-31",
|
||||||
|
"",
|
||||||
|
"Time,Test,Count,MesEntity,HeaderUniqueId,UniqueId,Date,SP101",
|
||||||
|
",SP101",
|
||||||
|
",SP101",
|
||||||
|
"Recipe|Session,|SP101",
|
||||||
|
"",
|
||||||
|
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive\\BIORAD2\\2025_Week_14\\2025-03-31",
|
||||||
|
"",
|
||||||
|
"Time,Test,Count,MesEntity,HeaderUniqueId,UniqueId,Date,BIORAD2",
|
||||||
|
"Thickness 14 3mm Edge Mean,Thickness 14 3mm Edge % from R/2,Thickness 14 5mm Edge Mean,Thickness 14 5mm Edge % from R/2,Thickness 14 Center Mean,Thickness 14 Average,Thickness 14 Std Dev,Thickness 14 R/2 Mean,BIORAD2",
|
||||||
|
"Thickness01,Thickness02,Thickness03,Thickness04,Thickness05,Thickness06,Thickness07,Thickness08,Thickness09,Thickness10,Thickness11,Thickness12,Thickness13,Thickness14,BIORAD2",
|
||||||
|
"Employee|Operator,Lot|Wafer,MeanThickness|WaferMeanThickness,RVThickness|RadialVariationThickness,ThicknessFourteen3mmEdgeMean|Thickness 14 3mm Edge Mean,ThicknessFourteen3mmEdgePercent|Thickness 14 3mm Edge % from R/2,ThicknessFourteen5mmEdgeMean|Thickness 14 5mm Edge Mean,ThicknessFourteen5mmEdgePercent|Thickness 14 5mm Edge % from R/2,ThicknessFourteenCenterMean|Thickness 14 Center Mean,ThicknessFourteenCriticalPointsAverage|Thickness 14 Average,ThicknessFourteenCriticalPointsStdDev|Thickness 14 Std Dev,ThicknessFourteenMeanFrom|Thickness 14 R/2 Mean,|BIORAD2",
|
||||||
|
"",
|
||||||
|
"\\\\mesfs.infineon.com\\EC_Characterization_Si\\Archive\\BIORAD4\\2025_Week_14\\2025-03-31",
|
||||||
|
"",
|
||||||
|
"Time,Test,Count,MesEntity,HeaderUniqueId,UniqueId,Date,Wafer,Position,BIORAD4",
|
||||||
|
",BIORAD4",
|
||||||
|
",BIORAD4",
|
||||||
|
"MID|Cassette,Lot|Batch,Title|Batch,Wafer|Text,Thickness|Site,MeanThickness|GradeMean,|BIORAD4",
|
||||||
|
""
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"console": "integratedTerminal",
|
"console": "integratedTerminal",
|
||||||
|
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -35,6 +35,7 @@
|
|||||||
"OBJE",
|
"OBJE",
|
||||||
"onenote",
|
"onenote",
|
||||||
"PDFC",
|
"PDFC",
|
||||||
|
"pdsf",
|
||||||
"Permyriad",
|
"Permyriad",
|
||||||
"pged",
|
"pged",
|
||||||
"Phares",
|
"Phares",
|
||||||
|
@ -7,14 +7,28 @@ namespace File_Folder_Helper.ADO2025.PI5;
|
|||||||
internal static partial class Helper20250218 {
|
internal static partial class Helper20250218 {
|
||||||
|
|
||||||
internal static void MoveToArchive(ILogger<Worker> logger, List<string> args) {
|
internal static void MoveToArchive(ILogger<Worker> logger, List<string> args) {
|
||||||
string searchMES = args[3];
|
string checkDirectory;
|
||||||
string searchPattern = args[2];
|
string searchMES = args[4];
|
||||||
string searchSequence = args[4];
|
string searchPattern = args[3];
|
||||||
string destinationRoot = args[5];
|
string searchSequence = args[5];
|
||||||
|
string destinationRoot = args[6];
|
||||||
|
string checkDirectoryName = args[2];
|
||||||
string sourceDirectory = Path.GetFullPath(args[0]);
|
string sourceDirectory = Path.GetFullPath(args[0]);
|
||||||
string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.AllDirectories);
|
string[] directories = Directory.GetDirectories(sourceDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||||
logger.LogInformation("<{files}>(s)", files.Length);
|
foreach (string directory in directories) {
|
||||||
MoveToArchive(logger, searchMES, searchSequence, destinationRoot, files);
|
checkDirectory = Path.Combine(directory, checkDirectoryName);
|
||||||
|
if (!Directory.Exists(checkDirectory))
|
||||||
|
continue;
|
||||||
|
MoveToArchive(logger, searchPattern, searchMES, searchSequence, destinationRoot, checkDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void MoveToArchive(ILogger<Worker> logger, string searchPattern, string searchMES, string searchSequence, string destinationRoot, string checkDirectory) {
|
||||||
|
string[] files = Directory.GetFiles(checkDirectory, searchPattern, SearchOption.AllDirectories);
|
||||||
|
if (files.Length == 0)
|
||||||
|
logger.LogInformation("<{files}>(s)", files.Length);
|
||||||
|
else
|
||||||
|
MoveToArchive(logger, searchMES, searchSequence, destinationRoot, files);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void MoveToArchive(ILogger<Worker> logger, string searchMES, string searchSequence, string destinationRoot, string[] files) {
|
private static void MoveToArchive(ILogger<Worker> logger, string searchMES, string searchSequence, string destinationRoot, string[] files) {
|
||||||
@ -66,4 +80,4 @@ internal static partial class Helper20250218 {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// L:\DevOps\MESA_FI\file-folder-helper\bin\Debug\net8.0\win-x64>dotnet File-Folder-Helper.dll X D:/Tmp Day-Helper-2025-02-18 *.pdsf A_MES_ENTITY= B_SEQUENCE= \\mesfs.infineon.com\EC_Characterization_Si\Archive
|
// L:\DevOps\MESA_FI\file-folder-helper\bin\Debug\net8.0\win-x64>dotnet File-Folder-Helper.dll X \\mesfs.infineon.com\EC_EDA\Production\Traces Day-Helper-2025-02-18 Source *.pdsf A_MES_ENTITY= B_SEQUENCE= \\mesfs.infineon.com\EC_Characterization_Si\Archive
|
@ -19,13 +19,13 @@ internal static partial class Helper20250219 {
|
|||||||
private partial class JsonElementCollectionSourceGenerationContext : JsonSerializerContext {
|
private partial class JsonElementCollectionSourceGenerationContext : JsonSerializerContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
private record Input(ReadOnlyCollection<string> Backfill,
|
private record ProcessDataStandardFormatMapping(ReadOnlyCollection<string> BackfillColumns,
|
||||||
ReadOnlyCollection<int> ColumnIndices,
|
ReadOnlyCollection<int> ColumnIndices,
|
||||||
ReadOnlyCollection<string> Ignore,
|
ReadOnlyCollection<string> IgnoreColumns,
|
||||||
ReadOnlyCollection<string> IndexOnly,
|
ReadOnlyCollection<string> IndexOnlyColumns,
|
||||||
ReadOnlyDictionary<string, string> KeyValuePairs,
|
ReadOnlyDictionary<string, string> KeyValuePairs,
|
||||||
ReadOnlyCollection<string> NewColumnNames,
|
ReadOnlyCollection<string> NewColumnNames,
|
||||||
ReadOnlyCollection<string> OldColumnNames);
|
ReadOnlyCollection<string> OldColumnNames);
|
||||||
|
|
||||||
internal static void Compare(ILogger<Worker> logger, List<string> args) {
|
internal static void Compare(ILogger<Worker> logger, List<string> args) {
|
||||||
string[] segmentsB;
|
string[] segmentsB;
|
||||||
@ -49,20 +49,20 @@ internal static partial class Helper20250219 {
|
|||||||
distinct.Add(segmentsB[0]);
|
distinct.Add(segmentsB[0]);
|
||||||
keyValuePairs.Add(segmentsB[0], segmentsB[1]);
|
keyValuePairs.Add(segmentsB[0], segmentsB[1]);
|
||||||
}
|
}
|
||||||
Input input = new(Backfill: backfill,
|
ProcessDataStandardFormatMapping processDataStandardFormatMapping = new(BackfillColumns: backfill,
|
||||||
ColumnIndices: columnIndices,
|
ColumnIndices: columnIndices,
|
||||||
NewColumnNames: newColumnNames,
|
NewColumnNames: newColumnNames,
|
||||||
Ignore: ignore,
|
IgnoreColumns: ignore,
|
||||||
IndexOnly: indexOnly,
|
IndexOnlyColumns: indexOnly,
|
||||||
KeyValuePairs: keyValuePairs.AsReadOnly(),
|
KeyValuePairs: keyValuePairs.AsReadOnly(),
|
||||||
OldColumnNames: oldColumnNames);
|
OldColumnNames: oldColumnNames);
|
||||||
string sourceDirectory = Path.GetFullPath(args[0]);
|
string sourceDirectory = Path.GetFullPath(args[0]);
|
||||||
string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.AllDirectories);
|
string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.AllDirectories);
|
||||||
logger.LogInformation("<{files}>(s)", files.Length);
|
logger.LogInformation("<{files}>(s)", files.Length);
|
||||||
Compare(logger, sourceDirectory.Length, searchPatternB, input, files);
|
Compare(logger, sourceDirectory.Length, searchPatternB, processDataStandardFormatMapping, files);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Compare(ILogger<Worker> logger, int sourceDirectoryLength, string searchPattern, Input input, string[] files) {
|
private static void Compare(ILogger<Worker> logger, int sourceDirectoryLength, string searchPattern, ProcessDataStandardFormatMapping pdsfMapping, string[] files) {
|
||||||
bool compare;
|
bool compare;
|
||||||
string directory;
|
string directory;
|
||||||
string[] matches;
|
string[] matches;
|
||||||
@ -80,22 +80,22 @@ internal static partial class Helper20250219 {
|
|||||||
if (matches.Length < 1)
|
if (matches.Length < 1)
|
||||||
continue;
|
continue;
|
||||||
directorySegment = directory[sourceDirectoryLength..];
|
directorySegment = directory[sourceDirectoryLength..];
|
||||||
processDataStandardFormat = GetProcessDataStandardFormat(logger, fileInfo.LastWriteTime, input.NewColumnNames.Count, columnsLine, fileInfo.FullName, lines: null);
|
processDataStandardFormat = GetProcessDataStandardFormat(logger, fileInfo.LastWriteTime, pdsfMapping.NewColumnNames.Count, columnsLine, fileInfo.FullName, lines: null);
|
||||||
jsonElementsNew = GetArray(logger, input.NewColumnNames.Count, processDataStandardFormat, lookForNumbers: false);
|
jsonElementsNew = GetArray(logger, pdsfMapping.NewColumnNames.Count, processDataStandardFormat, lookForNumbers: false);
|
||||||
if (jsonElementsNew is null)
|
if (jsonElementsNew is null)
|
||||||
continue;
|
continue;
|
||||||
if (input.OldColumnNames.Count == input.ColumnIndices.Count) {
|
if (pdsfMapping.OldColumnNames.Count == pdsfMapping.ColumnIndices.Count) {
|
||||||
processDataStandardFormat = Get(logger, input, jsonElementsNew, processDataStandardFormat);
|
processDataStandardFormat = GetProcessDataStandardFormat(logger, pdsfMapping, jsonElementsNew, processDataStandardFormat);
|
||||||
Write(logger, fileInfo, processDataStandardFormat);
|
Write(logger, fileInfo, processDataStandardFormat);
|
||||||
}
|
}
|
||||||
foreach (string match in matches) {
|
foreach (string match in matches) {
|
||||||
processDataStandardFormat = GetProcessDataStandardFormat(logger, fileInfo.LastWriteTime, input.OldColumnNames.Count, columnsLine, match, lines: null);
|
processDataStandardFormat = GetProcessDataStandardFormat(logger, fileInfo.LastWriteTime, pdsfMapping.OldColumnNames.Count, columnsLine, match, lines: null);
|
||||||
jsonElementsOld = GetArray(logger, input.OldColumnNames.Count, processDataStandardFormat, lookForNumbers: false);
|
jsonElementsOld = GetArray(logger, pdsfMapping.OldColumnNames.Count, processDataStandardFormat, lookForNumbers: false);
|
||||||
if (jsonElementsOld is null || jsonElementsOld.Length != jsonElementsNew.Length) {
|
if (jsonElementsOld is null || jsonElementsOld.Length != jsonElementsNew.Length) {
|
||||||
logger.LogWarning("! <{match}> (jsonElementsOld.Length:{jsonElementsOld} != jsonElementsNew.Length:{jsonElementsNew})", match, jsonElementsOld?.Length, jsonElementsNew.Length);
|
logger.LogWarning("! <{match}> (jsonElementsOld.Length:{jsonElementsOld} != jsonElementsNew.Length:{jsonElementsNew})", match, jsonElementsOld?.Length, jsonElementsNew.Length);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
compare = Compare(logger, input, directorySegment, jsonElementsNew, jsonElementsOld);
|
compare = Compare(logger, pdsfMapping, directorySegment, jsonElementsNew, jsonElementsOld);
|
||||||
if (!compare) {
|
if (!compare) {
|
||||||
logger.LogWarning("! <{match}>", match);
|
logger.LogWarning("! <{match}>", match);
|
||||||
continue;
|
continue;
|
||||||
@ -105,7 +105,7 @@ internal static partial class Helper20250219 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool Compare(ILogger<Worker> logger, Input input, string directory, JsonElement[] jsonElementsNew, JsonElement[] jsonElementsOld) {
|
private static bool Compare(ILogger<Worker> logger, ProcessDataStandardFormatMapping processDataStandardFormatMapping, string directory, JsonElement[] jsonElementsNew, JsonElement[] jsonElementsOld) {
|
||||||
bool result;
|
bool result;
|
||||||
int? q;
|
int? q;
|
||||||
string valueNew;
|
string valueNew;
|
||||||
@ -129,7 +129,7 @@ internal static partial class Helper20250219 {
|
|||||||
for (int p = 0; p < jsonPropertiesOld.Length; p++) {
|
for (int p = 0; p < jsonPropertiesOld.Length; p++) {
|
||||||
jsonPropertyOld = jsonPropertiesOld[p];
|
jsonPropertyOld = jsonPropertiesOld[p];
|
||||||
valueOld = jsonPropertyOld.Value.ToString();
|
valueOld = jsonPropertyOld.Value.ToString();
|
||||||
if (input.KeyValuePairs.TryGetValue(jsonPropertyOld.Name, out string? name) && !string.IsNullOrEmpty(name)) {
|
if (processDataStandardFormatMapping.KeyValuePairs.TryGetValue(jsonPropertyOld.Name, out string? name) && !string.IsNullOrEmpty(name)) {
|
||||||
q = TryGetPropertyIndex(jsonPropertiesNew, name);
|
q = TryGetPropertyIndex(jsonPropertiesNew, name);
|
||||||
if (q is null && i == 0)
|
if (q is null && i == 0)
|
||||||
unknownColumns.Add($"{jsonPropertyOld.Name}|{name}");
|
unknownColumns.Add($"{jsonPropertyOld.Name}|{name}");
|
||||||
@ -141,7 +141,7 @@ internal static partial class Helper20250219 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (q is null) {
|
if (q is null) {
|
||||||
if (input.Ignore.Contains(jsonPropertyOld.Name)) {
|
if (processDataStandardFormatMapping.IgnoreColumns.Contains(jsonPropertyOld.Name)) {
|
||||||
if (i == last) {
|
if (i == last) {
|
||||||
columns.Add("-1");
|
columns.Add("-1");
|
||||||
logger.LogDebug("{p} )) {jsonPropertyOld.Name} **", p, jsonPropertyOld.Name);
|
logger.LogDebug("{p} )) {jsonPropertyOld.Name} **", p, jsonPropertyOld.Name);
|
||||||
@ -164,9 +164,9 @@ internal static partial class Helper20250219 {
|
|||||||
if (valueNew.Length >= 2 && valueNew.Split(' ')[0] == valueOld)
|
if (valueNew.Length >= 2 && valueNew.Split(' ')[0] == valueOld)
|
||||||
sameAfterSpaceSplitColumns.Add(jsonPropertyOld.Name);
|
sameAfterSpaceSplitColumns.Add(jsonPropertyOld.Name);
|
||||||
else {
|
else {
|
||||||
if (input.Backfill.Contains(jsonPropertyOld.Name) && i != last)
|
if (processDataStandardFormatMapping.BackfillColumns.Contains(jsonPropertyOld.Name) && i != last)
|
||||||
continue;
|
continue;
|
||||||
if (input.IndexOnly.Contains(jsonPropertyOld.Name) && int.TryParse(jsonPropertyOld.Name[^2..], out int index) && i != index - 1)
|
if (processDataStandardFormatMapping.IndexOnlyColumns.Contains(jsonPropertyOld.Name) && int.TryParse(jsonPropertyOld.Name[^2..], out int index) && i != index - 1)
|
||||||
continue;
|
continue;
|
||||||
logger.LogWarning("For [{jsonProperty.Name}] <{directory}> doesn't match (valueNew:{valueNew} != valueOld:{valueOld})!", jsonPropertyOld.Name, directory, valueNew, valueOld);
|
logger.LogWarning("For [{jsonProperty.Name}] <{directory}> doesn't match (valueNew:{valueNew} != valueOld:{valueOld})!", jsonPropertyOld.Name, directory, valueNew, valueOld);
|
||||||
differentColumns.Add(jsonPropertyOld.Name);
|
differentColumns.Add(jsonPropertyOld.Name);
|
||||||
@ -294,7 +294,7 @@ internal static partial class Helper20250219 {
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ProcessDataStandardFormat Get(ILogger<Worker> logger, Input input, JsonElement[] jsonElements, ProcessDataStandardFormat processDataStandardFormat) {
|
private static ProcessDataStandardFormat GetProcessDataStandardFormat(ILogger<Worker> logger, ProcessDataStandardFormatMapping processDataStandardFormatMapping, JsonElement[] jsonElements, ProcessDataStandardFormat processDataStandardFormat) {
|
||||||
ProcessDataStandardFormat result;
|
ProcessDataStandardFormat result;
|
||||||
int column;
|
int column;
|
||||||
string value;
|
string value;
|
||||||
@ -310,14 +310,14 @@ internal static partial class Helper20250219 {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
jsonProperties = jsonElements[i].EnumerateObject().ToArray();
|
jsonProperties = jsonElements[i].EnumerateObject().ToArray();
|
||||||
if (jsonProperties.Length != input.NewColumnNames.Count) {
|
if (jsonProperties.Length != processDataStandardFormatMapping.NewColumnNames.Count) {
|
||||||
logger.LogWarning("{jsonProperties} != {NewColumnNames}", jsonProperties.Length, input.NewColumnNames.Count);
|
logger.LogWarning("{jsonProperties} != {NewColumnNames}", jsonProperties.Length, processDataStandardFormatMapping.NewColumnNames.Count);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (int c = 0; c < input.ColumnIndices.Count; c++) {
|
for (int c = 0; c < processDataStandardFormatMapping.ColumnIndices.Count; c++) {
|
||||||
column = input.ColumnIndices[c];
|
column = processDataStandardFormatMapping.ColumnIndices[c];
|
||||||
if (column == -1)
|
if (column == -1)
|
||||||
value = input.OldColumnNames[c];
|
value = processDataStandardFormatMapping.OldColumnNames[c];
|
||||||
else {
|
else {
|
||||||
jsonProperty = jsonProperties[column];
|
jsonProperty = jsonProperties[column];
|
||||||
value = jsonProperty.Value.ToString();
|
value = jsonProperty.Value.ToString();
|
||||||
@ -327,7 +327,7 @@ internal static partial class Helper20250219 {
|
|||||||
results.Add(string.Join('\t', values));
|
results.Add(string.Join('\t', values));
|
||||||
}
|
}
|
||||||
result = new(Body: new(results),
|
result = new(Body: new(results),
|
||||||
Columns: processDataStandardFormat.Columns,
|
Columns: processDataStandardFormatMapping.OldColumnNames,
|
||||||
Logistics: processDataStandardFormat.Logistics,
|
Logistics: processDataStandardFormat.Logistics,
|
||||||
Sequence: processDataStandardFormat.Sequence);
|
Sequence: processDataStandardFormat.Sequence);
|
||||||
return result;
|
return result;
|
||||||
@ -348,7 +348,7 @@ internal static partial class Helper20250219 {
|
|||||||
results.Add($"HEADER_OFFSET\t{headerOffset}");
|
results.Add($"HEADER_OFFSET\t{headerOffset}");
|
||||||
results.Add($"DATA_OFFSET\t{dataOffset}");
|
results.Add($"DATA_OFFSET\t{dataOffset}");
|
||||||
results.Add($"END_OFFSET\t{endOffset}");
|
results.Add($"END_OFFSET\t{endOffset}");
|
||||||
results.Add($"\"{string.Join("\",\t\"", processDataStandardFormat.Columns)}\"");
|
results.Add($"\"{string.Join("\"\t\"", processDataStandardFormat.Columns)}\"");
|
||||||
results.AddRange(processDataStandardFormat.Body);
|
results.AddRange(processDataStandardFormat.Body);
|
||||||
results.Add($"NUM_DATA_ROWS\t{processDataStandardFormat.Body.Count.ToString().PadLeft(9, '0')}");
|
results.Add($"NUM_DATA_ROWS\t{processDataStandardFormat.Body.Count.ToString().PadLeft(9, '0')}");
|
||||||
results.Add($"NUM_DATA_COLUMNS\t{processDataStandardFormat.Columns.Count.ToString().PadLeft(9, '0')}");
|
results.Add($"NUM_DATA_COLUMNS\t{processDataStandardFormat.Columns.Count.ToString().PadLeft(9, '0')}");
|
||||||
|
@ -98,7 +98,9 @@ internal static partial class Helper20250228 {
|
|||||||
else
|
else
|
||||||
keyValuePairs.Add(record.Columns[i], row[i]);
|
keyValuePairs.Add(record.Columns[i], row[i]);
|
||||||
}
|
}
|
||||||
|
#pragma warning disable IL3050, IL2026
|
||||||
json = JsonSerializer.Serialize(keyValuePairs);
|
json = JsonSerializer.Serialize(keyValuePairs);
|
||||||
|
#pragma warning restore IL3050, IL2026
|
||||||
results.Add(json);
|
results.Add(json);
|
||||||
}
|
}
|
||||||
text = string.Join($",{Environment.NewLine}", results);
|
text = string.Join($",{Environment.NewLine}", results);
|
||||||
|
28
Scripts/cde.js
Normal file
28
Scripts/cde.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
// $('dcp.CDE4/csv/Avg', '') == '' ? '' : (parseFloat($('dcp.CDE4/csv/Dev', '0')) / parseFloat($('dcp.CDE4/csv/Avg', '0'))).toFixed(2) + '%'
|
||||||
|
|
||||||
|
// getValue($('dcp.CDE4/csv/Avg', ''), $('dcp.CDE4/csv/Dev', '0'), $('dcp.CDE4/csv/Avg', '0'));
|
||||||
|
|
||||||
|
function roundNumber(number, digits) {
|
||||||
|
let result;
|
||||||
|
const multiple = Math.pow(10, digits);
|
||||||
|
result = Math.round(number * multiple) / multiple;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValue(avgRaw, devZeroDefault, avgZeroDefault) {
|
||||||
|
let result;
|
||||||
|
if (avgRaw == '')
|
||||||
|
result = '';
|
||||||
|
else {
|
||||||
|
let raw = parseFloat(devZeroDefault) / parseFloat(avgZeroDefault);
|
||||||
|
result = roundNumber(raw, 2);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
const dev = 0.383;
|
||||||
|
const avg = 33.5810;
|
||||||
|
const value = getValue(avg, dev);
|
||||||
|
console.log("value: " + value);
|
@ -95,13 +95,13 @@ function getNineResRangePercent(criticalRhoPoints) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getValue(allRhoAvg, index) {
|
function getValue(edge10mmRhoPoints, index) {
|
||||||
let result = null;
|
let result = null;
|
||||||
if (index === 8) {
|
if (index === 8) {
|
||||||
if (allRhoAvg != undefined && allRhoAvg.length > 1) {
|
if (edge10mmRhoPoints != undefined && edge10mmRhoPoints.length > 1) {
|
||||||
let collection = allRhoAvg[0] === '|' ? allRhoAvg.substring(1).split('|') : allRhoAvg.split('|');
|
let collection = edge10mmRhoPoints[0] === '|' ? edge10mmRhoPoints.substring(1).split('|') : edge10mmRhoPoints.split('|');
|
||||||
let collectionParseFloat = getCollectionParseFloat(collection);
|
let collectionParseFloat = getCollectionParseFloat(collection);
|
||||||
result = average(collectionParseFloat);
|
result = Math.round(getAverage(collectionParseFloat) * 10000000) / 10000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -132,23 +132,7 @@ console.log(nineCriticalPointsStdDev);
|
|||||||
// Sequence to date string
|
// Sequence to date string
|
||||||
// getValue(self, getContextData('1', 'cds.SEQUENCE', ''));
|
// getValue(self, getContextData('1', 'cds.SEQUENCE', ''));
|
||||||
|
|
||||||
function getValue(value, sequence) {
|
const index = 8;
|
||||||
let result;
|
const gv_edge10mmRhoPoints = '|3.076|2.821|2.765|2.876';
|
||||||
if (sequence.length < 18)
|
const value = roundNumber(getValue(gv_edge10mmRhoPoints, index), 7);
|
||||||
result = value;
|
console.log("value: " + value);
|
||||||
else {
|
|
||||||
const epochTicks = 621355968000000000;
|
|
||||||
const milliseconds = (sequence - epochTicks) / 10000;
|
|
||||||
const date = new Date(milliseconds);
|
|
||||||
result = date.toString();
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
const date = '3/26/2025';
|
|
||||||
const sequence = '638784250251441727';
|
|
||||||
const value = getValue(date, sequence);
|
|
||||||
if (value === 1742853453)
|
|
||||||
console.info("Pass");
|
|
||||||
else
|
|
||||||
console.warn("Fail");
|
|
Loading…
x
Reference in New Issue
Block a user