added logic to RDS_ACTIONS to restore load signatures if erased unexpectedly

refactored solution to leverage the LOT and LOT_EVENT tables

minor fix
This commit is contained in:
Infineon\StieberD
2024-11-05 13:35:42 -07:00
parent b84cfb970f
commit 24a246a99b
7 changed files with 287 additions and 40 deletions

View File

@ -86,8 +86,10 @@ 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 Dialog_Box, Qa_Services, Obj_React_Ll, Start_Window, obj_React_Status, Reactor_Services, Rds_Services
Declare subroutine Lot_Services
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 Datetime
SubclassInfo = Form_Services('FindSubclassControl')
Subclass = SubclassInfo<1>
@ -396,23 +398,17 @@ Event PUB_SIGN.CLICK()
ErrMsg(ErrorMessage)
Return 0
end
// 3. Lead/Supervisor/Engineer/EngTech override
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4 : @FM : 'LEAD' : @VM : 'SUPERVISOR':@VM:'ENGINEER':@VM:'ENG_TECH')
Valid = Response<1>
OverrideUser = Response<2>
If Valid then
// 4. Remove RDS Unload signature, date, and time
Set_Property(@Window:'.OP_IN', 'TEXT', '')
Set_Property(@Window:'.OP_IN_NAME', 'TEXT', '')
Set_Property(@Window:'.OP_IN_DATE', 'TEXT', '')
Set_Property(@Window:'.OP_IN_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
Lot_Services('CreateLotEvent', RDSNo, 'RDS', Datetime(), 'UNSIGN_LOAD', 'Load stage unsigned', Reactor, '', '', '', @User4)
// 4. 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$>
@ -424,7 +420,8 @@ Event PUB_SIGN.CLICK()
WOMatRec<WO_MAT_SIG_DTM$> = SigDTMs
obj_React_Status('HandleLoadUnsign',Reactor:@RM:WONo:@RM:CassNo:@RM:RDSNo:@RM:OverrideUser)
end
// 6. Remove '1LOAD' material log entry (i.e. WO_MAT<INV...> columns)
// 5. Remove '1LOAD' material log entry (i.e. WO_MAT<INV...> columns)
InvActions = WOMatRec<WO_MAT_INV_ACTION$>
Locate '1LOAD' in InvActions using @VM setting vPos then
WOMatRec<WO_MAT_INV_WH$> = Delete(WOMatRec<WO_MAT_INV_WH$>, 0, vPos, 0)
@ -439,10 +436,24 @@ Event PUB_SIGN.CLICK()
end
Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRec, True$, False$, True$)
// 6. Remove RDS Unload signature, date, and time
// NOTE: This needs to occur before item #5 to avoid RDS_ACTIONS restoring the load signature
Set_Property(@Window:'.OP_IN', 'TEXT', '')
Set_Property(@Window:'.OP_IN_NAME', 'TEXT', '')
Set_Property(@Window:'.OP_IN_DATE', 'TEXT', '')
Set_Property(@Window:'.OP_IN_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)
Reactor = Get_Property(@Window:'.REACTOR', 'TEXT')
Rds_Services('AddComment', RDSNo, 'Load Stage Unsigned from Reactor ' : Reactor)
ReactorRec = Database_Services('ReadDataRow', 'REACTOR', Reactor)
PreviousRotrOverrideRds = ReactorRec<REACTOR_PREVIOUS_ROTR_OVERRIDE_RDS$>
// Check if ROTR override was preformed when signing this load
If (PreviousRotrOverrideRds EQ RDSNo) then
// Reset the override flag
@ -456,7 +467,8 @@ Event PUB_SIGN.CLICK()
If ReactorType EQ 'EPP' then
Reactor_Services('DecrementWfrMetrics', RDSNo)
end
Set_Property(@Window:'.PUB_SIGN', 'TEXT', 'Sign')
Set_Property(@Window:'.PUB_SIGN', 'TEXT', 'Sign')
end else
Return 0
end
@ -659,3 +671,4 @@ return