Added filtering criteria to only return available met tests relevant to the current operation

This commit is contained in:
Infineon\Ouellette
2025-07-25 11:05:34 -07:00
committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent a48f47ddc9
commit 71daf317f0
2 changed files with 61 additions and 23 deletions

View File

@ -994,7 +994,7 @@ Service ConvertRecordToJson(MetTestId)
SRP_JSON(objJSON, 'SetValue', 'outOfSpec', {OUT_OF_SPEC}, 'Boolean')
SRP_JSON(objJSON, 'SetValue', 'complete', {COMPLETE}, 'Boolean')
objMetPropArray = ''
If SRP_JSON(objMetPropArray, 'New', 'Array') then
If SRP_JSON(objMetPropArray, 'New', 'Array') then
For PropIndex = 1 to NUM_PROPERTIES$
PropName = Xlate('MET_TEST', MetTestId, 'PROPERTY_':PropIndex, 'X')
PropVals = Xlate('MET_TEST_DATA', MetTestDataIds, 'PROPERTY_':PropIndex:'_VALUE', 'X')
@ -1110,7 +1110,7 @@ end service
// MET_TEST key ids.
//
//----------------------------------------------------------------------------------------------------------------------
Service GetMetTests(LotId, LegacyLotId, LotOperationId, ToolId, ExcludeAssociated)
Service GetMetTests(LotId, LegacyLotId, ToolId, ExcludeAssociated, MatchClass, FromDtm, ToDtm)
ErrorMsg = ''
MetTestIds = ''
@ -1119,6 +1119,17 @@ Service GetMetTests(LotId, LegacyLotId, LotOperationId, ToolId, ExcludeAssociate
If RowExists('LOT', LotId) then
Open 'DICT.MET_TEST' to DictVar then
SearchString = ''
If MatchClass NE '' then
If DCount(MatchClass, @VM) GT 1 then
SearchString := 'TOOL_CLASS':@VM:MatchClass<1,1>
for i = 2 to DCount(MatchClass, @VM)
SearchString := @VM : ';':MatchClass<1,i>
Next i
SearchString := @FM
end else
SearchString := 'TOOL_CLASS':@VM:MatchClass:@FM
end
end
If LotId NE '' then
SearchString := 'LOT_ID':@VM:LotId:@FM
end
@ -1128,19 +1139,33 @@ Service GetMetTests(LotId, LegacyLotId, LotOperationId, ToolId, ExcludeAssociate
If ToolId NE '' then
SearchString := 'TOOL':@VM:ToolId:@FM
end
Btree.Extract(SearchString, 'MET_TEST', DictVar, MetTestIds, '', '')
If MetTestIds NE '' then
If ExcludeAssociated then
for each MetTestId in MetTestIds using @VM setting mPos
MetTestLotOperationId = Database_Services('ReadDataColumn', 'MET_TEST', MetTestId, MET_TEST.LOT_OPERATION_ID$, True$, 0, False$)
If MetTestLotOperationId EQ '' then
RespMetTestIds<1,-1> = MetTestId
end
Next MetTestId
if FromDtm NE '' then
FromDtm = FromDtm + 0.000001
If ToDtm NE '' then
ToDtm = ToDtm + 0.000001
end else
RespMetTestIds = MetTestIds
ToDtm = DateTime()
end
SearchString := 'TEST_DTM':@VM:FromDtm:'~':ToDtm:@FM
end
Btree.Extract(SearchString, 'MET_TEST', DictVar, MetTestIds, '', '')
If Not(Get_status(errCode)) then
If MetTestIds NE '' then
If ExcludeAssociated then
for each MetTestId in MetTestIds using @VM setting mPos
MetTestLotOperationId = Database_Services('ReadDataColumn', 'MET_TEST', MetTestId, MET_TEST.LOT_OPERATION_ID$, True$, 0, False$)
If MetTestLotOperationId EQ '' then
RespMetTestIds<1,-1> = MetTestId
end
Next MetTestId
end else
RespMetTestIds = MetTestIds
end
end
end else
ErrorMsg = ErrCode
end
end else
ErrorMsg = 'Error in ' : Service : ' service. Error opening MET_TEST dictionary.'
end
@ -1252,3 +1277,4 @@ end service