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:
parent
b2edf6f288
commit
4037b2fa45
@ -58,7 +58,7 @@ $INSERT NOTIFICATION_EQU
|
|||||||
Declare function Database_Services, Error_Services, Obj_Wm_In, Obj_Wm_Out, Unassigned, Wm_In_Services, Wm_Out_Services
|
Declare function Database_Services, Error_Services, Obj_Wm_In, Obj_Wm_Out, Unassigned, Wm_In_Services, Wm_Out_Services
|
||||||
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Hold_Services, Memberof, Error_Services, Rds_Services
|
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Hold_Services, Memberof, Error_Services, Rds_Services
|
||||||
Declare subroutine Database_Services, Error_Services, Obj_notes, Hold_Services, Obj_Wm_In, Obj_Wm_Out, Wm_In_Services
|
Declare subroutine Database_Services, Error_Services, Obj_notes, Hold_Services, Obj_Wm_In, Obj_Wm_Out, Wm_In_Services
|
||||||
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Services
|
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Event_Services
|
||||||
|
|
||||||
GoToService else
|
GoToService else
|
||||||
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
|
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
|
||||||
@ -371,18 +371,18 @@ Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorI
|
|||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = Field(WOMatKey, '*', 2)
|
CassNo = Field(WOMatKey, '*', 2)
|
||||||
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
|
Lot_Event_Services('CreateLotEvent', WMInKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WM_IN')
|
||||||
Case HoldEntity EQ 'WM_OUT'
|
Case HoldEntity EQ 'WM_OUT'
|
||||||
WONo = Field(WOMatKey, '*', 1)
|
WONo = Field(WOMatKey, '*', 1)
|
||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = Field(WOMatKey, '*', 2)
|
CassNo = Field(WOMatKey, '*', 2)
|
||||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
|
Lot_Event_Services('CreateLotEvent', WMOutKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WM_OUT')
|
||||||
Case HoldEntity EQ 'RDS'
|
Case HoldEntity EQ 'RDS'
|
||||||
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
||||||
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
|
Lot_Event_Services('CreateLotEvent', RDSNo, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'RDS')
|
||||||
Case HoldEntity EQ 'WO_MAT'
|
Case HoldEntity EQ 'WO_MAT'
|
||||||
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
|
Lot_Event_Services('CreateLotEvent', WOMatKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WO_MAT')
|
||||||
End Case
|
End Case
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
@ -507,18 +507,18 @@ Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, Operator
|
|||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = Field(WOMatKey, '*', 2)
|
CassNo = Field(WOMatKey, '*', 2)
|
||||||
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMInKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WM_IN')
|
||||||
Case HoldEntity EQ 'WM_OUT'
|
Case HoldEntity EQ 'WM_OUT'
|
||||||
WONo = Field(WOMatKey, '*', 1)
|
WONo = Field(WOMatKey, '*', 1)
|
||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = Field(WOMatKey, '*', 2)
|
CassNo = Field(WOMatKey, '*', 2)
|
||||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMOutKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WM_OUT')
|
||||||
Case HoldEntity EQ 'RDS'
|
Case HoldEntity EQ 'RDS'
|
||||||
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
||||||
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
|
Lot_Event_Services('CreateLotEvent', RDSNo, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'RDS')
|
||||||
Case HoldEntity EQ 'WO_MAT'
|
Case HoldEntity EQ 'WO_MAT'
|
||||||
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
|
Lot_Event_Services('CreateLotEvent', WOMatKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WO_MAT')
|
||||||
End Case
|
End Case
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
@ -815,3 +815,4 @@ Service CreateComment(HoldEntity, HoldEntityID, Reason, Transition, HoldType, Op
|
|||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ Compile function Labeling_Services(@Service, @Params)
|
|||||||
|
|
||||||
Declare Function Database_Services, Environment_Services, Set_Printer, Direct_Print, Printer_Select, Error_Services
|
Declare Function Database_Services, Environment_Services, Set_Printer, Direct_Print, Printer_Select, Error_Services
|
||||||
Declare Function Logging_Services, Datetime
|
Declare Function Logging_Services, Datetime
|
||||||
Declare subroutine Error_Services, Labeling_Services, Lot_Services, SRP_Set_Clipboard
|
Declare subroutine Error_Services, Labeling_Services, Lot_Event_Services, SRP_Set_Clipboard
|
||||||
|
|
||||||
$insert LOGICAL
|
$insert LOGICAL
|
||||||
$Insert LOT_EQUATES
|
$Insert LOT_EQUATES
|
||||||
@ -330,7 +330,7 @@ Service PrintTestWaferLotLabel(LotId, Username, PrinterId)
|
|||||||
ErrorMessage = 'Error printing label for lot ' : LotId : '. LotId was null or did not exist in database.'
|
ErrorMessage = 'Error printing label for lot ' : LotId : '. LotId was null or did not exist in database.'
|
||||||
end
|
end
|
||||||
If ErrorMessage EQ '' then
|
If ErrorMessage EQ '' then
|
||||||
Lot_Services('CreateLotEvent', LotId, 'TW', Datetime(), 'COMMENT', 'Lot Labels Printed', '', 0, 0, '', Username)
|
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'COMMENT', 'Lot Labels Printed', '', Username)
|
||||||
end else
|
end else
|
||||||
Error_Services('Add', ErrorMessage)
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
@ -461,3 +461,4 @@ Service GetReturnToFabLabelZPL(RTFId)
|
|||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
172
LSL2/STPROC/LOT_EVENT_SERVICES.txt
Normal file
172
LSL2/STPROC/LOT_EVENT_SERVICES.txt
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
Compile function Lot_Event_Services(@Service, @Params)
|
||||||
|
#pragma precomp SRP_PreCompiler
|
||||||
|
|
||||||
|
Declare function Error_Services, Logging_Services, Environment_Services, Database_Services, RTI_CreateGUID, Lot_Services
|
||||||
|
Declare function Lot_Event_Services
|
||||||
|
|
||||||
|
Declare subroutine Error_Services, Logging_Services, Database_Services, Lot_Services, Service_Services
|
||||||
|
|
||||||
|
$insert LOGICAL
|
||||||
|
$Insert LOT_EVENT_EQUATES
|
||||||
|
$Insert LOT_EQUATES
|
||||||
|
$Insert LOT_OPERATION_EQUATES
|
||||||
|
|
||||||
|
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', 'WO_MAT', 'LOT'
|
||||||
|
Options LEGACY_LOT_TYPES = 'RDS', 'WM_OUT', 'WM_IN'
|
||||||
|
Options BOOLEAN = 'True', 'False'
|
||||||
|
|
||||||
|
GoToService
|
||||||
|
|
||||||
|
Return Response or ""
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// SERVICES
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Service CreateLotEvent(LotId, EventDateTime, EventType=EVENT_TYPES, EventNote, EventEquipmentId, OperatorId, IsLegacyLotId=BOOLEAN, LegacyLotType=LEGACY_LOT_TYPES)
|
||||||
|
|
||||||
|
GoSub InitEventLog
|
||||||
|
ErrorMessage = ''
|
||||||
|
//Handle Legacy Lots
|
||||||
|
If IsLegacyLotId then
|
||||||
|
If LegacyLotType NE '' then
|
||||||
|
LegacyLotId = LotId
|
||||||
|
LotId = Lot_Services('GetLotIdByLegacyLotIdAndType', LotId, LegacyLotType)
|
||||||
|
If LotID EQ '' then
|
||||||
|
LotId = Lot_Services('CreateNewLot', LegacyLotType, '', '', '', '', '', OperatorId, '', LegacyLotId)
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
LotId = ''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
If RowExists('LOT', LotId) then
|
||||||
|
NewEventId = RTI_CreateGUID()
|
||||||
|
If NewEventId NE '' then
|
||||||
|
NewEventSequence = Lot_Event_Services('GetLotEventNextSequence', LotId)
|
||||||
|
If Error_Services('NoError') then
|
||||||
|
NewEventRec = ''
|
||||||
|
NewEventRec<LOT_EVENT_LOT_ID$> = LotId
|
||||||
|
NewEventRec<LOT_EVENT_LOT_EVENT_TYPE$> = EventType
|
||||||
|
NewEventRec<LOT_EVENT_EVENT_DATETIME$> = EventDatetime
|
||||||
|
NewEventRec<LOT_EVENT_EVENT_NOTE$> = EventNote
|
||||||
|
NewEventRec<LOT_EVENT_EQUIPMENT_ID$> = EventEquipmentId
|
||||||
|
NewEventRec<LOT_EVENT_EVENT_OPERATOR_ID$> = OperatorId
|
||||||
|
NewEventRec<LOT_EVENT_SEQUENCE$> = NewEventSequence
|
||||||
|
Database_Services('WriteDataRow', 'LOT_EVENT', NewEventId, NewEventRec)
|
||||||
|
If Error_Services('NoError') then
|
||||||
|
Service_Services('PostProcedure', 'LOT_EVENT_SERVICES', 'SetLatestLotEvent':@VM:LotId:@VM:NewEventId, True$)
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Error creating new event : ' : Error_Services('GetMessage')
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMessage = Error_Services('GetMessage')
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Error creating an event Id.'
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Error in Create Lot Event routine, Lot id was not found.'
|
||||||
|
end
|
||||||
|
If ErrorMessage EQ '' then
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDTM
|
||||||
|
LogData<2> = LotId
|
||||||
|
LogData<3> = EventType
|
||||||
|
LogData<4> = OperatorId
|
||||||
|
LogData<9> = 'Successfully logged event.'
|
||||||
|
Logging_Services('AppendLog', objLotEventLog, LogData, @RM, @FM, False$)
|
||||||
|
end else
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDTM
|
||||||
|
LogData<2> = LotId
|
||||||
|
LogData<3> = EventType
|
||||||
|
LogData<4> = OperatorId
|
||||||
|
LogData<9> = ErrorMessage
|
||||||
|
Logging_Services('AppendLog', objLotEventLog, LogData, @RM, @FM, False$)
|
||||||
|
Error_Services('Add', ErrorMessage)
|
||||||
|
end
|
||||||
|
|
||||||
|
end service
|
||||||
|
|
||||||
|
Service GetLotEventNextSequence(LotId)
|
||||||
|
|
||||||
|
ErrorMessage = ''
|
||||||
|
NextSequence = 1
|
||||||
|
If LotID NE '' then
|
||||||
|
If RowExists('LOT', LotId) then
|
||||||
|
LotEvents = XLATE('LOT', LotId, LOT_LOT_EVENTS$, 'X')
|
||||||
|
for each LotEvent in LotEvents using @VM
|
||||||
|
ThisEventSequence = XLATE('LOT_EVENT', LotEvent, LOT_EVENT_SEQUENCE$, 'X')
|
||||||
|
If ThisEventSequence GE NextSequence then NextSequence = ThisEventSequence + 1
|
||||||
|
Next LotEvent
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Unable to get lot event sequence: Lot ID not found.'
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Unable to get lot event sequence: Lot ID was null.'
|
||||||
|
end
|
||||||
|
If ErrorMessage EQ '' then
|
||||||
|
Response = NextSequence
|
||||||
|
end else
|
||||||
|
Error_Services('Add', ErrorMessage)
|
||||||
|
end
|
||||||
|
end service
|
||||||
|
|
||||||
|
//Returns a @FM delimited list of events in sequence
|
||||||
|
Service GetLotEventsInSequence(LotId)
|
||||||
|
LotEventsUnsorted = ''
|
||||||
|
LotEventsSorted = ''
|
||||||
|
LotEventsToReturn = ''
|
||||||
|
If LotID NE '' then
|
||||||
|
//Get Operations
|
||||||
|
LotEvents = Xlate('LOT', LotId, LOT_LOT_EVENTS$, 'X')
|
||||||
|
for each LotEvent in LotEvents using @VM
|
||||||
|
ThisEventSequence = XLATE('LOT_EVENT', LotEvent, LOT_EVENT_SEQUENCE$, 'X')
|
||||||
|
LotEventsToReturn<ThisEventSequence> = LotEvent
|
||||||
|
Next LotOperation
|
||||||
|
end else
|
||||||
|
//error: lot id was null
|
||||||
|
end
|
||||||
|
Response = LotEventsToReturn
|
||||||
|
end service
|
||||||
|
|
||||||
|
Service SetLatestLotEvent(LotId, LotEventId)
|
||||||
|
|
||||||
|
ErrorMessage = ''
|
||||||
|
If RowExists('LOT', LotId) then
|
||||||
|
If RowExists('LOT_EVENT', LotEventId) then
|
||||||
|
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||||
|
LotRec<LOT_MOST_RECENT_LOT_EVENT_ID$> = LotEventId
|
||||||
|
Database_Services('WriteDataRow', 'LOT', LotId, LotRec)
|
||||||
|
If Error_Services('HasError') then
|
||||||
|
ErrorMessage = Error_Services('GetMessage')
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Lot event ' : LotEventId : ' for lot ' : LotId : ' not found in LOT_EVENT table'
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Lot Id ' : LotId : ' not found in LOT table.'
|
||||||
|
end
|
||||||
|
If ErrorMessage NE '' then
|
||||||
|
Error_Services('Add', ErrorMessage)
|
||||||
|
end
|
||||||
|
end service
|
||||||
|
|
||||||
|
/* * * * * * * * * *
|
||||||
|
* INTERNAL GOSUBS
|
||||||
|
* * * * * * * * * */
|
||||||
|
|
||||||
|
InitEventLog:
|
||||||
|
|
||||||
|
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Lot'
|
||||||
|
LogDate = Oconv(Date(), 'D4/')
|
||||||
|
LogTime = Oconv(Time(), 'MTS')
|
||||||
|
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||||
|
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' LotEvent.csv'
|
||||||
|
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$)
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
|
|
@ -2,9 +2,9 @@ Compile function Lot_Services(@Service, @Params)
|
|||||||
#pragma precomp SRP_PreCompiler
|
#pragma precomp SRP_PreCompiler
|
||||||
|
|
||||||
Declare function TEST_WAFER_PROD_SERVICES, SRP_Datetime, Datetime, Database_Services, Lot_Services, Error_Services, RTI_CREATEGUID
|
Declare function TEST_WAFER_PROD_SERVICES, SRP_Datetime, Datetime, Database_Services, Lot_Services, Error_Services, RTI_CREATEGUID
|
||||||
Declare function SRP_Array, SRP_Json, Environment_Services, Logging_Services, MemberOf
|
Declare function SRP_Array, SRP_Json, Environment_Services, Logging_Services, MemberOf, Lot_Event_Services
|
||||||
Declare subroutine Database_Services, Btree.Extract, Lot_Services, Error_Services, Labeling_Services, SRP_Json, Logging_Services
|
Declare subroutine Database_Services, Btree.Extract, Lot_Services, Error_Services, Labeling_Services, SRP_Json, Logging_Services
|
||||||
Declare subroutine SRP_Run_Command, Service_Services, obj_notes
|
Declare subroutine SRP_Run_Command, Service_Services, obj_notes, Lot_Event_Services
|
||||||
$insert APP_INSERTS
|
$insert APP_INSERTS
|
||||||
$Insert LOT_EQUATES
|
$Insert LOT_EQUATES
|
||||||
$Insert TEST_WAFER_PROD_EQUATES
|
$Insert TEST_WAFER_PROD_EQUATES
|
||||||
@ -194,10 +194,11 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
|||||||
//Get Curr Operation(Should be first one in sequence)
|
//Get Curr Operation(Should be first one in sequence)
|
||||||
ThisLotCurrOpId = Lot_Services('GetLotCurrOperationId', CreatedLotNumber)
|
ThisLotCurrOpId = Lot_Services('GetLotCurrOperationId', CreatedLotNumber)
|
||||||
If ThisLotCurrOpId NE '' then
|
If ThisLotCurrOpId NE '' then
|
||||||
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'MOVE_IN', 'Move Lot in.', '', 0, 0, ThisLotCurrOpId, Username)
|
//Set lot to open
|
||||||
if Error_Services('NoError') then
|
Lot_Services('OpenLot', CreatedLotNumber)
|
||||||
//Set lot to open
|
if Error_Services('NoError') then
|
||||||
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'OPEN', 'Setting lot to open.', '', 0, 0, '', Username)
|
//Move lot in
|
||||||
|
Lot_Services('MoveInLot', CreatedLotNumber, Username)
|
||||||
if Error_Services('NoError') then
|
if Error_Services('NoError') then
|
||||||
If PrinterID NE 'WEB' 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.
|
//If PrinterID is set to WEB this means the request comes from OI_Wizard and the client is going to handle printing.
|
||||||
@ -206,11 +207,9 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
|||||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : CreatedLotNumber : ' , ' : Error_Services('GetMessage')
|
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : CreatedLotNumber : ' , ' : Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'MOVE_OUT', 'Move Lot out.', '', 0, 0, '', Username)
|
Lot_Services('MoveOutLot', NewLotId, Username)
|
||||||
//Lot_Services('MoveOutLot', NewLotId, Username)
|
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
//Lot_Services('MoveInLot', NewLotId, Username)
|
Lot_Services('MoveInLot', NewLotId, Username)
|
||||||
Lot_Services('CreateLotEvent', CreatedLotNumber, 'TW', Datetime(), 'MOVE_IN', 'Move in out.', '', 0, 0, '', Username)
|
|
||||||
If Error_Services('HasError') then
|
If Error_Services('HasError') then
|
||||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
@ -222,18 +221,18 @@ Service CreateNewLot(LotType, ProdName, LotQty, VendorPartNo, VendorLotNo, Vendo
|
|||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
//Close LOT record as there was an error
|
//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')
|
Lot_Services('CloseLot', NewLotId)
|
||||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
//Close LOT record as there was an error
|
//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')
|
Lot_Services('CloseLot', NewLotId)
|
||||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, error getting current operation for lot: ' : NewLotId
|
ErrorMessage = 'Error in Create New Test Wafer Lot Process, error getting current operation for lot: ' : NewLotId
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
//Close LOT record as there was an error
|
//Close LOT record as there was an error
|
||||||
//Database_Services('DeleteDataRow', 'LOT', NewLotId, True$, False$)
|
//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')
|
Lot_Services('CloseLot', NewLotId)
|
||||||
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
ErrorMessage = 'Error in Create New Test Wafer Lot Process, lot id: ' : NewLotId : ' , ' : Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -499,25 +498,6 @@ Service GetLotOperationSequence(LotId)
|
|||||||
Response = LotOperationsInSequence
|
Response = LotOperationsInSequence
|
||||||
end service
|
end service
|
||||||
|
|
||||||
//Returns a @FM delimited list of events in sequence
|
|
||||||
Service GetLotEventsInSequence(LotId)
|
|
||||||
|
|
||||||
LotEventsUnsorted = ''
|
|
||||||
LotEventsSorted = ''
|
|
||||||
LotEventsToReturn = ''
|
|
||||||
If LotID NE '' then
|
|
||||||
//Get Operations
|
|
||||||
LotEvents = Xlate('LOT', LotId, LOT_LOT_EVENTS$, 'X')
|
|
||||||
for each LotEvent in LotEvents using @VM
|
|
||||||
ThisEventSequence = XLATE('LOT_EVENT', LotEvent, LOT_EVENT_SEQUENCE$, 'X')
|
|
||||||
LotEventsToReturn<ThisEventSequence> = LotEvent
|
|
||||||
Next LotOperation
|
|
||||||
end else
|
|
||||||
//error: lot id was null
|
|
||||||
end
|
|
||||||
Response = LotEventsToReturn
|
|
||||||
end service
|
|
||||||
|
|
||||||
Service GetLotCurrOperationId(LotId)
|
Service GetLotCurrOperationId(LotId)
|
||||||
CurrOperation = ''
|
CurrOperation = ''
|
||||||
If LotID NE '' then
|
If LotID NE '' then
|
||||||
@ -639,6 +619,7 @@ Service IsOperationCompleted(LotOperationId)
|
|||||||
end service
|
end service
|
||||||
|
|
||||||
Service MoveInLot(LotID, Operator)
|
Service MoveInLot(LotID, Operator)
|
||||||
|
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
ThisLotCurrOperationID = ''
|
ThisLotCurrOperationID = ''
|
||||||
If LotId NE '' then
|
If LotId NE '' then
|
||||||
@ -657,7 +638,9 @@ Service MoveInLot(LotID, Operator)
|
|||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
|
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
|
||||||
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
||||||
If Error_Services('HasError') then
|
If Error_Services('NoError') then
|
||||||
|
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_IN', 'Lot moved into operation ' : CurrOperation : '.', '', Operator)
|
||||||
|
end else
|
||||||
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
|
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
@ -705,8 +688,10 @@ Service MoveOutLot(LotID, Operator)
|
|||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
|
LotType = XLATE('LOT', LotId, LOT_TYPE$, 'X')
|
||||||
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
CurrOperation = XLATE('LOT_OPERATION', ThisLotCurrOperationID, LOT_OPERATION_OPERATION_ID$, 'X')
|
||||||
If Error_Services('HasError') then
|
If Error_Services('NoError') then
|
||||||
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
|
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'MOVE_OUT', 'Lot moved out of operation ' : CurrOperation : '.', '', Operator)
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Error in Move In process for Lot id ' : LotId : '. ' : Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in Move Out process for Lot id ' : LotId : '. Error writing to lot operation record. ' : Error_Services('GetMessage')
|
ErrorMessage = 'Error in Move Out process for Lot id ' : LotId : '. Error writing to lot operation record. ' : Error_Services('GetMessage')
|
||||||
@ -746,262 +731,6 @@ Service MoveOutLot(LotID, Operator)
|
|||||||
end
|
end
|
||||||
end service
|
end service
|
||||||
|
|
||||||
Service CreateLotEvent(LotId, LotType=LOT_TYPES, EventDatetime, EventType=EVENT_TYPES, EventNote, EventEquipmentId, ReduceWaferQty, BonusWaferQty, OperationId, OperatorId)
|
|
||||||
ErrorMessage = ''
|
|
||||||
BeginWaferQty = 0
|
|
||||||
EndWaferQty = 0
|
|
||||||
WaferQtyChange = 0
|
|
||||||
If LotId NE '' then
|
|
||||||
Begin Case
|
|
||||||
Case LotType EQ 'TW'
|
|
||||||
If OperatorId NE '' then
|
|
||||||
If RowExists('LOT', LotId) then
|
|
||||||
ValidId = False$
|
|
||||||
NewEventId = ''
|
|
||||||
Loop
|
|
||||||
NewEventId = RTI_CreateGUID()
|
|
||||||
If Not(RowExists('LOT_EVENT', NewEventId)) then
|
|
||||||
ValidId = True$
|
|
||||||
end
|
|
||||||
Until ValidId EQ True$
|
|
||||||
Repeat
|
|
||||||
BeginWaferQty = Xlate('LOT', LotId, LOT_WAFER_QTY$, 'X')
|
|
||||||
If OperationID EQ '' then
|
|
||||||
OperationID = Lot_Services('GetLotCurrOperationId', LotId)
|
|
||||||
end
|
|
||||||
If OperationID NE '' then
|
|
||||||
Begin Case
|
|
||||||
Case EventType EQ 'MOVE_IN'
|
|
||||||
Lot_Services('MoveInLot', LotId, OperatorId)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
|
|
||||||
end else
|
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
|
||||||
end
|
|
||||||
Case EventType EQ 'MOVE_OUT'
|
|
||||||
Lot_Services('MoveOutLot', LotId, OperatorId)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
|
|
||||||
end else
|
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
|
||||||
end
|
|
||||||
Case EventType EQ 'HOLD_ON'
|
|
||||||
Lot_Services('HoldLot', LotId, OperatorId)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
|
|
||||||
end else
|
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
|
||||||
end
|
|
||||||
Case EventType EQ 'HOLD_OFF'
|
|
||||||
Lot_Services('UnholdLot', LotId, OperatorId)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
|
|
||||||
end else
|
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
|
||||||
end
|
|
||||||
Case EventType EQ 'REDUCE_WAFER_QTY'
|
|
||||||
Lot_Services('ReduceLotWaferCount', LotId, ReduceWaferQty, OperatorId)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
|
|
||||||
end else
|
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
|
||||||
end
|
|
||||||
Case EventType EQ 'BONUS_WAFER_QTY'
|
|
||||||
Lot_Services('IncreaseLotWaferCount', LotId, BonusWaferQty)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
|
|
||||||
end else
|
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
|
||||||
end
|
|
||||||
Case EventType EQ 'COMMENT'
|
|
||||||
//Do Nothing Extra
|
|
||||||
Case EventType EQ 'LOCATION'
|
|
||||||
//Do nothing for now.
|
|
||||||
Case EventType EQ 'CLOSE'
|
|
||||||
Lot_Services('CloseLot', LotId, OperatorId)
|
|
||||||
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
|
|
||||||
|
|
||||||
If ErrorMessage EQ '' then
|
|
||||||
EndWaferQty = (BeginWaferQty + BonusWaferQty) - ReduceWaferQty
|
|
||||||
|
|
||||||
NewEventRec = ''
|
|
||||||
NewEventRec<LOT_EVENT_LOT_ID$> = LotId
|
|
||||||
NewEventRec<LOT_EVENT_LOT_EVENT_TYPE$> = EventType
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_DATETIME$> = EventDatetime
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_NOTE$> = EventNote
|
|
||||||
NewEventRec<LOT_EVENT_EQUIPMENT_ID$> = EventEquipmentId
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_REDUCE_WAFER_QTY$> = ReduceWaferQty
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_BONUS_WAFER_QTY$> = BonusWaferQty
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_BEGIN_WAFER_QTY$> = BeginWaferQty
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_END_WAFER_QTY$> = EndWaferQty
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_OPERATION_ID$> = OperationId
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_OPERATOR_ID$> = OperatorId
|
|
||||||
NewEventSequence = Lot_Services('GetLotEventNextSequence', LotId)
|
|
||||||
NewEventRec<LOT_EVENT_SEQUENCE$> = NewEventSequence
|
|
||||||
Database_Services('WriteDataRow', 'LOT_EVENT', NewEventId, NewEventRec)
|
|
||||||
if Error_Services('NoError') then
|
|
||||||
If BeginWaferQty NE EndWaferQty then
|
|
||||||
//Adjust LOT wafer qty
|
|
||||||
LotRecord = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
|
||||||
If LotRecord NE '' then
|
|
||||||
LotRecord<LOT_WAFER_QTY$> = EndWaferQty
|
|
||||||
Database_Services('WriteDataRow', 'LOT', LotId, LotRecord, True$, False$, False$)
|
|
||||||
If Error_Services('HasError') then
|
|
||||||
ErrorMessage = 'Error in CreateLotEvent routine, failed attempt to close lot ':LotId:'. Failed to write to LOT record.'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Error in Create Lot Event routine, Error writing Lot Event record, ' : Error_Services('GetMessage')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Error in Create Lot Event routine, Current Operation for lot id ' : LotId : ' could not be determined.'
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Error in Create Lot Event routine, Lot Id passed to routine was not found in LOT table.'
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Error in Create Lot Event routine, Operator ID was null.'
|
|
||||||
end
|
|
||||||
Case LotType EQ 'RDS' OR LotType EQ 'WO_MAT' OR LotType EQ 'WM_IN' OR LotType EQ 'WM_OUT'
|
|
||||||
ExistingLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', LotId, LotType)
|
|
||||||
LegacyLotId = LotId
|
|
||||||
If ExistingLotId NE '' then
|
|
||||||
LotId = ExistingLotId
|
|
||||||
end else
|
|
||||||
LotId = Lot_Services('CreateNewLot', LotType, '', '', '', '', '', OperatorId, '', LegacyLotId)
|
|
||||||
end
|
|
||||||
If RowExists('LOT', LotId) then
|
|
||||||
If EventType NE '' AND OperatorId NE '' then
|
|
||||||
ValidId = False$
|
|
||||||
NewEventId = ''
|
|
||||||
Loop
|
|
||||||
NewEventId = RTI_CreateGUID()
|
|
||||||
If Not(RowExists('LOT_EVENT', NewEventId)) then
|
|
||||||
ValidId = True$
|
|
||||||
end
|
|
||||||
Until ValidId EQ True$
|
|
||||||
Repeat
|
|
||||||
BeginWaferQty = Xlate('LOT', LotId, LOT_WAFER_QTY$, 'X')
|
|
||||||
If ReduceWaferQty NE '' then
|
|
||||||
If Num(ReduceWaferQty) then
|
|
||||||
EndWaferQty = BeginWaferQty - ReduceWaferQty
|
|
||||||
end
|
|
||||||
end
|
|
||||||
If BonusWaferQty NE '' then
|
|
||||||
If Num(BonusWaferQty) then
|
|
||||||
EndWaferQty = BeginWaferQty + BonusWaferQty
|
|
||||||
end
|
|
||||||
end
|
|
||||||
If Not(Num(EventDatetime)) then EventDatetime = IConv(EventDatetime, 'DT')
|
|
||||||
|
|
||||||
Begin Case
|
|
||||||
Case EventType EQ 'VOID'
|
|
||||||
Lot_Services('CreateNewVoidedLotRecord', LotId, LegacyLotId, LotType, OperatorId)
|
|
||||||
If Error_Services('HasError') then
|
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
|
||||||
end
|
|
||||||
Case Otherwise$
|
|
||||||
//Do Nothing extra
|
|
||||||
End Case
|
|
||||||
If ErrorMessage EQ '' then
|
|
||||||
NewEventRec = ''
|
|
||||||
NewEventRec<LOT_EVENT_LOT_ID$> = LotId
|
|
||||||
NewEventRec<LOT_EVENT_LOT_EVENT_TYPE$> = EventType
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_DATETIME$> = EventDatetime
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_NOTE$> = EventNote
|
|
||||||
NewEventRec<LOT_EVENT_EQUIPMENT_ID$> = EventEquipmentId
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_REDUCE_WAFER_QTY$> = ReduceWaferQty
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_BONUS_WAFER_QTY$> = BonusWaferQty
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_BEGIN_WAFER_QTY$> = BeginWaferQty
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_END_WAFER_QTY$> = EndWaferQty
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_OPERATION_ID$> = OperationId
|
|
||||||
NewEventRec<LOT_EVENT_EVENT_OPERATOR_ID$> = OperatorId
|
|
||||||
NewEventSequence = Lot_Services('GetLotEventNextSequence', LotId)
|
|
||||||
NewEventRec<LOT_EVENT_SEQUENCE$> = NewEventSequence
|
|
||||||
Database_Services('WriteDataRow', 'LOT_EVENT', NewEventId, NewEventRec)
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Operator ID was null.'
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Error in Create Lot Event routine, Lot Id passed to routine was not found in LOT table.'
|
|
||||||
end
|
|
||||||
Case Otherwise$
|
|
||||||
ErrorMessage = 'Error in Create Lot Event routine, An invalid lot type was passed to routine.'
|
|
||||||
End Case
|
|
||||||
If Assigned(NewEventId) AND Assigned(LotId) then
|
|
||||||
If RowExists('LOT_EVENT', NewEventId) AND RowExists('LOT', LotId) then
|
|
||||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
|
||||||
LotRec<LOT_MOST_RECENT_LOT_EVENT_ID$> = NewEventId
|
|
||||||
Database_Services('WriteDataRow', 'LOT', LotId, LotRec)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Error in Create Lot Event routine, A null value for Lot Id was passed to routine.'
|
|
||||||
end
|
|
||||||
If ErrorMessage EQ '' then
|
|
||||||
LogData = ''
|
|
||||||
LogData<1> = LoggingDTM
|
|
||||||
LogData<2> = LotId
|
|
||||||
LogData<3> = EventType
|
|
||||||
LogData<4> = OperatorId
|
|
||||||
LogData<5> = BeginWaferQty
|
|
||||||
LogData<6> = EndWaferQty
|
|
||||||
LogData<7> = BonusWaferQty
|
|
||||||
LogData<8> = ReduceWaferQty
|
|
||||||
LogData<9> = 'Successfully logged event.'
|
|
||||||
Logging_Services('AppendLog', objLotEventLog, LogData, @RM, @FM, False$)
|
|
||||||
end else
|
|
||||||
LogData = ''
|
|
||||||
LogData<1> = LoggingDTM
|
|
||||||
LogData<2> = LotId
|
|
||||||
LogData<3> = EventType
|
|
||||||
LogData<4> = OperatorId
|
|
||||||
LogData<5> = BeginWaferQty
|
|
||||||
LogData<6> = EndWaferQty
|
|
||||||
LogData<7> = BonusWaferQty
|
|
||||||
LogData<8> = ReduceWaferQty
|
|
||||||
LogData<9> = ErrorMessage
|
|
||||||
Logging_Services('AppendLog', objLotEventLog, LogData, @RM, @FM, False$)
|
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
|
||||||
end service
|
|
||||||
|
|
||||||
Service GetLotEventNextSequence(LotId)
|
|
||||||
ErrorMessage = ''
|
|
||||||
NextSequence = 1
|
|
||||||
If LotID NE '' then
|
|
||||||
If RowExists('LOT', LotId) then
|
|
||||||
LotEvents = XLATE('LOT', LotId, LOT_LOT_EVENTS$, 'X')
|
|
||||||
for each LotEvent in LotEvents using @VM
|
|
||||||
ThisEventSequence = XLATE('LOT_EVENT', LotEvent, LOT_EVENT_SEQUENCE$, 'X')
|
|
||||||
If ThisEventSequence GE NextSequence then NextSequence = ThisEventSequence + 1
|
|
||||||
Next LotEvent
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Unable to get lot event sequence: Lot ID not found.'
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
ErrorMessage = 'Unable to get lot event sequence: Lot ID was null.'
|
|
||||||
end
|
|
||||||
If ErrorMessage EQ '' then
|
|
||||||
Response = NextSequence
|
|
||||||
end else
|
|
||||||
Error_Services('Add', ErrorMessage)
|
|
||||||
end
|
|
||||||
end service
|
|
||||||
|
|
||||||
Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
|
Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
|
||||||
|
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
@ -1042,7 +771,7 @@ Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
|
|||||||
//Events Array
|
//Events Array
|
||||||
EventsArrayJson = ''
|
EventsArrayJson = ''
|
||||||
If SRP_Json(EventsArrayJson, 'New', 'Array') then
|
If SRP_Json(EventsArrayJson, 'New', 'Array') then
|
||||||
LotEventKeys = Lot_Services('GetLotEventsInSequence', LotId)
|
LotEventKeys = Lot_Event_Services('GetLotEventsInSequence', LotId)
|
||||||
for each LotEventKey in LotEventKeys using @FM
|
for each LotEventKey in LotEventKeys using @FM
|
||||||
objEvent = ''
|
objEvent = ''
|
||||||
EventRec = Database_Services('ReadDataRow', 'LOT_EVENT', LotEventKey)
|
EventRec = Database_Services('ReadDataRow', 'LOT_EVENT', LotEventKey)
|
||||||
@ -1131,8 +860,10 @@ Service OpenLot(LotId)
|
|||||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||||
LotRec<LOT_OPEN$> = True$
|
LotRec<LOT_OPEN$> = True$
|
||||||
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
||||||
If Error_Services('HasError') then
|
If Error_Services('NoError') then
|
||||||
ErrorMessage = 'Error setting lot ' : LotId : ' to open.' : Error_Services('GetMessage')
|
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'OPEN', 'Lot status set to Open.', '', 'SYSTEM')
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Error setting lot ' : LotId : ' to open.' : Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Unable to Open Lot ' : LotId : '. Lot ID was not found in LOT table.'
|
ErrorMessage = 'Unable to Open Lot ' : LotId : '. Lot ID was not found in LOT table.'
|
||||||
@ -1148,7 +879,9 @@ Service CloseLot(LotId)
|
|||||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||||
LotRec<LOT_OPEN$> = False$
|
LotRec<LOT_OPEN$> = False$
|
||||||
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
||||||
If Error_Services('HasError') then
|
If Error_Services('NoError') then
|
||||||
|
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'CLOSE', 'Lot status set to Closed', '', 'SYSTEM')
|
||||||
|
end else
|
||||||
ErrorMessage = 'Error setting lot ' : LotId : ' to closed.' : Error_Services('GetMessage')
|
ErrorMessage = 'Error setting lot ' : LotId : ' to closed.' : Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
@ -1212,7 +945,8 @@ Service AutoCloseTestWaferLot(LotId, CloseUserId)
|
|||||||
ErrorMessage = CloseUserId : ' does not have permission to close this lot.'
|
ErrorMessage = CloseUserId : ' does not have permission to close this lot.'
|
||||||
end
|
end
|
||||||
If ErrorMessage EQ '' then
|
If ErrorMessage EQ '' then
|
||||||
Lot_Services('CreateLotEvent', LotId, 'TW', AutoCloseTime, 'CLOSE', 'Close action performed by ' : CloseUserId, '', '', '', ThisLotOperationId, CloseUserId)
|
//Close Lot as there were no validation failures.
|
||||||
|
Lot_Services('CloseLot', LotId)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM
|
LogData<1> = LoggingDTM
|
||||||
@ -1276,7 +1010,9 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
|
|||||||
LotRec<LOT_WAFER_QTY$> = LotNewWfrQty
|
LotRec<LOT_WAFER_QTY$> = LotNewWfrQty
|
||||||
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
if LotNewWfrQty EQ 0 AND LotType EQ 'TW' then
|
//Write Lot Event
|
||||||
|
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'REDUCE_WAFER_QTY', 'Reduced wafer count by ' : ReductionQty, '', OperatorId, False$, '')
|
||||||
|
if LotNewWfrQty EQ 0 AND LotType EQ 'TW' then
|
||||||
ServiceParms = 'AutoCloseTestWaferLot' : @VM : LotId : @VM : 'SYSTEM'
|
ServiceParms = 'AutoCloseTestWaferLot' : @VM : LotId : @VM : 'SYSTEM'
|
||||||
Service_Services('PostProcedure', 'LOT_SERVICES', ServiceParms)
|
Service_Services('PostProcedure', 'LOT_SERVICES', ServiceParms)
|
||||||
If Error_Services('HasError') then
|
If Error_Services('HasError') then
|
||||||
@ -1291,7 +1027,7 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
|
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
Begin Case
|
Begin Case
|
||||||
@ -1309,7 +1045,7 @@ Service ReduceLotWaferCount(LotId, ReductionQty, OperatorId)
|
|||||||
end
|
end
|
||||||
end service
|
end service
|
||||||
|
|
||||||
Service IncreaseLotWaferCount(LotId, IncreaseQty)
|
Service IncreaseLotWaferCount(LotId, IncreaseQty, OperatorId)
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
If RowExists('LOT', LotId) then
|
If RowExists('LOT', LotId) then
|
||||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||||
@ -1323,7 +1059,10 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty)
|
|||||||
If LotNewWfrQty LE 25 AND LotNewWfrQty GT 0 then
|
If LotNewWfrQty LE 25 AND LotNewWfrQty GT 0 then
|
||||||
LotRec<LOT_WAFER_QTY$> = LotNewWfrQty
|
LotRec<LOT_WAFER_QTY$> = LotNewWfrQty
|
||||||
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
Database_Services('WriteDataRow', 'LOT', LotId, LotRec, True$, False$, False$)
|
||||||
If Error_Services('HasError') then
|
If Error_Services('NoError') then
|
||||||
|
//Write Lot Event
|
||||||
|
Lot_Event_Services('CreateLotEvent', LotId, Datetime(), 'INCREASE_WAFER_QTY', 'Increased wafer count by ' : IncreaseQty, '', OperatorId, False$, '')
|
||||||
|
end else
|
||||||
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
|
ErrorMessage = 'Error in Increase Lot Wafer Count service, Error writing Lot Id ' : LotId : ' with new quantity.'
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
@ -1347,6 +1086,7 @@ Service IncreaseLotWaferCount(LotId, IncreaseQty)
|
|||||||
if ErrorMessage NE '' then
|
if ErrorMessage NE '' then
|
||||||
Error_Services('Add', ErrorMessage)
|
Error_Services('Add', ErrorMessage)
|
||||||
end
|
end
|
||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
Service OpenOIWizardCreateTWLotInBrowser()
|
Service OpenOIWizardCreateTWLotInBrowser()
|
||||||
@ -1436,3 +1176,4 @@ end service
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -548,3 +548,4 @@ Service UpdateSecurityGroups()
|
|||||||
|
|
||||||
end service
|
end service
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ Event PUB_SUBMIT.CLICK()
|
|||||||
Begin Case
|
Begin Case
|
||||||
Case NewWfrQty LT CurrWfrQty
|
Case NewWfrQty LT CurrWfrQty
|
||||||
AmountToDecrease = CurrWfrQty - NewWfrQty
|
AmountToDecrease = CurrWfrQty - NewWfrQty
|
||||||
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'REDUCE_WAFER_QTY', 'Adjust wafer count by ' : AmountToDecrease, '', AmountToDecrease, 0, '', @User4)
|
Lot_Services('ReduceLotWaferCount', LotId, AmountToDecrease, @User4)
|
||||||
Case NewWfrQty GT CurrWfrQty
|
Case NewWfrQty GT CurrWfrQty
|
||||||
AmountToIncrease = NewWfrQty - CurrWfrQty
|
AmountToIncrease = NewWfrQty - CurrWfrQty
|
||||||
Lot_Services('CreateLotEvent', LotId, LotType, Datetime(), 'BONUS_WAFER_QTY', 'Adjust wafer count by ' : AmountToIncrease, '', 0, AmountToIncrease, '', @User4)
|
Lot_Services('IncreaseLotWaferCount', LotId, AmountToIncrease, @User4)
|
||||||
End Case
|
End Case
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
msg(@Window, 'Wafer quantity adjusted successfully!')
|
msg(@Window, 'Wafer quantity adjusted successfully!')
|
||||||
@ -175,3 +175,4 @@ return
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Compile function NDW_VIEW_LOT_EVENTS(CtrlEntId, Event, @PARAMS)
|
|||||||
#pragma precomp SRP_PreCompiler
|
#pragma precomp SRP_PreCompiler
|
||||||
#window NDW_VIEW_LOT
|
#window NDW_VIEW_LOT
|
||||||
|
|
||||||
Declare function Get_Property, Lot_Services, Database_Services
|
Declare function Get_Property, Lot_Services, Database_Services, Lot_Event_Services
|
||||||
Declare subroutine Set_Property
|
Declare subroutine Set_Property
|
||||||
|
|
||||||
$Insert APP_INSERTS
|
$Insert APP_INSERTS
|
||||||
@ -80,7 +80,7 @@ GetLot:
|
|||||||
Next LotOperation
|
Next LotOperation
|
||||||
|
|
||||||
//Lot Event Status'
|
//Lot Event Status'
|
||||||
LotEventsInSequence = Lot_Services('GetLotEventsInSequence', ThisLotId)
|
LotEventsInSequence = Lot_Event_Services('GetLotEventsInSequence', ThisLotId)
|
||||||
LotEventTableData = ''
|
LotEventTableData = ''
|
||||||
For each LotEvent in LotEventsInSequence using @FM
|
For each LotEvent in LotEventsInSequence using @FM
|
||||||
LotEventRec = Database_Services('ReadDataRow', 'LOT_EVENT', LotEvent)
|
LotEventRec = Database_Services('ReadDataRow', 'LOT_EVENT', LotEvent)
|
||||||
@ -111,3 +111,4 @@ ResetForm:
|
|||||||
Set_Property(@Window : '.EDT_LOT_OPERATIONS', 'ARRAY', '')
|
Set_Property(@Window : '.EDT_LOT_OPERATIONS', 'ARRAY', '')
|
||||||
Set_Property(@Window : '.EDT_LOT_EVENTS', 'ARRAY', '')
|
Set_Property(@Window : '.EDT_LOT_EVENTS', 'ARRAY', '')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ COMPILE FUNCTION obj_WO_Mat_Log(Method,Parms)
|
|||||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, NextKey, Popup, Get_Property, obj_RDS, Database_Services
|
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, NextKey, Popup, Get_Property, obj_RDS, Database_Services
|
||||||
Declare function Logging_Services, Environment_Services, RTI_CreateGUID, Error_Services, Datetime
|
Declare function Logging_Services, Environment_Services, RTI_CreateGUID, Error_Services, Datetime
|
||||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, Btree.Extract, ErrMsg, Send_Dyn, RList, obj_WO_Log, Send_Event, obj_RDS
|
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, Btree.Extract, ErrMsg, Send_Dyn, RList, obj_WO_Log, Send_Event, obj_RDS
|
||||||
DECLARE SUBROUTINE obj_WO_Mat, Send_Info, obj_Notes, Logging_Services, Database_Services, Lot_Services
|
DECLARE SUBROUTINE obj_WO_Mat, Send_Info, obj_Notes, Logging_Services, Database_Services, Lot_Event_Services
|
||||||
|
|
||||||
$INSERT MSG_EQUATES
|
$INSERT MSG_EQUATES
|
||||||
$INSERT WO_MAT_LOG_EQUATES
|
$INSERT WO_MAT_LOG_EQUATES
|
||||||
@ -166,8 +166,7 @@ Create:
|
|||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WOMatKey = WONo : '*' : CassNo
|
WOMatKey = WONo : '*' : CassNo
|
||||||
RDSKey = XLATE('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
RDSKey = XLATE('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
||||||
Lot_Services('CreateLotEvent', RDSKey, 'RDS', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', RDSKey, Datetime(), Action, '', '', UserId, True$, 'RDS')
|
||||||
Lot_Services('CreateLotEvent', WOMatKey, 'WO_MAT', Datetime(), Action, '', '', 0, 0, '', UserID)
|
|
||||||
end else
|
end else
|
||||||
Begin Case
|
Begin Case
|
||||||
Case Action EQ 'RCVD'
|
Case Action EQ 'RCVD'
|
||||||
@ -176,14 +175,14 @@ Create:
|
|||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMInKey, Datetime(), Action, '', '', UserId, True$, 'WM_IN')
|
||||||
Case Action EQ 'REL'
|
Case Action EQ 'REL'
|
||||||
//WMI
|
//WMI
|
||||||
WONo = WoNos
|
WONo = WoNos
|
||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMInKey, Datetime(), Action, '', '', UserId, True$, 'WM_IN')
|
||||||
Case Action EQ '1VER'
|
Case Action EQ '1VER'
|
||||||
//RDS action, do nothing for now
|
//RDS action, do nothing for now
|
||||||
Case Action EQ '1LOAD'
|
Case Action EQ '1LOAD'
|
||||||
@ -195,38 +194,38 @@ Create:
|
|||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
|
||||||
Case Action EQ '1MO_QA'
|
Case Action EQ '1MO_QA'
|
||||||
WONo = WoNos
|
WONo = WoNos
|
||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
|
||||||
Case Action EQ 'PACK'
|
Case Action EQ 'PACK'
|
||||||
WONo = WoNos
|
WONo = WoNos
|
||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
|
||||||
Case Action EQ 'PSVER'
|
Case Action EQ 'PSVER'
|
||||||
WONo = WoNos
|
WONo = WoNos
|
||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
|
||||||
Case Action EQ 'SHIP'
|
Case Action EQ 'SHIP'
|
||||||
WONo = WoNos
|
WONo = WoNos
|
||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
|
||||||
Case Action EQ 'LBLCHK'
|
Case Action EQ 'LBLCHK'
|
||||||
//WMO
|
//WMO
|
||||||
WONo = WoNos
|
WONo = WoNos
|
||||||
StepNo = 1
|
StepNo = 1
|
||||||
CassNo = CassNos
|
CassNo = CassNos
|
||||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||||
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
|
Lot_Event_Services('CreateLotEvent', WMOutKey, Datetime(), Action, '', '', UserId, True$, 'WM_OUT')
|
||||||
End Case
|
End Case
|
||||||
end
|
end
|
||||||
ErrorMsg = ''
|
ErrorMsg = ''
|
||||||
@ -364,3 +363,4 @@ Post:
|
|||||||
end
|
end
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
|
|
||||||
|
@ -1,108 +0,0 @@
|
|||||||
Compile function OPERATION_TW_CREATE(LotId, Action, Operator)
|
|
||||||
//Action: IN, OUT, PROCESS
|
|
||||||
Declare function Lot_Services, Error_Services, Datetime, Database_Services
|
|
||||||
Declare subroutine Database_Services, Lot_Services
|
|
||||||
|
|
||||||
#pragma precomp SRP_PreCompiler
|
|
||||||
$insert LOGICAL
|
|
||||||
$Insert APP_INSERTS
|
|
||||||
$Insert Lot_Operation_Equates
|
|
||||||
$Insert LOT_EQUATES
|
|
||||||
|
|
||||||
Success = False$
|
|
||||||
debug
|
|
||||||
If RowExists('LOT', LotId) then
|
|
||||||
If Operator NE '' and RowExists('LSL_USERS', Operator) then
|
|
||||||
Begin Case
|
|
||||||
Case Action = 'IN'
|
|
||||||
GoSub MoveIn
|
|
||||||
Case Action = 'OUT'
|
|
||||||
GoSub MoveOut
|
|
||||||
Case Action = 'PROCESS'
|
|
||||||
GoSub Process
|
|
||||||
Case Otherwise$
|
|
||||||
null
|
|
||||||
End Case
|
|
||||||
end else
|
|
||||||
Error_Services('Add', 'Operator ID was null')
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
Error_Services('Add', 'Invalid lot passed to Operation routine.')
|
|
||||||
Success = False$
|
|
||||||
end
|
|
||||||
|
|
||||||
Return Success
|
|
||||||
|
|
||||||
|
|
||||||
MoveIn:
|
|
||||||
debug
|
|
||||||
//Get TW Create Operation ID
|
|
||||||
ThisOperationID = Lot_Services('GetLotCurrOperationId', LotId)
|
|
||||||
If Field(ThisOperationId, '*', 1) EQ 'TW_CREATE' then
|
|
||||||
ThisLotCurrOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisOperationID)
|
|
||||||
ThisLotCurrOperationRec<LOT_OPERATION_DATETIME_IN$> = Datetime()
|
|
||||||
ThisLotCurrOperationRec<LOT_OPERATION_WAFER_IN_QTY$> = Xlate('LOT', LotId, LOT_WAFER_QTY$, 'X')
|
|
||||||
ThisLotCurrOperationRec<LOT_OPERATION_OPERATOR_IN_ID$> = Operator
|
|
||||||
Database_Services('WriteDataRow', 'LOT_OPERATION', ThisLotCurrOperationID, ThisOperationID)
|
|
||||||
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)
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
Error_Services('Add', 'Failed to move in lot. Lot is not currently at TW_CREATE. Detected Operation is ' : Field(ThisOperationId, '*', 1))
|
|
||||||
end
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
MoveOut:
|
|
||||||
ThisOperationID = Lot_Services('GetLotCurrOperationID', LotId)
|
|
||||||
If Field(ThisOperationId, '*', 1) EQ 'TW_CREATE' then
|
|
||||||
ThisLotCurrOperationRec = Database_Services('ReadDataRow', 'LOT_OPERATION', ThisLotCurrOperationID)
|
|
||||||
LotMovedIn = ThisLotCurrOperationRec<LOT_OPERATION_DATETIME_IN$>
|
|
||||||
If LotMovedIn then
|
|
||||||
ThisOperationSteps = ThisLotCurrOperationRec<LOT_OPERATION_STEPS$>
|
|
||||||
AllStepsCompleted = False$
|
|
||||||
for each OperationStepId in ThisOperationSteps using @VM
|
|
||||||
ThisStepComplete = Xlate('LOT_OPERATION_STEP', OperationStepId, LOT_OPERATION_STEP_STEP_COMPLETED$, 'X')
|
|
||||||
If ThisStepComplete then
|
|
||||||
AllStepsComplete = True$
|
|
||||||
end else
|
|
||||||
AllStepsComplete = False$
|
|
||||||
end
|
|
||||||
until AllStepsCompleted = False$
|
|
||||||
Next OperationStep
|
|
||||||
If AllStepsCompleted then
|
|
||||||
ThisLotCurrOperationRec<LOT_OPERATION_DATETIME_OUT$> = Datetime()
|
|
||||||
ThisLotCurrOperationRec<LOT_OPERATION_WAFER_OUT_QTY$> = Xlate('LOT', LotId, LOT_WAFER_QTY$, 'X')
|
|
||||||
ThisLotCurrOperationRec<LOT_OPERATION_OPERATOR_OUT_ID$> = Operator
|
|
||||||
Database_Services('WriteDataRow', 'LOT_OPERATION', ThisLotCurrOperationID, ThisLotCurrOperationRec)
|
|
||||||
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)
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
Error_Services('Add', 'Failed to move out lot. Not all steps completed.')
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
Error_Services('Add', 'Failed to move out lot. Lot was not moved in.')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return
|
|
||||||
|
|
||||||
Process:
|
|
||||||
//Get Current Step and proceed from that step onward
|
|
||||||
return
|
|
||||||
|
|
||||||
OpenLot:
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
PrintLabel:
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -65,6 +65,7 @@ Equ COMMA$ to ','
|
|||||||
Declare function Error_Services, Database_Services, obj_RDS_Test, Logging_Services, Environment_Services
|
Declare function Error_Services, Database_Services, obj_RDS_Test, Logging_Services, Environment_Services
|
||||||
Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Datetime, Override_Services
|
Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Datetime, Override_Services
|
||||||
Declare function Rds_Services, SRP_DateTime, SRP_Math, obj_WO_Mat, Lot_Services, SRP_Array
|
Declare function Rds_Services, SRP_DateTime, SRP_Math, obj_WO_Mat, Lot_Services, SRP_Array
|
||||||
|
Declare function Lot_Event_Services
|
||||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Service_Services
|
Declare subroutine Error_Services, Database_Services, Logging_Services, Service_Services
|
||||||
|
|
||||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
|
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
|
||||||
@ -689,7 +690,7 @@ WRITE_RECORD_PRE:
|
|||||||
// Audit the LOT_EVENT table for missing LOAD event (i.e., signature)
|
// Audit the LOT_EVENT table for missing LOAD event (i.e., signature)
|
||||||
ExistingNGLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
|
ExistingNGLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
|
||||||
If RowExists('LOT', ExistingNGLotId) then
|
If RowExists('LOT', ExistingNGLotId) then
|
||||||
LotEvents = Lot_Services('GetLotEventsInSequence', ExistingNGLotId)
|
LotEvents = Lot_Event_Services('GetLotEventsInSequence', ExistingNGLotId)
|
||||||
If LotEvents NE '' then
|
If LotEvents NE '' then
|
||||||
LotEventsRev = SRP_Array('Reverse', LotEvents, @FM)
|
LotEventsRev = SRP_Array('Reverse', LotEvents, @FM)
|
||||||
LotEventsTypesRev = Xlate('LOT_EVENT', LotEventsRev, LOT_EVENT_LOT_EVENT_TYPE$, 'X')
|
LotEventsTypesRev = Xlate('LOT_EVENT', LotEventsRev, LOT_EVENT_LOT_EVENT_TYPE$, 'X')
|
||||||
@ -1043,3 +1044,4 @@ Restore_System_Variables:
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ EQU READONLY_GREEN$ TO 192 + (220*256) + (192*65536)
|
|||||||
|
|
||||||
Declare subroutine ErrMsg, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, obj_RDS, Set_Property, Send_Event, Database_Services
|
Declare subroutine ErrMsg, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, obj_RDS, Set_Property, Send_Event, Database_Services
|
||||||
Declare subroutine Dialog_Box, Qa_Services, Obj_React_Ll, Start_Window, obj_React_Status, Reactor_Services, Rds_Services
|
Declare subroutine Dialog_Box, Qa_Services, Obj_React_Ll, Start_Window, obj_React_Status, Reactor_Services, Rds_Services
|
||||||
Declare subroutine Lot_Services, Override_Log_Services
|
Declare subroutine Lot_Event_Services, Override_Log_Services
|
||||||
Declare function Dialog_Box, Msg, MemberOf, obj_WO_Mat, Database_Services, Get_Property, obj_React_Status, Get_Status
|
Declare function Dialog_Box, Msg, MemberOf, obj_WO_Mat, Database_Services, Get_Property, obj_React_Status, Get_Status
|
||||||
Declare function QA_Services, Database_Services, Rds_Services, Obj_Calendar, Override_Log_Services, Max, Supplement_Services
|
Declare function QA_Services, Database_Services, Rds_Services, Obj_Calendar, Override_Log_Services, Max, Supplement_Services
|
||||||
Declare function Datetime, Test_Run_Services
|
Declare function Datetime, Test_Run_Services
|
||||||
@ -463,8 +463,7 @@ Event PUB_SIGN.CLICK()
|
|||||||
OverrideUser = Response<2>
|
OverrideUser = Response<2>
|
||||||
|
|
||||||
If Valid then
|
If Valid then
|
||||||
|
Lot_Event_Services('CreateLotEvent', RDSNo, Datetime(), 'UNSIGN_LOAD', 'Load stage unsigned', 'Reactor', @User4, True$, 'RDS')
|
||||||
Lot_Services('CreateLotEvent', RDSNo, 'RDS', Datetime(), 'UNSIGN_LOAD', 'Load stage unsigned', Reactor, '', '', '', @User4)
|
|
||||||
|
|
||||||
// 4. Remove WO_MAT Unload signature, date, and time
|
// 4. Remove WO_MAT Unload signature, date, and time
|
||||||
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
|
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
|
||||||
@ -729,3 +728,4 @@ OLE_LL_Status:
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
@ -258,3 +258,4 @@ return
|
|||||||
/// Internal GoSubs
|
/// Internal GoSubs
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
|
|||||||
Case ThisLotCurrOperation EQ 'TW_IN_USE'
|
Case ThisLotCurrOperation EQ 'TW_IN_USE'
|
||||||
|
|
||||||
If Not(LotMovedIn) then
|
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
|
If Error_Services('HasError') then
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
ErrorMessage = Error_Services('GetMessage')
|
||||||
end
|
end
|
||||||
@ -399,9 +399,9 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
|
|||||||
Case ThisLotCurrOperation EQ 'TW_READY_TO_USE'
|
Case ThisLotCurrOperation EQ 'TW_READY_TO_USE'
|
||||||
|
|
||||||
If Not(LotMovedIn) then
|
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
|
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
|
end
|
||||||
If Error_Services('HasError') then
|
If Error_Services('HasError') then
|
||||||
ErrorMessage = Error_Services('GetMessage')
|
ErrorMessage = Error_Services('GetMessage')
|
||||||
@ -427,7 +427,7 @@ Service CreateTestRunRecord(RunTypeID, EqpType, EqpID, PSNo, RDSNo, UserID, TWLo
|
|||||||
until ErrorMessage NE ''
|
until ErrorMessage NE ''
|
||||||
Next i
|
Next i
|
||||||
If ErrorMessage EQ '' then
|
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
|
||||||
end else
|
end else
|
||||||
ErrorMessage = 'Error in Create Test Run Record routine, ' : TWLotId : ' does not have enough wafers.'
|
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)
|
Service UseTWFromLot(LotId, UsageQty, Username)
|
||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
If RowExists('LOT', LotId) then
|
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
|
end else
|
||||||
ErrorMessage = 'Error logging wafer consumption from Lot # ' : LotId : '. Lot does not exist in LOT table.'
|
ErrorMessage = 'Error logging wafer consumption from Lot # ' : LotId : '. Lot does not exist in LOT table.'
|
||||||
end
|
end
|
||||||
@ -798,3 +798,4 @@ end service
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user