pre cutover push

This commit is contained in:
Infineon\StieberD
2024-09-04 20:33:41 -07:00
parent 6ea6969f4b
commit 7762b129af
2072 changed files with 130000 additions and 95295 deletions

View File

@ -27,6 +27,7 @@ Function RDS_Unload_Events(CtrlEntId, Event, @PARAMS)
History : (Date, Initials, Notes)
03/26/19 djs Created initial commuter module.
06/13/24 djm Add new stage-specific supplement system.
***********************************************************************************************************************/
@ -91,9 +92,11 @@ Equ ACTION$SPEC_SURFSCAN_RECIPE TO 8
Declare subroutine ErrMsg, Set_Status, obj_WO_Mat, obj_WO_Mat_Log, obj_RDS, Set_Property, Send_Event, Database_Services
Declare subroutine Dialog_Box, Msg, MemberOf, obj_WO_Mat, Get_Property, obj_React_Status, Get_Status, Override_Services
Declare subroutine record_lock, obj_React_Status, Post_Event, obj_React_State, obj_Post_Log, Qa_Services, Reactor_Services
Declare Subroutine Rds_Services
Declare function dialog_box, msg, Get_Status, obj_WO_Mat, Get_Status, obj_Clean_Insp, obj_Reactor, Get_Property
Declare function QA_Services, Database_Services, Set_Property, Rds_Services, Qa_Services, Memberof
Declare function QA_Services, Database_Services, Set_Property, Rds_Services, Qa_Services, Memberof, Reactor_Services
Declare function Supplement_Services
SubclassInfo = Form_Services('FindSubclassControl')
Subclass = SubclassInfo<1>
@ -145,10 +148,10 @@ end event
Event SUPPL_BUTTON.CLICK()
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
Dialog_Box('NDW_RDS_SUPP_SIG', @Window, RDSNo)
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
Dialog_Box('NDW_RDS_SUPP_SIG', @Window, RDSNo :@FM: 'UNLOAD' :@FM: FALSE$)
end event
@ -192,167 +195,194 @@ end event
Event PUB_SIGN.CLICK()
SignEventType = Get_Property(CtrlEntID, 'TEXT')
WONo = Get_Property(@Window:'.WO','DEFPROP')
CassNo = Get_Property(@Window:'.CASS_NO','DEFPROP')
WOStep = Get_Property(@Window:'.WO_STEP','DEFPROP')
RDSNo = Get_Property(@Window:'.RDS_NO','TEXT')
Reactor = Get_Property(@Window:'.REACTOR', 'TEXT')
Begin Case
Case SignEventType EQ 'Sign'
LWIInstAckReq = Xlate('RDS', RDSNo, 'LWI_INST_ACK_REQ', 'X')
If LWIInstAckReq EQ True$ then
Response = RDS_Services('RDSVerifyInst', RDSNo, 'LWI')
If Response EQ False$ then return
end
UnloadInstAckReq = Xlate('RDS', RDSNo, 'UNLOAD_INST_ACK_REQ', 'X')
If UnloadInstAckReq EQ True$ then
Response = RDS_Services('RDSVerifyInst', RDSNo, 'UNLOAD')
If Response EQ False$ then return
end
Override = False$
ReadyToSign = QA_Services('UnloadSignatureReady', RDSNo, @User4, Reactor)
If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage')
If ErrorMsg EQ 'Cassette runtime exceeds three days! An override by a LEAD or SUPERVISOR is required.' then
// Prompt for override
Response = Msg(@Window, '', 'OVERRIDE', '', ErrorMsg)
Begin Case
Case Response EQ 1
Response = True$ ; // User Clicked Override
Case Response EQ 2
Response = False$ ; // User Clicked Cancel
Case Response EQ char(27)
Response = False$ ; // User Pressed Escape Key
End Case
If Response EQ True$ then
OverrideGroups = 'LEAD' : @VM : 'SUPERVISOR'
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4 : @FM : OverrideGroups)
Valid = Response<1>
Username = Response<2>
If Valid then
Override_Services('SetOverride', 'RDS', RDSNo, 'UNLOAD_DTM', Username)
ReadyToSign = True$
Override = True$
end
end
end
end
If (ReadyToSign EQ True$) then
If Override EQ False$ then
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW)
Valid = Response<1>
end else
Valid = True$
end
If (Valid EQ True$) then
QA_Services('SignUnloadStage', RDSNo, @User4)
end
end
If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage')
ErrMsg(ErrorMsg)
end
Set_Property(@Window, 'SAVEWARN', False$)
Send_Event(@Window, 'READ')
Case SignEventType EQ 'Unsign'
// 1. Check if on hold. If so, then block event and inform user
WOMatKey = WONo:'*':CassNo
WOMatCurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)
IF WOMatCurrStatus = 'HOLD' THEN
ErrorMessage = 'Process Error':@SVM:'Cassette is on Hold and may not be signed off.':CRLF$:CRLF$
ErrMsg(ErrorMessage)
RETURN 0
END
// 2.
// a. For Non-EPP - Check if LWII, LWIS, or FQA has been signed. If so, then block event and inform user
// b. For EPP - Check Clean_Insp actions to see if an inspection or surfscan has been completed
// Also check the FQA signature (MO_QA)
Reactor = XLATE('RDS',RDSNo,'REACTOR','X')
ReactorType = XLATE('RDS',RDSNo,'REACTOR_TYPE','X')
CISigs = Xlate('RDS', RDSNo, 'LWI_CI_SIG', 'X')
Convert @VM to '' in CISigs
IF ReactorType NE 'EPP' THEN
FQASig = Xlate('RDS', RDSNo, 'SUP_VER_SIG', 'X')
END ELSE
WMOutKey = Xlate('RDS', RDSNo, 'WM_OUT_KEY', 'X')
FQASig = Xlate('WM_OUT', WMOutKey, 'SUP_VER_SIG', 'X')
END
If (CISigs NE '') or (FQASig NE '') then
// LWII, LWIS, or FQA already signed. Block unload unsign event.
ErrorMessage = 'Process Error':@SVM:'LWII, LWIS, or FQA already signed. Cannot unsign unload event.' |
: CRLF$ : CRLF$
ErrMsg(ErrorMessage)
Return 0
end
// 3. LEAD/SUPERVISOR standard override
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4 : @FM : 'LEAD' : @VM : 'SUPERVISOR')
Valid = Response<1>
OverrideUser = Response<2>
If Valid then
// 4. Remove RDS Unload signature, date, and time
Set_Property(@Window:'.OP_OUT', 'TEXT', '')
Set_Property(@Window:'.OP_OUT_NAME', 'TEXT', '')
Set_Property(@Window:'.OP_OUT_DATE', 'TEXT', '')
Set_Property(@Window:'.OP_OUT_TIME', 'TEXT', '')
IOOptions = Get_Property(@Window, 'IOOPTIONS')
IOOptions<6> = True$
Set_Property(@Window, 'IOOPTIONS', IOOptions)
Send_Event(@Window, 'WRITE')
IOOptions<6> = False$
Set_Property(@Window, 'IOOPTIONS', IOOptions)
// 5. Remove WO_MAT Unload signature, date, and time
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
SigProf = WOMatRec<WO_MAT_SIG_PROFILE$>
Sigs = WOMatRec<WO_MAT_SIGNATURE$>
SigDTMs = WOMatRec<WO_MAT_SIG_DTM$>
If ReactorType NE 'EPP' then
Locate '1UNLOAD' in SigProf using @VM setting vPos then
Sigs<1, vPos> = ''
SigDTMs<1, vPos> = ''
WOMatRec<WO_MAT_SIGNATURE$> = Sigs
WOMatRec<WO_MAT_SIG_DTM$> = SigDTMs
end
Reactor_Services('DecrementWfrMetrics', RDSNo)
end
// Added by JRO
obj_React_Status('HandleUnloadUnsign',Reactor:@RM:WONo:@RM:CassNo:@RM:RDSNo:@RM:OverrideUser)
// 6. Remove '1UNLOAD' material log entry (i.e. WO_MAT<INV...> columns)
InvActions = WOMatRec<WO_MAT_INV_ACTION$>
Locate '1UNLOAD' in InvActions using @VM setting vPos then
WOMatRec<WO_MAT_INV_WH$> = Delete(WOMatRec<WO_MAT_INV_WH$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_LOCATION$> = Delete(WOMatRec<WO_MAT_INV_LOCATION$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_ACTION$> = Delete(WOMatRec<WO_MAT_INV_ACTION$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_DTM$> = Delete(WOMatRec<WO_MAT_INV_DTM$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_USER$> = Delete(WOMatRec<WO_MAT_INV_USER$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_TAG$> = Delete(WOMatRec<WO_MAT_INV_TAG$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_TOOL_ID$> = Delete(WOMatRec<WO_MAT_INV_TOOL_ID$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_LOC$> = Delete(WOMatRec<WO_MAT_INV_LOC$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_SCAN_ENTRY$> = Delete(WOMatRec<WO_MAT_INV_SCAN_ENTRY$>, 0, vPos, 0)
end
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, True$)
Set_Property(@Window:'.PUB_SIGN', 'TEXT', 'Sign')
end else
Return 0
end
End Case
SignEventType = Get_Property(CtrlEntID, 'TEXT')
WONo = Get_Property(@Window:'.WO','DEFPROP')
CassNo = Get_Property(@Window:'.CASS_NO','DEFPROP')
WOStep = Get_Property(@Window:'.WO_STEP','DEFPROP')
RDSNo = Get_Property(@Window:'.RDS_NO','TEXT')
Reactor = Get_Property(@Window:'.REACTOR', 'TEXT')
Preauthenticated = FALSE$
Begin Case
Case SignEventType EQ 'Sign'
LWIInstAckReq = Xlate('RDS', RDSNo, 'LWI_INST_ACK_REQ', 'X')
If LWIInstAckReq EQ True$ then
Response = RDS_Services('RDSVerifyInst', RDSNo, 'LWI')
If Response EQ False$ then return
end
UnloadInstAckReq = Xlate('RDS', RDSNo, 'UNLOAD_INST_ACK_REQ', 'X')
If UnloadInstAckReq EQ True$ then
Response = RDS_Services('RDSVerifyInst', RDSNo, 'UNLOAD')
If Response EQ False$ then return
end
PostInstAckReq = Xlate('RDS', RDSNo, 'POST_INST_ACK_REQ', 'X')
If PostInstAckReq EQ True$ then
Response = RDS_Services('RDSVerifyInst', RDSNo, 'POST')
If Response EQ False$ then return
end
SupplAckReq = Supplement_Services('UnacknowledgedSupplementCheck', 'RDS', RDSNo, 'UNLOAD')
IF (SupplAckReq NE FALSE$) then
Response = Dialog_Box('NDW_RDS_SUPP_SIG', @Window, RDSNo :@FM: 'UNLOAD' :@FM: FALSE$)
If Response EQ False$ then
return
end else
Preauthenticated = TRUE$
end
end
Override = False$
ReadyToSign = QA_Services('UnloadSignatureReady', RDSNo, @User4, Reactor)
If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage')
If ErrorMsg EQ 'Cassette runtime exceeds three days! An override by a LEAD or SUPERVISOR is required.' then
// Prompt for override
Response = Msg(@Window, '', 'OVERRIDE', '', ErrorMsg)
Begin Case
Case Response EQ 1
Response = True$ ; // User Clicked Override
Case Response EQ 2
Response = False$ ; // User Clicked Cancel
Case Response EQ char(27)
Response = False$ ; // User Pressed Escape Key
End Case
If Response EQ True$ then
OverrideGroups = 'LEAD' : @VM : 'SUPERVISOR'
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4 : @FM : OverrideGroups)
Valid = Response<1>
Username = Response<2>
If Valid then
Override_Services('SetOverride', 'RDS', RDSNo, 'UNLOAD_DTM', Username)
ReadyToSign = True$
Override = True$
end
end
end
end
If (ReadyToSign EQ True$) then
If Preauthenticated EQ False$ Then
If Override EQ False$ then
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW)
Valid = Response<1>
end
end else
Valid = True$
end
If (Valid EQ True$) then
QA_Services('SignUnloadStage', RDSNo, @User4)
end
end
If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage')
ErrMsg(ErrorMsg)
end
Set_Property(@Window, 'SAVEWARN', False$)
Send_Event(@Window, 'READ')
Case SignEventType EQ 'Unsign'
// 1. Check if on hold. If so, then block event and inform user
WOMatKey = WONo:'*':CassNo
WOMatCurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)
IF WOMatCurrStatus = 'HOLD' THEN
ErrorMessage = 'Process Error':@SVM:'Cassette is on Hold and may not be signed off.':CRLF$:CRLF$
ErrMsg(ErrorMessage)
RETURN 0
END
Reactor = XLATE('RDS',RDSNo,'REACTOR','X')
// 2. Check if the reactor will have enough capacity to load this lot. If not then block the event and
// inform user.
CurrChamberCount = Reactor_Services('GetReactorAvailChamberCount', Reactor)
If CurrChamberCount LE 0 then
ErrorMessage = 'Process Error':@SVM:'Reactor ' : Reactor : ' does not have the capacity for this lot.' :CRLF$:CRLF$
ErrMsg(ErrorMessage)
RETURN 0
end
// 3.
// a. For Non-EPP - Check if LWII, LWIS, or FQA has been signed. If so, then block event and inform user
// b. For EPP - Check Clean_Insp actions to see if an inspection or surfscan has been completed
// Also check the FQA signature (MO_QA)
ReactorType = XLATE('RDS',RDSNo,'REACTOR_TYPE','X')
CISigs = Xlate('RDS', RDSNo, 'LWI_CI_SIG', 'X')
Convert @VM to '' in CISigs
IF ReactorType NE 'EPP' THEN
FQASig = Xlate('RDS', RDSNo, 'SUP_VER_SIG', 'X')
END ELSE
WMOutKey = Xlate('RDS', RDSNo, 'WM_OUT_KEY', 'X')
FQASig = Xlate('WM_OUT', WMOutKey, 'SUP_VER_SIG', 'X')
END
If (CISigs NE '') or (FQASig NE '') then
// LWII, LWIS, or FQA already signed. Block unload unsign event.
ErrorMessage = 'Process Error':@SVM:'LWII, LWIS, or FQA already signed. Cannot unsign unload event.' |
: CRLF$ : CRLF$
ErrMsg(ErrorMessage)
Return 0
end
// 3. LEAD/SUPERVISOR standard override
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4 : @FM : 'LEAD' : @VM : 'SUPERVISOR')
Valid = Response<1>
OverrideUser = Response<2>
If Valid then
// 4. Remove RDS Unload signature, date, and time
Set_Property(@Window:'.OP_OUT', 'TEXT', '')
Set_Property(@Window:'.OP_OUT_NAME', 'TEXT', '')
Set_Property(@Window:'.OP_OUT_DATE', 'TEXT', '')
Set_Property(@Window:'.OP_OUT_TIME', 'TEXT', '')
IOOptions = Get_Property(@Window, 'IOOPTIONS')
IOOptions<6> = True$
Set_Property(@Window, 'IOOPTIONS', IOOptions)
Send_Event(@Window, 'WRITE')
IOOptions<6> = False$
Set_Property(@Window, 'IOOPTIONS', IOOptions)
// 5. Remove WO_MAT Unload signature, date, and time
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
SigProf = WOMatRec<WO_MAT_SIG_PROFILE$>
Sigs = WOMatRec<WO_MAT_SIGNATURE$>
SigDTMs = WOMatRec<WO_MAT_SIG_DTM$>
If ReactorType NE 'EPP' then
Locate '1UNLOAD' in SigProf using @VM setting vPos then
Sigs<1, vPos> = ''
SigDTMs<1, vPos> = ''
WOMatRec<WO_MAT_SIGNATURE$> = Sigs
WOMatRec<WO_MAT_SIG_DTM$> = SigDTMs
end
Reactor_Services('DecrementWfrMetrics', RDSNo)
end
// Added by JRO
obj_React_Status('HandleUnloadUnsign',Reactor:@RM:WONo:@RM:CassNo:@RM:RDSNo:@RM:OverrideUser)
Rds_Services('AddComment', RDSNo, 'Unload Stage unsigned from Reactor ' : Reactor)
// 6. Remove '1UNLOAD' material log entry (i.e. WO_MAT<INV...> columns)
InvActions = WOMatRec<WO_MAT_INV_ACTION$>
Locate '1UNLOAD' in InvActions using @VM setting vPos then
WOMatRec<WO_MAT_INV_WH$> = Delete(WOMatRec<WO_MAT_INV_WH$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_LOCATION$> = Delete(WOMatRec<WO_MAT_INV_LOCATION$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_ACTION$> = Delete(WOMatRec<WO_MAT_INV_ACTION$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_DTM$> = Delete(WOMatRec<WO_MAT_INV_DTM$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_USER$> = Delete(WOMatRec<WO_MAT_INV_USER$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_TAG$> = Delete(WOMatRec<WO_MAT_INV_TAG$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_TOOL_ID$> = Delete(WOMatRec<WO_MAT_INV_TOOL_ID$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_LOC$> = Delete(WOMatRec<WO_MAT_INV_LOC$>, 0, vPos, 0)
WOMatRec<WO_MAT_INV_SCAN_ENTRY$> = Delete(WOMatRec<WO_MAT_INV_SCAN_ENTRY$>, 0, vPos, 0)
end
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, True$)
Set_Property(@Window:'.PUB_SIGN', 'TEXT', 'Sign')
end else
Return 0
end
End Case
end event
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -364,4 +394,3 @@ Setup_OLE_Controls:
return