Create new services.

Commit to switch branches.

Fix error text.

Fixed CassetteID variable typo.

Commit final changes.
This commit is contained in:
Infineon\Mitchem
2025-07-10 08:26:17 -07:00
committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent adc247fd4c
commit a636198128
6 changed files with 235 additions and 31 deletions

View File

@ -434,7 +434,7 @@ RejMat:
WfrID = SlotList<SelectedRows<I>, COL$WAFER_ID>
PrevNCR = SlotList<SelectedRows<I>, COL$SLOT_NCR>
MUWfrID = SlotList<SelectedRows<I>, COL$MU_WAFER_ID>
If (WfrId EQ '') then
If ( (MetNo NE '') or (WfrID EQ '') or (PrevNCR NE '' and MUWfrID EQ '') ) then
AllSlotsPermitted = False$
IneligibleSlots<0, -1> = SlotNo
end
@ -1233,3 +1233,6 @@ LogRecord:
return

View File

@ -44,7 +44,7 @@ Equ MSG_WIDTH$ to 650
Equ Comma$ to ','
Declare function MemberOf, Form_Services, Wafer_Counter_Services, SRP_Json, WO_Mat_Services, Wm_Out_Services, Datetime
Declare function Logging_Services, Environment_Services
Declare function Logging_Services, Environment_Services, Wo_Mat_Qa_Services, Return_To_Fab_Services
Declare subroutine SRP_Json, PlaceDialog, Wafer_Counter_Services, Logging_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WaferCounter'
@ -97,13 +97,26 @@ Event WINDOW.CREATE(CreateParam)
LogData<5> = ToolLoc
LogData<6> = @Window:'.CREATE'
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
QAMetComplete = ''
If CassID NE '' then
If RowExists('WM_OUT', CassID) then
WOMatKey = Xlate('WM_OUT', CassID, 'WO_MAT_KEY', 'X')
end else
WOMatKey = Xlate('RDS', CassID, 'WO_MAT_KEY', 'X')
end
QAMetComplete = Wo_Mat_Qa_Services('GetQAMetComplete', WOMatKey)
end
Convert '.' to '*' in CassID
ExpectedQty = ''
ExpectedWfrMap = ''
If WfrCntAdj EQ '' then WfrCntAdj = 0
Set_Property(@Window:'.EDL_CASS_ID', 'TEXT', CassID)
Begin Case
Case (CassID NE '' AND QAMetComplete EQ False$)
ErrorMsg = 'Wafer Counter Operation Not Allowed. QA Metrology Incomplete.'
Case ( (CassID EQ '') and (ToolLoc EQ '') )
// Alternate workflow
Set_Property(@Window:'.LBL_CASS_ID', 'TEXT', 'Cass ID')
@ -319,6 +332,9 @@ Event EDL_CASS_BARCODE.LOSTFOCUS(Flag, FocusID)
Set_Property(@Window:'.EDL_CASS_ID', 'TEXT', CassetteID)
Begin Case
Case RowExists('RDS', CassetteID)
WOMatKey = Xlate('RDS', CassetteID, 'WO_MAT_KEY', 'X')
QAMetComplete = Wo_Mat_Qa_Services('GetQAMetComplete', WOMatKey)
If QAMetComplete EQ True$ then
ExpectedQty = Xlate('RDS', CassetteID, 'WFRS_OUT', 'X')
Set_Property(@Window:'.EDL_EXPECTED_QTY', 'TEXT', ExpectedQty)
Set_Property(@Window:'.LBL_CASS_ID', 'TEXT', 'Cass RDS')
@ -331,8 +347,14 @@ Event EDL_CASS_BARCODE.LOSTFOCUS(Flag, FocusID)
end else
ErrorMsg = Error_Services('GetMessage')
end
end else
ErrorMsg = 'Wafer Counter Operation Not Allowed. QA Metrology Incomplete.'
end
Case RowExists('WM_OUT', CassetteID)
WOMatKey = Xlate('WM_OUT', CassetteID, 'WO_MAT_KEY', 'X')
QAMetComplete = Wo_Mat_Qa_Services('GetQAMetComplete', WOMatKey)
If QAMetComplete EQ True$ then
ExpectedQty = Xlate('WM_OUT', CassetteID, 'WAFER_CNT', 'X')
Set_Property(@Window:'.EDL_EXPECTED_QTY', 'TEXT', ExpectedQty)
Set_Property(@Window:'.LBL_CASS_ID', 'TEXT', 'Cass WMO')
@ -344,11 +366,15 @@ Event EDL_CASS_BARCODE.LOSTFOCUS(Flag, FocusID)
end else
ErrorMsg = Error_Services('GetMessage')
end
end else
ErrorMsg = 'Wafer Counter Operation Not Allowed. QA Metrology Incomplete.'
end
End Case
If ErrorMsg EQ '' then
Convert @VM to '' in ExpectedWfrMap
Set_Property(@Window, '@EXPECTED_WFR_MAP', ExpectedWfrMap)
end
end else
If CassetteID NE VerifyCassID then
ErrorMsg = 'Scanned cassette ID does not match cassette to verify!'
@ -598,3 +624,7 @@ ClearForm:
return

