First final commit
This commit is contained in:
committed by
Ouellette Jonathan (CSC FI SPS MESLEO)
parent
f143b3e60c
commit
e4cca79a08
@ -28,7 +28,7 @@ LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' L
|
||||
Headers = 'Logging DTM' : @FM : 'Lot Id' : @FM : 'Event Type' : @FM : 'Operator' : @FM : 'Begin Wafer Qty' : @FM : 'End Wafer Qty' : @FM : 'Bonus Wafer Qty' : @FM : 'Reduce Wafer Qty' : @FM : 'Message'
|
||||
objLotEventLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
|
||||
Options EVENT_TYPES = 'MOVE_IN', 'MOVE_OUT', 'HOLD_ON', 'HOLD_OFF', 'REDUCE_WAFER_QTY', 'BONUS_WAFER_QTY', 'COMMENT', 'LOCATION', 'LOAD', 'UNSIGN_LOAD', 'TW_USE'
|
||||
Options EVENT_TYPES = 'MOVE_IN', 'MOVE_OUT', 'HOLD_ON', 'HOLD_OFF', 'REDUCE_WAFER_QTY', 'BONUS_WAFER_QTY', 'COMMENT', 'LOCATION', 'LOAD', 'UNSIGN_LOAD', 'TW_USE', 'CLOSE'
|
||||
Options LOT_TYPES = 'TW', 'RDS', 'WM_OUT', 'WM_IN'
|
||||
|
||||
GoToService
|
||||
@ -47,7 +47,6 @@ Service GenerateNewLotId(LotType)
|
||||
GeneratedLotID = ''
|
||||
Begin Case
|
||||
Case LotType EQ 'TW'
|
||||
|
||||
Loop
|
||||
Until ValidLotNum EQ True$
|
||||
LotPrefix = 'TW'
|
||||
@ -80,8 +79,6 @@ end service
|
||||
|
||||
|
||||
Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, VendorCode, Username, PrinterID, LotId)
|
||||
; //649491 , 03M6241, 814474, SP
|
||||
debug
|
||||
CreatedLotNumber = ''
|
||||
ErrorMessage = ''
|
||||
Begin Case
|
||||
@ -138,11 +135,10 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
||||
//Get Curr Operation(Should be first one in sequence)
|
||||
ThisLotCurrOpId = Lot_Services('GetLotCurrOperationId', CreatedLotNumber)
|
||||
If ThisLotCurrOpId NE '' then
|
||||
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'MOVE_IN', 'Move Lot in.', '', 0, 0, ThisLotCurrOpId, Username)
|
||||
//Lot_Services('MoveInLot', NewLotId, Username)
|
||||
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'MOVE_IN', 'Move Lot in.', '', 0, 0, ThisLotCurrOpId, Username)
|
||||
if Error_Services('NoError') then
|
||||
//Set lot to open
|
||||
Lot_Services('OpenLot', CreatedLotNumber)
|
||||
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'OPEN', 'Setting lot to open.', '', 0, 0, '', Username)
|
||||
if Error_Services('NoError') then
|
||||
If PrinterID NE 'WEB' then
|
||||
//If PrinterID is set to WEB this means the request comes from OI_Wizard and the client is going to handle printing.
|
||||
@ -166,12 +162,19 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
//Close LOT record as there was an error
|
||||
Lot_Services('CreateLotEvent', NewLotId, 'TW', Datetime(), 'CLOSE', 'Error occured while created lot. Automatically setting to close', '', 0, 0, '', 'SYSTEM')
|
||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
||||
end
|
||||
end else
|
||||
//Close LOT record as there was an error
|
||||
Lot_Services('CreateLotEvent', NewLotId, 'TW', Datetime(), 'CLOSE', 'Error occured while created lot. Automatically setting to close', '', 0, 0, '', 'SYSTEM')
|
||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, error getting current operation for lot: ' : NewLotId
|
||||
end
|
||||
end else
|
||||
//Close LOT record as there was an error
|
||||
//Database_Services('DeleteDataRow', 'LOT', NewLotId, True$, False$)
|
||||
Lot_Services('CreateLotEvent', NewLotId, 'TW', Datetime(), 'CLOSE', 'Error occured while created lot. Automatically setting to close', '', 0, 0, '', 'SYSTEM')
|
||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
@ -208,13 +211,13 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
||||
LogData<4> = 'Successfully created lot id ' : CreatedLotNumber : ' of product type ' : ProdName '.'
|
||||
Logging_Services('AppendLog', objTWCreationLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
Error_Services('Add', ErrorMessage)
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = ProdName
|
||||
LogData<3> = Username
|
||||
LogData<4> = ErrorMessage
|
||||
Logging_Services('AppendLog', objTWCreationLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
Response = CreatedLotNumber
|
||||
|
||||
@ -565,7 +568,6 @@ Service IsLotMovedIn(LotId)
|
||||
end service
|
||||
|
||||
Service MoveInLot(LotID, Operator)
|
||||
debug
|
||||
ErrorMessage = ''
|
||||
ThisLotCurrOperationID = ''
|
||||
If LotId NE '' then
|
||||
@ -584,7 +586,6 @@ Service MoveInLot(LotID, Operator)
|
||||
If Error_Services('NoError') then
|
||||
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
|
||||
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
||||
//Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'MOVE_IN', '', '', 0, 0, CurrOperation, Operator)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
|
||||
end
|
||||
@ -632,7 +633,6 @@ Service MoveOutLot(LotID, Operator)
|
||||
If Error_Services('NoError') then
|
||||
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
|
||||
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
||||
//Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'MOVE_OUT', '', '', ReduceQty, BonusQty, CurrOperation, Operator)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
|
||||
end
|
||||
@ -745,7 +745,15 @@ Service CreateLotEvent(LotId, LotType=LOT_TYPES, EventDatetime, EventType=EVENT_
|
||||
Case EventType EQ 'LOCATION'
|
||||
//Do nothing for now.
|
||||
Case EventType EQ 'CLOSE'
|
||||
//Do nothing for now.
|
||||
Lot_Services('CloseLot', LotId)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = 'Error in Create Lot Event routine, ' : Error_Services('GetMessage')
|
||||
end
|
||||
Case EventType EQ 'OPEN'
|
||||
Lot_Services('OpenLot', LotId)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMessage = 'Error in Create Lot Event routine, ' : Error_Services('GetMessage')
|
||||
end
|
||||
Case Otherwise$
|
||||
ErrorMessage = 'Error in Create Lot Event routine, event type of ' : EventType : ' passed to routine is not valid for a lot of type TW.'
|
||||
End Case
|
||||
|
Reference in New Issue
Block a user