Merged PR 15668: Refactored Lot Event

Refactored Lot Event methods.
1. Moved all lot event methods to a new LOT_EVENT_SERVICES service module.
2. Simplified CreateLotEvent routine
3. Updated all calling stored procedures.
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-04-28 21:02:24 +02:00
parent b2edf6f288
commit 4037b2fa45
13 changed files with 260 additions and 446 deletions

View File

@ -388,7 +388,7 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
Case ThisLotCurrOperation EQ 'TW_IN_USE'
If Not(LotMovedIn) then
Lot_Services('CreateLotEvent', TWLotId, 'TW', Datetime(), 'MOVE_IN', 'Move into TW_IN_USE', '', 0, 0, '', UserID)
Lot_Services('MoveInLot', TWLotId, UserId)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
@ -399,9 +399,9 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
Case ThisLotCurrOperation EQ 'TW_READY_TO_USE'
If Not(LotMovedIn) then
Lot_Services('CreateLotEvent', TWLotId, 'TW', Datetime(), 'MOVE_IN', 'Move into TW_READY_TO_USE', '', 0, 0, '', UserID)
Lot_Services('MoveInLot', TWLotId, UserId)
end else
Lot_Services('CreateLotEvent', TWLotId, 'TW', Datetime(), 'MOVE_OUT', 'Move out of TW_READY_TO_USE', '', 0, 0, '', UserID)
Lot_Services('MoveOutLot', TWLotId, UserId)
end
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
@ -427,7 +427,7 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
until ErrorMessage NE ''
Next i
If ErrorMessage EQ '' then
Lot_Services('CreateLotEvent', TWLotId, 'TW', Datetime(), 'REDUCE_WAFER_QTY', ThisUsageQty : ' wafers consumed from lot.', EqpID, ThisUsageQty, 0, '', UserID)
Lot_Services('ReduceLotWaferCount', TWLotId, ThisUsageQty, UserID)
end
end else
ErrorMessage = 'Error in Create Test Run Record routine, ' : TWLotId : ' does not have enough wafers.'
@ -542,7 +542,7 @@ end service
Service UseTWFromLot(LotId, UsageQty, Username)
ErrorMessage = ''
If RowExists('LOT', LotId) then
Lot_Services('CreateLotEvent', LotId, 'TW', Datetime(), 'REDUCE_WAFER_QTY', 'Consumed test wafer.', '', UsageQty, 0, '', Username)
Lot_Services('ReduceLotWaferCount', LotId, UsageQty, Username)
end else
ErrorMessage = 'Error logging wafer consumption from Lot # ' : LotId : '. Lot does not exist in LOT table.'
end
@ -798,3 +798,4 @@ end service