Merged PR 19340: Test wafer quantity

This commit is contained in:
Mitchem Dakota (CSC FI SPS MESLEO External)
2025-06-23 20:22:02 +02:00
parent 49f6cf505a
commit d570e3cfef
2 changed files with 19 additions and 5 deletions

View File

@ -3,7 +3,7 @@ Compile function NDW_ADJUST_LOT_QTY_EVENTS(CtrlEntId, Event, @PARAMS)
#window NDW_ADJUST_LOT_QTY #window NDW_ADJUST_LOT_QTY
Declare function MemberOf, Database_Services, Error_Services, Datetime Declare function MemberOf, Database_Services, Error_Services, Datetime
Declare subroutine PlaceDialog, Database_Services, Lot_Services, Lot_Event_Services Declare subroutine PlaceDialog, Database_Services, Lot_Services, Lot_Event_Services, Test_Run_Services
$Insert App_Inserts $Insert App_Inserts
$Insert Lot_Equates $Insert Lot_Equates
@ -107,6 +107,7 @@ Event PUB_SEARCH_LOT.CLICK()
end event end event
Event PUB_SUBMIT.CLICK() Event PUB_SUBMIT.CLICK()
LotId = Get_Property(@Window : '.EDL_LOT_NO', 'TEXT') LotId = Get_Property(@Window : '.EDL_LOT_NO', 'TEXT')
NewWfrQty = Get_Property(@Window : '.EDL_NEW_LOT_WFR_QTY', 'TEXT') NewWfrQty = Get_Property(@Window : '.EDL_NEW_LOT_WFR_QTY', 'TEXT')
LotType = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_TYPE$, True$, 0, False$) LotType = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_TYPE$, True$, 0, False$)
@ -129,6 +130,8 @@ Event PUB_SUBMIT.CLICK()
If Error_Services('NoError') then If Error_Services('NoError') then
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Manual Lot Qty decrease performed.', '', @User4, '' , '') Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Manual Lot Qty decrease performed.', '', @User4, '' , '')
end end
PSNNo = Xlate('RDS', LotID, 'PROD_SPEC_ID', 'X')
Test_Run_Services('CreateTestRunRecord', 13, '', '', PSNNo, '', @User4, LotID, NewWfrQty, True$)
Case NewWfrQty GT CurrWfrQty Case NewWfrQty GT CurrWfrQty
AmountToIncrease = NewWfrQty - CurrWfrQty AmountToIncrease = NewWfrQty - CurrWfrQty
Lot_Services('IncreaseLotWaferCount', LotId, AmountToIncrease, @User4) Lot_Services('IncreaseLotWaferCount', LotId, AmountToIncrease, @User4)
@ -137,10 +140,14 @@ Event PUB_SUBMIT.CLICK()
end end
End Case End Case
If Error_Services('NoError') then If Error_Services('NoError') then
Set_Property(@Window : '.EDL_CURR_WFR_QTY', 'TEXT', '')
Set_Property(@Window : '.EDL_NEW_LOT_WFR_QTY', 'TEXT', '')
Set_Property(@Window : '.EDL_LOT_NO', 'TEXT', '')
Set_Property(@Window : '.PUB_SUBMIT', 'ENABLED', False$)
msg(@Window, 'Wafer quantity adjusted successfully!') msg(@Window, 'Wafer quantity adjusted successfully!')
Result = '' Result = ''
Result<1> = True$ Result<1> = True$
End_Dialog(@Window, Result) * End_Dialog(@Window, Result)
end else end else
ErrorMessage = Error_Services('GetMessage') ErrorMessage = Error_Services('GetMessage')
msg(@Window, 'Error Adjusting wafer quantity, ' : ErrorMessage) msg(@Window, 'Error Adjusting wafer quantity, ' : ErrorMessage)
@ -156,6 +163,7 @@ Event PUB_SUBMIT.CLICK()
end else end else
msg(@Window, 'Lot # ' : LotId : ' not found!') msg(@Window, 'Lot # ' : LotId : ' not found!')
end end
end event end event
Event PUB_CANCEL.CLICK() Event PUB_CANCEL.CLICK()
@ -183,3 +191,6 @@ return

View File

@ -331,13 +331,15 @@ Service GetTestWaferLots(ShowOnlyOpenLots)
Response = TestWaferLotKeys Response = TestWaferLotKeys
end service end service
Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLotIds, TWLotQtys) Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLotIds, TWLotQtys, ManualQtyAdjust)
StartTick = GetTickCount() StartTick = GetTickCount()
MetricName = 'CreateTestRunRecord' MetricName = 'CreateTestRunRecord'
TWRunKey = '' TWRunKey = ''
Response = '' Response = ''
ErrorMessage = '' ErrorMessage = ''
If ManualQtyAdjust EQ '' then ManualQtyAdjust = False$
TWTrackingSystemActive = Database_Services('ReadDataColumn', 'APP_INFO', 'NEW_TW_SYSTEM_ACTIVE_SWITCH', 1, True$, 0, False$) TWTrackingSystemActive = Database_Services('ReadDataColumn', 'APP_INFO', 'NEW_TW_SYSTEM_ACTIVE_SWITCH', 1, True$, 0, False$)
//Pre-Checks. //Pre-Checks.
If TWTrackingSystemActive then If TWTrackingSystemActive then
@ -359,7 +361,7 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
end end
end end
If ErrorMessage EQ '' then If ErrorMessage EQ '' then
If RunTypeID NE '' AND EqpType NE '' AND EqpID NE '' AND UserID NE '' then If (RunTypeID NE '' AND UserID NE '' AND EqpType NE '' AND EqpID NE '') OR (RunTypeID NE '' AND UserID NE '' AND ManualQtyAdjust EQ True$) then
RunDTM = SRP_Datetime('Now') RunDTM = SRP_Datetime('Now')
TWRunRec = '' TWRunRec = ''
TWRunRec<TEST_RUN_RUN_DTM$> = RunDTM TWRunRec<TEST_RUN_RUN_DTM$> = RunDTM
@ -512,7 +514,6 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
Response = '' Response = ''
end end
end service end service
Service CreateTestRunWaferRecord(TestRunID, TWPartID, TWUsageTypeID, SourceLotId, Username) Service CreateTestRunWaferRecord(TestRunID, TWPartID, TWUsageTypeID, SourceLotId, Username)
@ -838,3 +839,5 @@ end service