Added in checking that QA stage exists. This allows for lack of QA stage measurements
This commit is contained in:
committed by
Stieber Daniel (CSC FI SPS MESLEO)
parent
a0897d19df
commit
422dc69da7
@ -422,32 +422,49 @@ end service
|
||||
Service GetQAMetComplete(WOMatKey)
|
||||
|
||||
ErrorMsg = ''
|
||||
Response = True$
|
||||
QAMetComplete = True$
|
||||
|
||||
If WOMatKey NE '' then
|
||||
// Lack of WO_MAT_QA record may not be an error here. Gen5 Products do not have WO_MAT_QA Records
|
||||
If Rowexists('WO_MAT_QA', WOMatKey) then
|
||||
QAMetRec = Database_Services('ReadDataRow', 'WO_MAT_QA', WOMatKey, '', True$, 0, False$)
|
||||
Stages = QAMetRec<WO_MAT_QA_STAGE$>
|
||||
Results = QAMetRec<WO_MAT_QA_RESULT$>
|
||||
StageCount = DCount(Stages, @VM)
|
||||
For I = 1 to StageCount
|
||||
If Stages<1, I> NE '' then
|
||||
If Results<1,I> EQ '' then
|
||||
Response = False$
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Stages = QAMetRec<WO_MAT_QA_STAGE$>
|
||||
Results = QAMetRec<WO_MAT_QA_RESULT$>
|
||||
StageCount = DCount(Stages, @VM)
|
||||
QAStagePresent = False$
|
||||
For I = 1 to StageCount
|
||||
If Stages<1, I> EQ 'QA' then
|
||||
QAStagePresent = True$
|
||||
If Results<1,I> EQ '' then
|
||||
QAMetComplete = False$
|
||||
end
|
||||
end
|
||||
Until QAMetComplete EQ False$
|
||||
Next I
|
||||
If QAMetComplete EQ True$ AND QAStagePresent = True$ then
|
||||
QAMUMetComplete = WO_Mat_QA_Services('GetMUWaferQAComplete', WOMatKey)
|
||||
If Error_Services('NoError') then
|
||||
If Not(QAMUMetComplete) then
|
||||
QAMetComplete = False$
|
||||
end
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
Until Response EQ False$
|
||||
Next I
|
||||
end else
|
||||
Response = True$
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Missing WOMatKey parameter.'
|
||||
Response = False$
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
If ErrorMsg EQ '' then
|
||||
Response = QAMetComplete
|
||||
end else
|
||||
Response = False$
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
@ -455,6 +472,8 @@ end service
|
||||
|
||||
Service GetMUWaferQAComplete(WOMatKey)
|
||||
|
||||
ErrorMsg = ''
|
||||
|
||||
If WOMatKey NE '' then
|
||||
Response = True$
|
||||
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
|
||||
@ -492,11 +511,16 @@ Service GetMUWaferQAComplete(WOMatKey)
|
||||
Next Box
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Failed to open WO_MAT record.')
|
||||
ErrorMsg = 'Failed to open WO_MAT record.'
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Missing WOMatKey parameter.')
|
||||
ErrorMsg = 'Missing WOMatKey parameter.'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user