View File

@ -1141,6 +1141,38 @@ Service OpenOIWizardReturnToFabInBrowser(RTFId)
end service
Service GetReturnedToFab(CassID)
If CassID NE '' then
RTFRecords = ''
ErrorMessage = ''
If CassId NE '' then
table = "RETURN_TO_FAB_LOTS"
Open "DICT ":table To @DICT Else
ErrorMessage = 'Error opening RETURN_TO_FAB_LOTS dictionary'
End
If ErrorMessage EQ '' then
srch_strng = "CASS_ID":@VM:CassId:@FM
option = ""
flag = ""
Btree.Extract(srch_strng, table, @DICT, RTFRecords, option, flag)
end
end else
ErrorMessage = 'Error getting return to fab record by cass. ID. Cassette ID was null'
end
end else
ErrorMessage = 'Missing CassID parameter.'
end
If ErrorMessage EQ '' then
If RTFRecords = '' then
Response = False$
end else
Response = True$
end
end else
Error_Services('Add', ErrorMessage)
end
end service
Service InitializeReturnToFabLotOperations(LotId)
ErrorMessage = ''

View File

@ -39,7 +39,7 @@ Function Wafercounter_API(@API)
#pragma precomp SRP_PreCompiler
Declare function OI_Wizard_Services, Wafer_Counter_Services, Database_Services, Datetime, Wo_Mat_Services
Declare function Logging_Services, Environment_Services
Declare function Logging_Services, Environment_Services, Wo_Mat_Qa_Services, Return_To_Fab_Services
Declare subroutine Logging_Services
@ -127,7 +127,12 @@ API wafercounter.startnewwafercount.POST
CassNo = Field(CassId, '*', 3)
WoMatKey = WONo : '*' : CassNo
End Case
ReturnedToFab = Return_To_Fab_Services('GetReturnedToFab', CassID)
QAMetComplete = Wo_Mat_Qa_Services('GetQAMetComplete', WoMatKey)
ExpectedWfrMap = Wo_Mat_Services('GetWaferMap', WoMatKey)
If (ReturnedToFab EQ False$) AND (QAMetComplete EQ False$) then
Error_Services('Add', 'Wafer Counter Operation Not Allowed. QA Metrology Incomplete.')
end
ExpectedCassetteArray = ''
for i = 25 to 1 step -1
Slot = i
@ -376,3 +381,73 @@ API wafercounter.ID.GET
HTTP_Services('SetResponseStatus', ResponseCode, ErrorMessage)
end api
API wafercounter.ID.HEAD
API wafercounter.ID.GET
ErrorMessage = ''
ResponseCode = ''
WaferCounterId = EndPointSegment
CassId = ''
Body = ''
OIWizardID = ''
UserId = ''
Cookies = HTTP_Services('GetHTTPCookie')
For each Cookie in Cookies using ';'
Key = Field(Cookie, '=', 1)
If Key EQ 'sessionID' then
OIWizardID = Field(Cookie, '=', 2)
end
Next Cookie
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
CassBarcodeData = ''
UserId = Xlate('OI_WIZARD', OIWizardID, OI_WIZARD.EMPLOYEE_ID$, 'X')
StatusCode = ''
Body = HTTP_Services('GetHTTPPostString', True$)
DecodedJSON = HTTP_Services('DecodePercentString', Body)
//Log Entry into API -
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = UserId
LogData<3> = OIWizardId
LogData<4> = 'Getting Wafer counter record. Record Id: ' : WaferCounterId
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
If WaferCounterId NE '' then
WaferCounterJson = Wafer_Counter_Services('ConvertWaferCounterRecToJson', WaferCounterId)
If Error_Services('NoError') then
HTTP_Services('SetResponseBody', WaferCounterJson)
ResponseCode = 200
end else
ErrorMessage = Error_Services('GetMessage')
ResponseCode = 500
end
end else
ErrorMessage = 'Null wafer counter passed to endpoint.'
end
If ErrorMessage EQ '' then
//Log Success
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = UserId
LogData<3> = OIWizardId
LogData<4> = 'Wafer Counter record successfully returned. Wafer Counter Id: ' : WaferCounterId
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end else
//Log Failure
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = UserId
LogData<3> = OIWizardId
LogData<4> = 'Error returning wafer counter record. Wafer Counter Id: ' : WaferCounterId : ' . Error Message: ' : ErrorMessage
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
HTTP_Services('SetResponseStatus', ResponseCode, ErrorMessage)
end api

