Added in functionality for TW WIP Reporting

Refactored error logging and catching.
This commit is contained in:
Infineon\Ouellette
2024-10-31 08:13:46 -07:00
committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent 0ec0428f19
commit 508707f0f2
6 changed files with 478 additions and 104 deletions

View File

@ -81,6 +81,7 @@ Declare function Set_Printer, Get_Printer, Msg, Get_Status, Printer_Select, ob
Declare function Schedule_Services, Error_Services, Location_Services, SRP_Array, Signature_Services, obj_RDS_Test
Declare function Epi_Part_Services, SRP_Math, Database_Services, SRP_JSON, Reactor_Services, SRP_Datetime
Declare function SRP_Array, Environment_Services, Logging_Services, Datetime, Select_Into, Wafer_Counter_Services
Declare function Lot_Services, Test_Run_Services
Equ TAB TO \09\
@ -1545,6 +1546,46 @@ Service CalcInProcessDailyPerformanceData()
end service
Service GetOpenTestWaferLotWIPReportJson()
ErrorMessage = ''
JSONCollection = ''
TestWaferLots = Test_Run_Services('GetTestWaferLots', True$)
hJSONCollection = ''
If SRP_JSON(hJSONCollection, 'New', 'Object') then
hTWLotArray = ''
If SRP_JSON(hTWLotArray, 'New', 'Array') then
Abort = False$
for each TestWaferLotId in TestWaferLots using @VM
ThisLotJson = Lot_Services('ConvertLotRecordToJson', TestWaferLotId, '', '', False$)
If Error_Services('NoError') then
hTWLot = ''
If (SRP_JSON(hTWLot, 'Parse', ThisLotJson) EQ '') then
SRP_JSON(hTWLotArray, 'Add', hTWLot)
SRP_JSON(hTWLot, 'Release')
end
end else
Abort = True$
end
Until Abort
Next TestWaferLotId
If Abort EQ False$ then
SRP_JSON(hJSONCollection, 'Set', 'Lots', hTWLotArray)
end
SRP_JSON(hTWLotArray, 'Release')
end else
ErrorMessage = 'Error creating test wafer Json array.'
end
JSONCollection = SRP_JSON(hJSONCollection, 'Stringify', 'Styled')
SRP_JSON(hJSONCollection, 'Release')
end else
ErrorMessage = 'Error creating test wafer Json Collection'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
Response = JSONCollection
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
@ -1845,3 +1886,4 @@ ClearCursors:
return