Added new form the adjust wafer quantity on lot
This commit is contained in:
parent
86d51d60ff
commit
953129af6e
1624
LSL2/OIWIN/NDW_ADJUST_LOT_QTY.json
Normal file
1624
LSL2/OIWIN/NDW_ADJUST_LOT_QTY.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -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,8 +1111,13 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty)
|
||||
ErrorMessage = ''
|
||||
If RowExists('LOT', LotId) then
|
||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||
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$)
|
||||
@ -1125,6 +1132,13 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty)
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
143
LSL2/STPROC/NDW_ADJUST_LOT_QTY_EVENTS.txt
Normal file
143
LSL2/STPROC/NDW_ADJUST_LOT_QTY_EVENTS.txt
Normal file
@ -0,0 +1,143 @@
|
||||
Compile function NDW_ADJUST_LOT_QTY_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_ADJUST_LOT_QTY
|
||||
|
||||
Declare function MemberOf, Database_Services, Error_Services, Datetime
|
||||
Declare subroutine PlaceDialog, Database_Services, Lot_Services
|
||||
$Insert App_Inserts
|
||||
$Insert Lot_Equates
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
debug
|
||||
PermissionAllowed = False$
|
||||
Begin Case
|
||||
Case MemberOf(@User4, 'ENGINEERING')
|
||||
PermissionAllowed = True$
|
||||
Case MemberOf(@User4, 'LEAD')
|
||||
PermissionAllowed = True$
|
||||
Case MemberOf(@User4, 'SUPERVISOR')
|
||||
PermissionAllowed = True$
|
||||
Case MemberOf(@User4, 'OI_ADMIN')
|
||||
PermissionsAllowed = True$
|
||||
Case Otherwise$
|
||||
PermissionAllowed = False$
|
||||
End Case
|
||||
|
||||
If PermissionAllowed then
|
||||
PlaceDialog(-2, -2)
|
||||
Set_Property(@Window, 'VISIBLE', 1)
|
||||
LotNo = CreateParam
|
||||
If LotNo NE '' then
|
||||
GoSub GetLotCurrData
|
||||
end else
|
||||
Set_Property(@Window : '.PUB_SEARCH_LOT', 'VISIBLE', True$)
|
||||
end
|
||||
end else
|
||||
Result = ''
|
||||
Result<1> = False$
|
||||
End_Dialog(@Window, Result)
|
||||
end
|
||||
|
||||
|
||||
End Event
|
||||
|
||||
Event Window.CLOSE(CancelFlag, CloseFlags)
|
||||
Result = ''
|
||||
Result<1> = False$
|
||||
End_Dialog(@Window, Result)
|
||||
end event
|
||||
|
||||
Event EDL_NEW_LOT_WFR_QTY.CHANGED(NewLotQty)
|
||||
NewLotQty = Get_Property(@Window : '.EDL_NEW_LOT_WFR_QTY', 'TEXT')
|
||||
If Num(NewLotQty) then
|
||||
If NewLotQty LE 25 AND NewLotQty GE 0 then
|
||||
Set_Property(@Window : '.PUB_SUBMIT', 'ENABLED', True$)
|
||||
end else
|
||||
msg(@Window, 'New wafer quantity value must be a number between 0 and 25.')
|
||||
end
|
||||
end else
|
||||
If NewLotQty NE '' then
|
||||
msg(@Window, 'New wafer quantity value must be a number between 0 and 25.')
|
||||
end
|
||||
end
|
||||
end event
|
||||
|
||||
Event EDL_LOT_NO.CHANGED(LotNo)
|
||||
LotIdString = Get_Property(@Window : '.EDL_LOT_NO', 'TEXT')
|
||||
Begin Case
|
||||
Case LotIdString[1, 4] EQ '1TTW'
|
||||
Set_Property(@Window : '.EDL_LOT_NO', 'TEXT', LotIdString[3, 999])
|
||||
Case LotIdString[1, 2] EQ '1T'
|
||||
Set_Property(@Window : '.EDL_LOT_NO', 'TEXT', LotIdString[3, 999])
|
||||
End Case
|
||||
end event
|
||||
|
||||
Event PUB_SEARCH_LOT.CLICK()
|
||||
LotNo = Get_Property(@Window : '.EDL_LOT_NO', 'TEXT')
|
||||
If LotNo NE '' then
|
||||
GoSub GetLotCurrData
|
||||
end
|
||||
end event
|
||||
|
||||
Event PUB_SUBMIT.CLICK()
|
||||
debug
|
||||
LotId = Get_Property(@Window : '.EDL_LOT_NO', 'TEXT')
|
||||
NewWfrQty = Get_Property(@Window : '.EDL_NEW_LOT_WFR_QTY', 'TEXT')
|
||||
LotType = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_TYPE$, True$, 0, False$)
|
||||
CurrWfrQty = Database_Services('ReadDataColumn', 'LOT', LotId, LOT_WAFER_QTY$, True$, 0, False$)
|
||||
AmountToDecrease = 0
|
||||
AmountToIncrease = 0
|
||||
If NewWfrQty NE CurrWfrQty then
|
||||
Begin Case
|
||||
Case NewWfrQty LT CurrWfrQty
|
||||
AmountToDecrease = CurrWfrQty - NewWfrQty
|
||||
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'REDUCE_WAFER_QTY', 'Adjust wafer count by ' : AmountToDecrease, '', AmountToDecrease, 0, '', @User4)
|
||||
Case NewWfrQty GT CurrWfrQty
|
||||
AmountToIncrease = NewWfrQty - CurrWfrQty
|
||||
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'BONUS_WAFER_QTY', 'Adjust wafer count by ' : AmountToIncrease, '', 0, AmountToIncrease, '', @User4)
|
||||
End Case
|
||||
If Error_Services('NoError') then
|
||||
msg(@Window, 'Wafer quantity adjusted successfully!')
|
||||
Result = ''
|
||||
Result<1> = True$
|
||||
End_Dialog(@Window, Result)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
msg(@Window, 'Error Adjusting wafer quantity, ' : ErrorMessage)
|
||||
end
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
Result = ''
|
||||
Result<1> = False$
|
||||
End_Dialog(@Window, Result)
|
||||
end event
|
||||
|
||||
GetLotCurrData:
|
||||
If RowExists('LOT', LotNo) then
|
||||
Set_Property(@Window : '.EDL_LOT_NO', 'TEXT', LotNo)
|
||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotNo, True$, 0, False$)
|
||||
If LotRec NE '' then
|
||||
LotCurrWfrQty = LotRec<LOT_WAFER_QTY$>
|
||||
Set_Property(@Window : '.EDL_CURR_WFR_QTY', 'TEXT', LotCurrWfrQty)
|
||||
end else
|
||||
msg(@Window, 'Error reading lot number ' : LotNo : '!')
|
||||
end
|
||||
end else
|
||||
msg(@Window, 'Lot number ' : LotNo : ' not found!')
|
||||
end
|
||||
return
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user