View File

@ -530,8 +530,8 @@ Service GetWaferCounterJSONTestData(WaferSize, ToolLocation, CassID)
If SRP_JSON(objJson, 'New', 'Object') then
SRP_JSON(objJson, 'SetValue', 'dateTimeFormatted', Datetime(), 'String')
SRP_JSON(objJson, 'SetValue', 'equipmentId', 'WC8INCH1', 'String')
SRP_JSON(objJson, 'SetValue', 'total', 25, 'Number')
SRP_JSON(objJson, 'SetValue', 'slotMap', '1111111111111111111111111', 'String')
SRP_JSON(objJson, 'SetValue', 'total', 24, 'Number')
SRP_JSON(objJson, 'SetValue', 'slotMap', '1111111110111111111111111', 'String')
Response = SRP_Json(objJson, 'Stringify', 'Styled')
SRP_JSON(objJSON, 'Release')
end
@ -744,4 +744,3 @@ return

View File

@ -58,7 +58,7 @@ $Insert PRS_STAGE_EQUATES
$Insert PROD_VER_EQUATES
$Insert QA_MET_EQUATES ;* Used in GetQAMet data structure return variable
Declare function Database_Services, SRP_JSON, Error_Services, obj_Prod_Spec
Declare function Database_Services, SRP_JSON, Error_Services, obj_Prod_Spec, Wo_Mat_Qa_Services
Declare subroutine Database_Services, SRP_JSON, Error_Services
GoToService
@ -419,3 +419,68 @@ Service AllWafersWereTested(WoMatQAKey, StageToInspect)
end service
Service GetQAMetComplete(WOMatKey)
If WOMatKey NE '' then
Response = ''
QAMetRec = Xlate('WO_MAT_QA', WOMatKey, '', 'X')
Stages = QAMetRec<WO_MAT_QA_STAGE$>
Results = QAMetRec<WO_MAT_QA_RESULT$>
StageCount = Count(Stages, @VM)
For I = 1 to StageCount
If Results<1,I> EQ '' then
Response = False$
end
Next I
MUQAComp = Wo_Mat_Qa_Services('GetMUWaferQAComplete', WOMatKey)
If (Response EQ '') AND (MUQAComp EQ True$) then
Response = True$
end
end else
Error_Services('Add', 'Missing WOMatKey parameter.')
end
end service
Service GetMUWaferQAComplete(WOMatKey)
Response = True$
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
MUBoxes = ''
MUBoxesResults = ''
MUWafers = WOMatRec<WO_MAT_SLOT_MOVED_FROM$>
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<WO_MAT_MU_WAFER_THK_RESULT$, OrigIndex>
If MUThkResult NE '' then
MUBoxesResults<BoxIndex, 2> = True$
end
end else
MUBoxNewIndex = DCount(MUBoxesResults, @FM)
MUBoxesResults<MUBoxNewIndex> = MUCassID
MUThkResult = WOMatRec<WO_MAT_MU_WAFER_THK_RESULT$, OrigIndex>
If MUThkResult NE '' then
MUBoxesResults<MUBoxNewIndex, 2> = 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 service