open-insight/LSL2/STPROC/TEST_WAFER_PROD_SERVICES.txt
Infineon\Ouellette 9651c48539 Initial addition for Test Wafer Tracking Phase 2
Includes services and functions to create new
test wafer lot. Tables included outside of git push
New Tables:
1. LOT
2. LOT_EVENT
3. LOT_OPERATION
4. PRODUCT_OPERATION
5. OPERATION
6. Added PRODUCT_OPERATIONS field in TEST_WAFER_PROD table.
All relational indexes and btree indexes.
2024-10-24 20:23:15 +02:00

65 lines
2.1 KiB
Plaintext

Compile function Test_Wafer_Prod_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler
Declare function Database_Services, SRP_JSON
Declare Subroutine Btree.Extract, SRP_JSON, Error_Services, Rlist
$insert LOGICAL
$insert TEST_WAFER_PROD_EQUATES
GoToService
Return Response or ""
//-----------------------------------------------------------------------------
// SERVICES
//-----------------------------------------------------------------------------
Service GetAllTestWaferProdIDs(ShowSorted)
keylist = ''
ProdList = ''
If ShowSorted then
RList("SELECT TEST_WAFER_PROD WITH SORT_ORDER NE 0 AND WITH SORT_ORDER NE '' BY SORT_ORDER", 5, '', '', '')
end else
RList("SELECT TEST_WAFER_PROD BY SORT_ORDER", 5, '', '', '')
end
Done = False$
Loop
Readnext TWProdKey else Done = True$
Until Done
keylist<-1> = TWProdKey
Repeat
Response = keylist
end service
Service GetTestWaferProdIDsByPartName(PartName)
TWPartIDs = ''
OPEN 'DICT.TEST_WAFER_PROD' TO DictVar THEN
SearchString = 'PART_NAME':@VM:PartName:@FM
Flag = ''
Btree.Extract(SearchString, 'TEST_WAFER_PROD', DictVar, TWPartIDs, '', Flag)
end else
Error_Services('Add', 'Error opening TEST_WAFER_PROD dictionary')
end
Response = TWPartIDs
End Service
Service ConvertRecordToJson(TWProdId)
JSON = ''
TWProdRec = Database_Services('ReadDataRow', 'TEST_WAFER_PROD', TWProdId)
If SRP_JSON(hJSONCollection, 'New', 'Object') then
hTWProdObj = ''
If SRP_Json(hTWProdObj, 'New', 'Object') then
SRP_JSON(hTWProdObj, 'SetValue', 'TestWaferProdId', TWProdId)
SRP_JSON(hTWProdObj, 'SetValue', 'TestWaferPartName', TWProdRec<TEST_WAFER_PROD_PART_NAME$>)
SRP_JSON(hJSONCollection, 'Set', 'TEST_WAFER_PROD', hTWProdObj)
SRP_JSON(hTWProdObj, 'Release')
end
JSON = SRP_JSON(hJSONCollection, 'Stringify', 'Styled')
SRP_JSON(hJSONCollection, 'Release')
end
Response = JSON
End Service