11 lines
6.5 KiB
JSON
11 lines
6.5 KiB
JSON
{
|
|
"header": {
|
|
"version": 1,
|
|
"type": "record"
|
|
},
|
|
"body": {
|
|
"record1": {
|
|
"<1>": "declare function memberof, msg, post_event, center_window\r\ndeclare subroutine set_list_box_data, rlist, Set_Property\r\n\r\n$insert logical\r\n$insert REACT_MODE_EQUATES\r\n$insert react_mode_equ\t\t\t;* THESE ARE NOT THE SAME jch\r\n$insert msg_equates\r\n$insert rlist_equates\r\n$insert react_prob_cat_equates\r\n$insert reactor_log_equ\r\n\r\n* CreateParam is the reactor number THEN '*' THEN the following\r\n\r\n\r\nReactor\t\t\t\t= CreateParam[1,'*']\r\nWo\t\t\t\t\t= CreateParam[COL2()+1,'*']\r\nForceModeChange \t= CreateParam[COL2()+1,'*']\r\nFourthParm\t\t\t= CreateParam[COL2()+1,'*']\r\n\t\t\t\r\nLeakLampAutoFlag\t= (FourthParm = 1 )\r\n\r\nVoid = Set_Property( @WINDOW, '@LeakLampAutoFlag', LeakLampAutoFlag )\r\n\r\nNotSignedRL = 0\r\n\r\nIF INDEX(CreateParam,'CENTER',1 ) THEN\r\n void = center_window( @WINDOW )\r\nEND ELSE\r\n Void = Set_Property( @WINDOW, 'VISIBLE', 1 )\r\nEND\r\n\r\n* * * * Added 3/27/2004 John C. Henry - J.C. Henry Inc.\t(Added popup with reactor status codes & descriptions)\r\n\r\nPopupData = XLATE('SYSREPOSPOPUPS','LSL2**REACTOR_MODE',8,'X')\r\nStatusDescs = ''\r\nFOR I = 1 TO COUNT(PopupData,@VM) + (@VM NE '')\r\n\tStatusDesc = PopupData<1,I,2>\r\n\tLocate StatusDesc In StatusDescs By 'AL' Using @FM Setting POS ELSE\r\n\t\tStatusDescs = INSERT(StatusDescs,Pos,0,0,StatusDesc)\r\n\tEND\r\nNEXT I\r\n\r\n.MODE->LIST = StatusDescs\r\n\r\n* * * * End of changes on 3 27/2004\r\n\r\n\r\nSet_List_Box_Data( @WINDOW )\r\n\r\nIF memberof( @USER4, 'DATA_ENTRY' ) OR memberof( @USER4, 'SUPERVISOR' ) OR memberof( @USER4, 'MAINTENANCE' ) THEN\r\n\r\n\tIF Reactor NE '' THEN\r\n\t\t* called from status window and createparam is the reactor number\r\n\t\t* so simply READ and lock\r\n \r\n\t\tOPEN 'CONFIG' TO ConfigTable ELSE\r\n\t\t\tVoid = msg( '', 'Unable to open CONFIG table...' )\r\n\t\t\tRETURN 0\r\n\t\tEND\r\n\t \r\n\t\tLOCK ConfigTable, 'REACT_MODE':Reactor THEN\r\n\t\t\r\n\t\t\tIF ForceModeChange THEN\r\n\t\t\t\t.cancel->enabled = FALSE$\r\n\t\t\t\t.apply->enabled = TRUE$\r\n\t\t\tEND\r\n\t\t\t\r\n\t\tEND ELSE\r\n\t\t\t.mode->enabled = FALSE$\r\n\t\t\t.reactmodesvc->enabled = FALSE$\r\n\t\t\t.cancel->text = 'OK'\t \r\n\t\t\tMsgInfo = ''\r\n\t\t\tMsgInfo<mtext$> = 'Reactor ':Reactor:' is currently being set to another mode...'\r\n\t\t\tMsgInfo<micon$> = '!'\r\n\t\t\tNotSignedRL = 1\r\n\t\t\tVoid = msg( '', MsgInfo )\r\n\t\tEND\r\n\t\t\r\n\t\tGOSUB DoRead\r\n\t\tGOSUB LoadProbCat\r\n\t \r\n\tEND ELSE\r\n\t\t * let them enter the reactor number and get a lock on the onchange event\r\n\t\t.reactor_no->enabled = TRUE$\r\n\t\t\r\n\tEND\t;* End of check for Non-Null Reactor No \r\n\t\r\n\t\r\nEND ELSE\r\n\r\n\t.mode->enabled = FALSE$\r\n\t.reactmodesvc->enabled = FALSE$\r\n\t.cancel->text = 'OK'\r\n\t\r\n\tGOSUB DoRead\r\n\tGOSUB LoadProbCat\r\n\t\r\nEND\t;* End of check for Groups allowed to change\r\n\r\n\r\nIF Reactor ELSE\r\n\t void = post_event( @WINDOW:'.REACTOR_NO', 'GOTFOCUS', '' )\r\n\tvoid = Set_Property( @WINDOW:'.REACTOR_NO', 'FOCUS', 1 ) \r\nEND\r\n\r\nRLID = .rlid->text\r\n\r\nIF ( RLID <> '' ) THEN\r\n\t.rl_button->visible = 1\r\n\tOPEN 'REACTOR_LOG' TO RLTable ELSE\r\n\t\tmsg( '', 'Unable to open REACTOR_LOG...' )\r\n\t\tRETURN 0\r\n\tEND\r\n\t\r\n\tREAD RLRec from RLTable, RLID THEN\r\n\t\r\n\t\tIF RLRec<reactor_log_tech_sig$> = '' THEN\r\n\t\t\r\n\t\t\t* DO NOT ALLOW A MODE CHANGE CAUSE THE REACTOR LOG IS STILL OPEN\r\n\t\t\t\r\n\t\t\tMsgInfo = ''\r\n\t\t\tMsgInfo<mtext$> = 'You are not allowed to change the mode because the maintenance tech has not signed off on the reactor log entry...'\r\n\t\t\tMsgInfo<micon$> = '!'\r\n\t\t\t.mode->enabled = 0\r\n\t\t\tNotSignedRL = 1\r\n\t\t\tVoid = msg( '', MsgInfo )\r\n\t\t\t\r\n\t\tEND ELSE\r\n\t\t\r\n\t\t\t* ALLOW A MODE CHANGE CAUSE IT HAS BEEN SIGNED BY A MAINTENANCE TECHNICIAN\r\n\t\t\t\r\n\t\tEND\r\n\t\t\r\n\tEND ELSE\r\n\t\t* DO NOTHING CAUSE SOME MAINT GUY MUST HAVE DELETED THE ENTRY\r\n\tEND\r\n \r\nEND\r\n\r\nIF LeakLampAutoFlag and ( NotSignedRL = 0 ) THEN\r\n\r\n\t.reactor_no->text\t\t= Reactor\r\n\t.mode->text\t\t\t\t= 'Maintenance (Sched)'\r\n\t.reactmodesvc->visible\t= 1\r\n\t.reactmodesvc->text\t\t= ' 43 | Scheduled Service'\r\n\tVoid = Post_Event( @WINDOW:'.APPLY', 'CLICK' )\r\n\t\r\nEND ELSE\r\n\r\n\tIF LeakLampAutoFlag THEN\r\n\t\tVoid = Post_Event( @WINDOW:'.CANCEL', 'CLICK' ) \r\n\tEND\r\n\t\r\nEND\r\n\r\nRETURN 0\r\n\r\n\r\n* * * * * * *\r\nDoRead:\r\n* * * * * * *\r\n\r\nRec = XLATE( 'CONFIG', 'REACT_MODE':Reactor, '', 'X' )\r\n\r\nService\t= Rec<Service$>\r\nNote\t= Rec<Note$>\r\n\r\n\r\nSet_Property(@WINDOW:'.REACTOR_NO','TEXT', Reactor)\r\nSet_Property(@WINDOW:'.USERNAME','TEXT', Rec<Username$>)\r\nSet_Property(@WINDOW:'.DATE','TEXT', Rec<Date$>)\r\nSet_Property(@WINDOW:'.TIME','TEXT', Rec<Time$>)\r\nSet_Property(@WINDOW:'.MODE','TEXT', Rec<Mode$>)\r\nSet_Property(@WINDOW, '@Mode', Rec<Mode$> )\r\nSet_Property(@WINDOW:'.RUID','TEXT', Rec<ReactUtilID$>)\r\nSet_Property(@WINDOW:'.RLID','TEXT', Rec<ReactorLogID$>)\r\nSet_Property(@WINDOW:'.WO','TEXT', Wo)\r\n \r\nIF Service THEN\r\n\tSet_Property(@WINDOW:'.REACTMODESVC','VISIBLE',TRUE$)\r\n\tSet_Property(@WINDOW:'.SERV_LABEL','VISIBLE',TRUE$)\r\n\tSet_Property(@WINDOW:'.REACTMODESVC','TEXT', Service)\r\n\tSet_Property(@WINDOW:'.REACTMODESVC','ENABLED', 0)\t\t\t;* Do not allow them to change the service until they change the mode\r\nEND\r\n\r\nRETURN\r\n\r\n* * * * * * *\r\nLoadProbCat:\r\n* * * * * * *\r\n\r\nOPEN 'REACT_PROB_CAT' TO RPCTable ELSE\r\n\tmsg( '', 'Unable to open REACT_PROB_CAT' )\r\n\tRETURN 0\r\nEND\r\n\r\nStmt = 'SELECT REACT_PROB_CAT BY REACTOR_PROBLEM_CATEGORY'\r\nrlist( Stmt, target_activelist$, '', '', '' )\r\n\r\nList = ''\r\nIF @reccount THEN\r\n\tEof = FALSE$\r\n\tNumKeys = @reccount\r\n\tCnt = 0\r\n\t\r\n\tloop\r\n\t\tREADNEXT RId ELSE Eof = TRUE$\r\n\tuntil Eof\r\n\t\r\n\t\tREAD RPRec from RPCTable, RId ELSE\r\n\t\t\tVoid = msg( '', 'Unable to READ REACT_PROB_CAT ':RId )\r\n\t\t\tRETURN 0\r\n\t\t END\r\n\t\t \r\n\t\tTvar = ''\r\n\t\tExtraSpace = ''\r\n\t\tExtraSpace = ( len( RId ) = 1 )\r\n\t\tTvar = fmt( RId, 'C#5')\r\n\t\t\r\n\t\tIF ExtraSpace THEN\r\n\t\t\tTvar:= ' '\r\n\t\tEND\r\n\t\t\r\n\t\tTvar := fmt( ' ', 'L#3' ):'|':fmt( ' ', 'L#3'):RPRec<react_prob_cat_reactor_problem_category$> \r\n\t\tList<-1> = Tvar\r\n\t\t\r\n\trepeat\r\nEND\r\n\r\n.reactmodesvc->list = list\r\n\r\nRETURN\r\n*===========================================================================*"
|
|
}
|
|
}
|
|
} |