Scripts
This commit is contained in:
parent
fad2db46b5
commit
aa6461c62d
8
.vscode/download-work-items.http
vendored
8
.vscode/download-work-items.http
vendored
@ -11,3 +11,11 @@ Authorization: Basic {{pat}}
|
|||||||
GET {{host}}/tfs/FactoryIntegration/_apis/wit/workitems/{{ids}}/updates
|
GET {{host}}/tfs/FactoryIntegration/_apis/wit/workitems/{{ids}}/updates
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Authorization: Basic {{pat}}
|
Authorization: Basic {{pat}}
|
||||||
|
|
||||||
|
### Iterations
|
||||||
|
|
||||||
|
GET {{host}}/tfs/FactoryIntegration/ART%20SPS/cea9f426-6fb1-4d65-93d5-dbf471056212/_apis/work/teamsettings/iterations?
|
||||||
|
Accept: application/json
|
||||||
|
Authorization: Basic {{pat}}
|
||||||
|
|
||||||
|
###
|
@ -1,6 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
getValue($('gv.thicknessPoints', ''), $('dcp.BIORAD2/csv/Index', '0'));
|
// getValue($('gv.thicknessPoints', ''), $('dcp.BIORAD2/csv/Index', '0'));
|
||||||
|
|
||||||
function getCollectionParseFloat(collection) {
|
function getCollectionParseFloat(collection) {
|
||||||
let result = [];
|
let result = [];
|
||||||
@ -36,7 +36,7 @@ function getAverage(collection) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getValue(thicknessPoints, index) {
|
function getValueB(thicknessPoints, index) {
|
||||||
let result = null;
|
let result = null;
|
||||||
if (index === 13) {
|
if (index === 13) {
|
||||||
if (thicknessPoints != undefined && thicknessPoints.length > 1) {
|
if (thicknessPoints != undefined && thicknessPoints.length > 1) {
|
||||||
@ -86,3 +86,63 @@ const thicknessFourteen3mmEdgeMean = getAverage([thicknessPoints[10], thicknessP
|
|||||||
const thicknessFourteen5mmEdgePercent = (thicknessFourteen5mmEdgeMean - thicknessFourteenMeanFrom) / thicknessFourteenMeanFrom * 100; // 21 // *1.848440576764267
|
const thicknessFourteen5mmEdgePercent = (thicknessFourteen5mmEdgeMean - thicknessFourteenMeanFrom) / thicknessFourteenMeanFrom * 100; // 21 // *1.848440576764267
|
||||||
const thicknessFourteen3mmEdgePercent = (thicknessFourteen3mmEdgeMean - thicknessFourteenMeanFrom) / thicknessFourteenMeanFrom * 100; // 22 // *-1.0036206567998442
|
const thicknessFourteen3mmEdgePercent = (thicknessFourteen3mmEdgeMean - thicknessFourteenMeanFrom) / thicknessFourteenMeanFrom * 100; // 22 // *-1.0036206567998442
|
||||||
console.log(thicknessFourteenCriticalPointsAverage);
|
console.log(thicknessFourteenCriticalPointsAverage);
|
||||||
|
|
||||||
|
// getValue($('dcp.BIORAD2/csv/Batch', ''), $('dcp.BIORAD2/csv/Wafer', ''));
|
||||||
|
|
||||||
|
function getSlot(wafer) {
|
||||||
|
let result = null;
|
||||||
|
if (wafer.length !== 1 && wafer.length !== 2)
|
||||||
|
result = null;
|
||||||
|
else {
|
||||||
|
let slot = parseInt(wafer);
|
||||||
|
if (slot < 1 || slot > 27)
|
||||||
|
result = null;
|
||||||
|
else
|
||||||
|
result = slot < 10 ? '0' + slot : slot;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getBatch(batch, jobId, wafer) {
|
||||||
|
let result = null;
|
||||||
|
const slot = getSlot(wafer);
|
||||||
|
result = slot == null ? jobId : batch;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getWafer(wafer) {
|
||||||
|
let result = null;
|
||||||
|
const slot = getSlot(wafer);
|
||||||
|
result = slot == null ? wafer : slot;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getValue(batch, wafer) {
|
||||||
|
let result = null;
|
||||||
|
const slot = getSlot(wafer);
|
||||||
|
const value = slot == null ? wafer : batch;
|
||||||
|
result = value.replace(/[\{\}\\\/\:\*\?\"\<\>\|]/g, '_');
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
const values = [
|
||||||
|
{ wafer: '11', jobId: 'BIORAD2', batch: 'O172068.1.60', waferCheck: '11', batchCheck: 'O172068.1.60', mid: 'O172068.1.60' },
|
||||||
|
{ wafer: '27-588493-5008', jobId: 'BIORAD2', batch: 'BIORAD#2', waferCheck: '27-588493-5008', batchCheck: 'BIORAD2', mid: '27-588493-5008' },
|
||||||
|
{ wafer: '27-588493-5"008', jobId: 'BIORAD2', batch: 'BIORAD#2', waferCheck: '27-588493-5008', batchCheck: 'BIORAD2', mid: '27-588493-5_008' },
|
||||||
|
];
|
||||||
|
|
||||||
|
const wafer = "11";
|
||||||
|
const jobId = "BIORAD2";
|
||||||
|
const batch = "O172068.1.60";
|
||||||
|
const waferCheck = getWafer(wafer);
|
||||||
|
const batchCheck = getBatch(batch, jobId, wafer);
|
||||||
|
const mid = getValue(batch, wafer);
|
||||||
|
console.log(mid);
|
||||||
|
|
||||||
|
values.forEach(element => {
|
||||||
|
let mid = getValue(element.batch, element.wafer);
|
||||||
|
if (mid != element.mid)
|
||||||
|
console.error("MID doesn't match!");
|
||||||
|
else
|
||||||
|
console.info('Match');
|
||||||
|
});
|
||||||
|
159
Scripts/cde.js
159
Scripts/cde.js
@ -26,3 +26,162 @@ const dev = 0.383;
|
|||||||
const avg = 33.5810;
|
const avg = 33.5810;
|
||||||
const value = getValue(avg, dev);
|
const value = getValue(avg, dev);
|
||||||
console.log("value: " + value);
|
console.log("value: " + value);
|
||||||
|
|
||||||
|
// getValue(self, self.length, $('dcp.CDE4/csv/MesEntity', ''), $('dcp.CDE4/csv/Title', ''), $('dcp.CDE4/csv/Recipe', ''), getContextData('2', 'cds.PROCESS_JOBID', ''));
|
||||||
|
|
||||||
|
function tryParseInt(str, defaultValue) {
|
||||||
|
const parsedValue = parseInt(str);
|
||||||
|
return isNaN(parsedValue) ? defaultValue : parsedValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getReactorAndRDS(defaultReactor, defaultRDS, text, formattedText, segments) {
|
||||||
|
let result = {};
|
||||||
|
let rds;
|
||||||
|
let reactor;
|
||||||
|
let rdsValue;
|
||||||
|
if (text == null || text.length === 0 || segments.length === 0 || formattedText == null || formattedText.length === 0)
|
||||||
|
reactor = defaultReactor;
|
||||||
|
else
|
||||||
|
reactor = segments[0];
|
||||||
|
if (segments.length <= 1 || !tryParseInt(segments[1], false) || rdsValue < 99)
|
||||||
|
rds = defaultRDS;
|
||||||
|
else
|
||||||
|
rds = segments[1];
|
||||||
|
if (reactor.length > 3) {
|
||||||
|
rds = reactor;
|
||||||
|
reactor = defaultReactor;
|
||||||
|
}
|
||||||
|
result = { reactor: reactor, rds: rds };
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLayerAndPSN(defaultLayer, defaultPSN, segments) {
|
||||||
|
let result = {};
|
||||||
|
let psn;
|
||||||
|
let layer;
|
||||||
|
if (segments.length <= 2) {
|
||||||
|
psn = defaultPSN;
|
||||||
|
layer = defaultLayer;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
let segmentsB = segments[2].split('.');
|
||||||
|
psn = segmentsB[0];
|
||||||
|
if (segmentsB.length <= 1)
|
||||||
|
layer = defaultLayer;
|
||||||
|
else {
|
||||||
|
layer = segmentsB[1];
|
||||||
|
if (layer.length > 1 && layer[0] === '0')
|
||||||
|
layer = layer.substring(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = { layer: layer, psn: psn };
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getZone(segments) {
|
||||||
|
let result = '';
|
||||||
|
if (segments.length <= 3)
|
||||||
|
result = '';
|
||||||
|
else {
|
||||||
|
result = segments[3];
|
||||||
|
if (result.length > 1 && result[0] === '0')
|
||||||
|
result = result.substring(1);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getArray(text) {
|
||||||
|
let result = {};
|
||||||
|
let lot = '';
|
||||||
|
let psn = '';
|
||||||
|
let rds = '';
|
||||||
|
let zone = '';
|
||||||
|
let layer = '';
|
||||||
|
let reactor = '';
|
||||||
|
let employee = '';
|
||||||
|
let defaultPSN = '';
|
||||||
|
let defaultRDS = '';
|
||||||
|
let defaultZone = '';
|
||||||
|
let defaultLayer = '';
|
||||||
|
let defaultReactor = '';
|
||||||
|
let defaultEmployee = '';
|
||||||
|
const processOnly = /^[a-zA-z]{2,3}/;
|
||||||
|
const processOnlyB = /^[a-zA-z][0-9]{2,4}$/;
|
||||||
|
const normal = /^[0-9]{2}[.][0-9]{1}[.]?[0-9]{0,1}/;
|
||||||
|
const fileSystemSafe = /[\\,\/,\:,\*,\?,\"",\<,\>,\|]/;
|
||||||
|
if (text.match(processOnlyB)) {
|
||||||
|
lot = text.toUpperCase();
|
||||||
|
psn = defaultPSN;
|
||||||
|
rds = defaultRDS;
|
||||||
|
zone = defaultZone;
|
||||||
|
layer = defaultLayer;
|
||||||
|
reactor = defaultReactor;
|
||||||
|
employee = defaultEmployee;
|
||||||
|
}
|
||||||
|
else if (text == null || text.length === 0 || (text.length == 2 && text.match(processOnly))) {
|
||||||
|
lot = text;
|
||||||
|
employee = lot;
|
||||||
|
psn = defaultPSN;
|
||||||
|
rds = defaultRDS;
|
||||||
|
zone = defaultZone;
|
||||||
|
layer = defaultLayer;
|
||||||
|
reactor = defaultReactor;
|
||||||
|
}
|
||||||
|
else if (text.match(normal)) {
|
||||||
|
let segments = text.split('.');
|
||||||
|
lot = text;
|
||||||
|
psn = defaultPSN;
|
||||||
|
rds = defaultRDS;
|
||||||
|
layer = segments[1];
|
||||||
|
reactor = segments[0];
|
||||||
|
employee = defaultEmployee;
|
||||||
|
if (segments.length <= 2)
|
||||||
|
zone = defaultZone;
|
||||||
|
else
|
||||||
|
zone = segments[2];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lot = text.replace(fileSystemSafe, "_").split('\r')[0].split('\n')[0];
|
||||||
|
if (lot.length > 2 && lot[0] == '1' && (lot[1] == 'T' || lot[1] == 't'))
|
||||||
|
lot = lot.substring(2);
|
||||||
|
let segments = lot.split('-');
|
||||||
|
let reactorAndRDS = getReactorAndRDS(defaultReactor, defaultRDS, text, lot, segments);
|
||||||
|
reactor = reactorAndRDS.reactor;
|
||||||
|
rds = reactorAndRDS.rds;
|
||||||
|
let layerAndPSN = getLayerAndPSN(defaultLayer, defaultPSN, segments);
|
||||||
|
layer = layerAndPSN.layer;
|
||||||
|
psn = layerAndPSN.psn;
|
||||||
|
zone = getZone(segments);
|
||||||
|
if (segments.length <= 4)
|
||||||
|
employee = defaultEmployee;
|
||||||
|
else
|
||||||
|
employee = segments[4];
|
||||||
|
}
|
||||||
|
result = { rds: rds, psn: psn, reactor: reactor, layer: layer, zone: zone, employee: employee, lot: lot };
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
function getValueReactor(value, length, mesEntity, title, recipe, processJobId) {
|
||||||
|
if (recipe.toUpperCase() === 'RLOW_STD')
|
||||||
|
return mesEntity;
|
||||||
|
else if (recipe.toUpperCase() === 'RMID_STD')
|
||||||
|
return mesEntity;
|
||||||
|
else if (recipe.toUpperCase() === 'RHI_STD')
|
||||||
|
return mesEntity;
|
||||||
|
else if (recipe.toUpperCase() === 'THINSPC')
|
||||||
|
return mesEntity;
|
||||||
|
else if (length === 0 && processJobId == 0)
|
||||||
|
return getArray(title).reactor;
|
||||||
|
else if (length === 0)
|
||||||
|
return processJobId;
|
||||||
|
else
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
const self = '';
|
||||||
|
const mesEntity = 'CDE4';
|
||||||
|
const title = '75-663192-5281.1';
|
||||||
|
const recipe = '8IN_INF';
|
||||||
|
const processJobId = '0';
|
||||||
|
const valueReactor = getValueReactor(self, self.length, mesEntity, title, recipe, processJobId);
|
||||||
|
console.log("value: " + valueReactor);
|
Loading…
x
Reference in New Issue
Block a user