Added new form the adjust wafer quantity on lot

This commit is contained in:
Infineon\Ouellette
2024-11-21 16:47:35 -07:00
committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent 86d51d60ff
commit 953129af6e
3 changed files with 1795 additions and 13 deletions

View File

@ -1081,6 +1081,8 @@ Service ReduceLotWaferCount(LotId, ReductionQty)
ErrorMessage = ''
If RowExists('LOT', LotId) then
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
LotHold = LotRec<LOT_HOLD$>
LotOpen = LotRec<LOT_OPEN$>
LotCurrWfrQty = LotRec<LOT_WAFER_QTY$>
LotNewWfrQty = LotCurrWfrQty - ReductionQty
If LotNewWfrQty LE 25 AND LotNewWfrQty GE 0 then
@ -1109,22 +1111,34 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty)
ErrorMessage = ''
If RowExists('LOT', LotId) then
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
LotCurrWfrQty = LotRec<LOT_WAFER_QTY$>
LotNewWfrQty = LotCurrWfrQty + IncreaseQty
If LotNewWfrQty LE 25 AND LotNewWfrQty GT 0 then
LotRec<LOT_WAFER_QTY$> = LotNewWfrQty
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('HasError') then
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
LotHold = LotRec<LOT_HOLD$>
LotOpen = LotRec<LOT_OPEN$>
if LotOpen then
If Not(LotHold) then
LotCurrWfrQty = LotRec<LOT_WAFER_QTY$>
LotNewWfrQty = LotCurrWfrQty + IncreaseQty
If LotNewWfrQty LE 25 AND LotNewWfrQty GT 0 then
LotRec<LOT_WAFER_QTY$> = LotNewWfrQty
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
If Error_Services('HasError') then
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
end
end else
Begin Case
Case LotNewWfrQty GT 25
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' cannot have a quantity great than 25.'
Case LotNewWfrQty LT 0
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' cannot have a quantity less than 0.'
End Case
end
end else
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' is currently on hold.'
end
end else
Begin Case
Case LotNewWfrQty GT 25
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' cannot have a quantity great than 25.'
Case LotNewWfrQty LT 0
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' cannot have a quantity less than 0.'
End Case
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' is closed.'
end
end else
ErrorMessage = 'Error in Increase Lot Wafer Count service, Lot Id ' : LotId : ' not found in lot table.'
end
@ -1135,3 +1149,4 @@ end service