From 60522d74c12326b2821e450b58ef41d02fc2c001 Mon Sep 17 00:00:00 2001 From: "Infineon\\Mitchem" Date: Mon, 18 Aug 2025 10:43:33 -0700 Subject: [PATCH] Improvements suggested by Daniel. --- LSL2/STPROC/WO_MAT_QA_SERVICES.txt | 100 ++++++++++++++++------------- 1 file changed, 56 insertions(+), 44 deletions(-) diff --git a/LSL2/STPROC/WO_MAT_QA_SERVICES.txt b/LSL2/STPROC/WO_MAT_QA_SERVICES.txt index c9d6bd3..718efa0 100644 --- a/LSL2/STPROC/WO_MAT_QA_SERVICES.txt +++ b/LSL2/STPROC/WO_MAT_QA_SERVICES.txt @@ -422,22 +422,24 @@ end service Service GetQAMetComplete(WOMatKey) If WOMatKey NE '' then - Response = '' - QAMetRec = Xlate('WO_MAT_QA', WOMatKey, '', 'X') - Stages = QAMetRec - Results = QAMetRec - StageCount = Count(Stages, @VM) - For I = 1 to StageCount - If Results<1,I> EQ '' then - Response = False$ + If Rowexists('WO_MAT_QA', WOMatKey) then + Response = '' + QAMetRec = Database_Services('ReadDataRow', 'WO_MAT_QA', WOMatKey, '', True$, 0, False$) + Stages = QAMetRec + Results = QAMetRec + StageCount = Count(Stages, @VM) + For I = 1 to StageCount + If Results<1,I> EQ '' then + Response = False$ + end + Until Response EQ False$ + Next I + If Response = '' then + Response = Wo_Mat_Qa_Services('GetMUWaferQAComplete', WOMatKey) end - Next I - - MUQAComp = Wo_Mat_Qa_Services('GetMUWaferQAComplete', WOMatKey) - If (Response EQ '') AND (MUQAComp EQ True$) then + end else Response = True$ end - end else Error_Services('Add', 'Missing WOMatKey parameter.') end @@ -448,37 +450,47 @@ end service Service GetMUWaferQAComplete(WOMatKey) - Response = True$ - WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$) - MUBoxes = '' - MUBoxesResults = '' - MUWafers = WOMatRec - If Count(MUWafers, @VM) GT 0 then - for each BoxNumber in MUWafers using @VM setting OrigIndex - if BoxNumber NE '' then - MUCassId = FIELD(BoxNumber,'.',1,2) - Locate MUCassId in MUBoxesResults using @VM setting BoxIndex then - MUThkResult = WOMatRec - If MUThkResult NE '' then - MUBoxesResults = True$ - end - end else - MUBoxNewIndex = DCount(MUBoxesResults, @FM) - MUBoxesResults = MUCassID - MUThkResult = WOMatRec - If MUThkResult NE '' then - MUBoxesResults = True$ - end - end - end - Next BoxNumber - - for each Box in MUBoxesResults using @FM - if Box<1,2> EQ '' then - Response = False$ - end - Until Response = False$ - Next Box + If WOMatKey NE '' then + Response = True$ + WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$) + If Error_Services('NoError') then + MUBoxes = '' + MUBoxesResults = '' + MUWafers = WOMatRec + Counter = 0 + + If Count(MUWafers, @VM) GT 0 then + for each BoxNumber in MUWafers using @VM setting OrigIndex + if BoxNumber NE '' then + MUCassId = FIELD(BoxNumber,'.',1,2) + Locate MUCassId in MUBoxesResults using @VM setting BoxIndex then + MUThkResult = WOMatRec + If MUThkResult NE '' then + MUBoxesResults = True$ + end + end else + Counter += 1 + MUBoxesResults = MUCassID + MUThkResult = WOMatRec + If MUThkResult NE '' then + MUBoxesResults = True$ + end + end + end + Next BoxNumber + + for each Box in MUBoxesResults using @FM + if Box<1,2> EQ '' then + Response = False$ + end + Until Response = False$ + Next Box + end + end else + Error_Services('Add', 'Failed to open WO_MAT record.') + end + end else + Error_Services('Add', 'Missing WOMatKey parameter.') end end service