diff --git a/LSL2/OIEVENT/MENU/RDS.MENU.UNLOAD%002FLOAD_EXTRA.SIGNATURE_INFO.json b/LSL2/OIEVENT/MENU/RDS.MENU.UNLOAD%002FLOAD_EXTRA.SIGNATURE_INFO.json index 09e5a43..208ebb2 100644 --- a/LSL2/OIEVENT/MENU/RDS.MENU.UNLOAD%002FLOAD_EXTRA.SIGNATURE_INFO.json +++ b/LSL2/OIEVENT/MENU/RDS.MENU.UNLOAD%002FLOAD_EXTRA.SIGNATURE_INFO.json @@ -5,7 +5,7 @@ }, "body": { "record1": { - "<1>": "\r\ndeclare function dialog_box\r\n\r\nRDSNo = Get_Property(@Window : '.RDS_NO', 'TEXT')\r\nReturnVal = dialog_box( 'NDW_LOAD_UNLOAD_EXTRA', @window, RDSNo)\r\n/*\r\nVoid = set_property( @window, '@ExSigWrite', 0 )\r\nOrigExSigInfo = get_property( @window, '@ExSigInfo' )\r\nReturnVal = dialog_box( 'RDS_UNLOAD_LOAD_EX', @window, OrigExSigInfo )\r\nif ReturnVal <> 'CANCEL' and ( ReturnVal <> OrigExSigInfo ) then\r\n Void = set_property( @window, '@ExSigInfo', ReturnVal )\r\n Void = set_property( @window, '@ExSigWrite', 1 )\r\n @@window->savewarn = 1\r\nend\r\n*/\r\nRETURN 0\r\n" + "<1>": "\r\ndeclare function dialog_box, Get_Property\r\ndeclare subroutine Send_Event, Post_Event, Set_Property\r\n\r\nATRECORD = Get_Property(@Window, 'ATRECORD')\r\nRecCheck = @Record\r\n\r\nRDSNo = Get_Property(@Window : '.RDS_NO', 'TEXT')\r\n\r\nIf ATRECORD NE RecCheck then\r\n OrigIOOptions = Get_Property (@Window, \"IOOPTIONS\")\r\n TempIOOptions = OrigIOOptions\r\n TempIOOptions<6> = 1\r\n Set_Property(@Window, 'IOOPTIONS', TempIOOptions)\r\n Send_Event(@Window, 'WRITE')\r\n Set_Property(@Window, 'IOOPTIONS', OrigIOOptions)\r\nend\r\n\r\nReturnVal = dialog_box( 'NDW_LOAD_UNLOAD_EXTRA', @window, RDSNo)\r\nSet_Property(@window, 'SAVEWARN', 0)\r\nPost_Event(@Window, 'READ')\r\n/*\r\nVoid = set_property( @window, '@ExSigWrite', 0 )\r\nOrigExSigInfo = get_property( @window, '@ExSigInfo' )\r\nReturnVal = dialog_box( 'RDS_UNLOAD_LOAD_EX', @window, OrigExSigInfo )\r\nif ReturnVal <> 'CANCEL' and ( ReturnVal <> OrigExSigInfo ) then\r\n Void = set_property( @window, '@ExSigInfo', ReturnVal )\r\n Void = set_property( @window, '@ExSigWrite', 1 )\r\n @@window->savewarn = 1\r\nend\r\n*/\r\nRETURN 0\r\n" } } } \ No newline at end of file diff --git a/LSL2/OIWIN/RDS.json b/LSL2/OIWIN/RDS.json index 7cc34a9..89e625a 100644 --- a/LSL2/OIWIN/RDS.json +++ b/LSL2/OIWIN/RDS.json @@ -22604,10 +22604,10 @@ "<2>": { "<2,1>": { "<2,1,1>": { - "<2,1,1,1>": "SEND_MESSAGE.MESSAGE_W/ATTACHMENT", - "<2,1,1,2>": "PRINT.CUSTOMER_RDS", - "<2,1,1,3>": "PRINT.FACTORY_LABELS", - "<2,1,1,4>": "UNLOAD/LOAD_EXTRA.SIGNATURE_INFO" + "<2,1,1,1>": "UNLOAD/LOAD_EXTRA.SIGNATURE_INFO", + "<2,1,1,2>": "PRINT.FACTORY_LABELS", + "<2,1,1,3>": "PRINT.CUSTOMER_RDS", + "<2,1,1,4>": "SEND_MESSAGE.MESSAGE_W/ATTACHMENT" } }, "<2,2>": { diff --git a/LSL2/STPROC/NDW_LOAD_UNLOAD_EXTRA_EVENTS.txt b/LSL2/STPROC/NDW_LOAD_UNLOAD_EXTRA_EVENTS.txt index 3d6d40d..1b0885f 100644 --- a/LSL2/STPROC/NDW_LOAD_UNLOAD_EXTRA_EVENTS.txt +++ b/LSL2/STPROC/NDW_LOAD_UNLOAD_EXTRA_EVENTS.txt @@ -63,6 +63,7 @@ Event PUB_SIGN_UNLOAD_EX_1.CLICK() end event Event PUB_SIGN_LOAD_EX_1.CLICK() + RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT') RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) OldReactorNo = RDSRec @@ -406,3 +407,4 @@ return + diff --git a/LSL2/STPROC/RDS_ACTIONS.txt b/LSL2/STPROC/RDS_ACTIONS.txt index 014d199..c4f3ba3 100644 --- a/LSL2/STPROC/RDS_ACTIONS.txt +++ b/LSL2/STPROC/RDS_ACTIONS.txt @@ -624,6 +624,7 @@ return WRITE_RECORD_PRE: + ErrorMsg = '' StartTick = GetTickCount() MetricName = 'WriteRecordPre' @@ -779,7 +780,7 @@ WRITE_RECORD_PRE: Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$) // User is attempting to erase data that is prohibited from being erased Set the FS104 error and block the write. - Error_Services('Add', 'Reactor number cannot be changed or removed once the unload signature is set!') + ErrorMsg = 'Reactor number cannot be changed or removed once the unload signature is set!' OrigFileError = 104:': Reactor number cannot be changed or removed once the unload signature is set!' Status = 0 Record = '' @@ -796,7 +797,7 @@ WRITE_RECORD_PRE: LogData<4> = 'Signature datetime is greater than current datetime!' Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$) - Error_Services('Add', 'Signature datetime is greater than current datetime!') + ErrorMsg = 'Signature datetime is greater than current datetime!' OrigFileError = 104:': Signature datetime is greater than current datetime!' Status = 0 Record = '' @@ -817,7 +818,7 @@ WRITE_RECORD_PRE: LogData<4> = 'Signature datetime is less than a previous signature datetime!' Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$) - Error_Services('Add', 'Signature datetime is less than a previous signature datetime!') + ErrorMsg = 'Signature datetime is less than a previous signature datetime!' OrigFileError = 104:': Signature datetime is less than a previous signature datetime!' Status = 0 Record = '' @@ -832,7 +833,7 @@ WRITE_RECORD_PRE: LogData<4> = 'Cassette runtime exceeds three days!' Logging_Services('AppendLog', ObjLog, LogData, @RM, @FM, False$) - Error_Services('Add', 'Cassette runtime exceeds three days!') + ErrorMsg = 'Cassette runtime exceeds three days!' OrigFileError = 104:': Cassette runtime exceeds three days!' Status = 0 Record = '' @@ -846,11 +847,15 @@ WRITE_RECORD_PRE: EndTick = GetTickCount() Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick) + If ErrorMsg NE '' then + Error_Services('Add', ErrorMsg) + end + return WRITE_RECORD: - + StartTick = GetTickCount() MetricName = 'WriteRecord' @@ -1013,5 +1018,3 @@ Restore_System_Variables: return - - diff --git a/LSL2/STPROC/RDS_SERVICES.txt b/LSL2/STPROC/RDS_SERVICES.txt index 43a1a1f..cbeb7d0 100644 --- a/LSL2/STPROC/RDS_SERVICES.txt +++ b/LSL2/STPROC/RDS_SERVICES.txt @@ -1456,6 +1456,8 @@ end service Service SignUnloadExtra1(RDSNo, LSLUserName) + ErrorMsg = '' + IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then If RowExists('RDS', RDSNo) then RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) @@ -1465,18 +1467,24 @@ Service SignUnloadExtra1(RDSNo, LSLUserName) RDSRec = SRP_Date('Today') RDSRec = SRP_Time('Now') Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) - Reactor = RDSRec If Error_Services('NoError') then + Reactor = RDSRec Reactor_Services('RemoveRDSFromReactorLoad', RDSNo, Reactor, LSLUserName) + end else + ErrorMsg = Error_Services('GetMessage') end end else - Error_Services('Add', 'Unload Extra 1 is not able to be signed at this stage') + ErrorMsg = 'Unload Extra 1 is not able to be signed at this stage' end end else - Error_Services('Add', 'RDS ' : RDSNo : ' does not exist.') + ErrorMsg = 'RDS ' : RDSNo : ' does not exist.' end end else - Error_Services('Add', 'Invalid user passed to Sign Unload Extra 1 routine') + ErrorMsg = 'Invalid user passed to Sign Unload Extra 1 routine' + end + + If ErrorMsg NE '' then + Error_Services('Add', 'Error signing Unload Extra 1 : ' : ErrorMsg) end end service @@ -1484,6 +1492,8 @@ end service Service UnsignUnloadExtra1(RDSNo, LSLUserName) + ErrorMsg = '' + IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then If RowExists('RDS', RDSNo) then RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) @@ -1496,26 +1506,32 @@ Service UnsignUnloadExtra1(RDSNo, LSLUserName) RDSRec = '' RDSRec = '' RDSRec = '' - Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) Reactor = RDSRec + Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) If Error_Services('NoError') then Reactor_Services('AddRDSToReactorLoad', RDSNo, Reactor) + end else + ErrorMsg = Error_Services('GetMessage') end end else - Error_Services('Add', 'Unsign Load Extra 1 is not able to be unsigned.') + ErrorMsg = 'Unsign Load Extra 1 is not able to be unsigned.' end end else - Error_Services('Add', 'Reactor #' : Reactor : ' does not currently have the capacity to be loaded. Unload a lot to allow.') + ErrorMsg = 'Reactor #' : Reactor : ' does not currently have the capacity to be loaded. Unload a lot to allow.' end end else - Error_Services('Add', 'RDS is not assigned to a reactor.') + ErrorMsg = 'RDS is not assigned to a reactor.' end end else - Error_Services('Add', 'RDS ' : RDSNo : ' does not exist.') + ErrorMsg = 'RDS ' : RDSNo : ' does not exist.' end end else - Error_Services('Add', 'Invalid user passed to Unsign Load Extra 1 routine') + ErrorMsg = 'Invalid user passed to Unsign Load Extra 1 routine' + end + + If ErrorMsg NE '' then + Error_Services('Add', ErrorMsg) end end service @@ -1523,6 +1539,8 @@ end service Service SignLoadExtra1(RDSNo,LSLUserName) + ErrorMsg = '' + IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then If RowExists('RDS', RDSNo) then RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) @@ -1538,22 +1556,28 @@ Service SignLoadExtra1(RDSNo,LSLUserName) Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) If Error_Services('NoError') then Reactor_Services('AddRDSToReactorLoad', RDSNo, Reactor) + end else + ErrorMsg = Error_Services('GetMessage') end end else - Error_Services('Add', 'Load Extra 1 is not able to be signed at this stage') + ErrorMsg = 'Load Extra 1 is not able to be signed at this stage' end end else - Error_Services('Add', 'Reactor #' : Reactor : ' does not currently have the capacity to be loaded. Unload a lot to allow.') + ErrorMsg = 'Reactor #' : Reactor : ' does not currently have the capacity to be loaded. Unload a lot to allow.' end end else - Error_Services('Add', 'RDS is not assigned to a reactor.') + ErrorMsg = 'RDS is not assigned to a reactor.' end end else - Error_Services('Add', 'RDS ' : RDSNo : ' does not exist.') + ErrorMsg = 'RDS ' : RDSNo : ' does not exist.' end end else - Error_Services('Add', 'Invalid user passed to Sign Unload Extra 1 routine') + ErrorMsg = 'Invalid user passed to Sign Unload Extra 1 routine' + end + + If ErrorMsg NE '' then + Error_Services('GetMessage') end end service @@ -1561,6 +1585,8 @@ end service Service UnsignLoadExtra1(RDSNo, LSLUserName) + ErrorMsg = '' + IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then If RowExists('RDS', RDSNo) then RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) @@ -1569,19 +1595,25 @@ Service UnsignLoadExtra1(RDSNo, LSLUserName) RDSRec = '' RDSRec = '' RDSRec = '' - Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) Reactor = RDSRec + Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) If Error_Services('NoError') then Reactor_Services('RemoveRDSFromReactorLoad', RDSNo, Reactor, LSLUserName) + end else + ErrorMsg = Error_Services('GetMessage') end end else - Error_Services('Add', 'Unsign Load Extra 1 is not able to be unsigned.') + ErrorMsg = 'Unsign Load Extra 1 is not able to be unsigned.' end end else - Error_Services('Add', 'RDS ' : RDSNo : ' does not exist.') + ErrorMsg = 'RDS ' : RDSNo : ' does not exist.' end end else - Error_Services('Add', 'Invalid user passed to Unsign Load Extra 1 routine') + ErrorMsg = 'Invalid user passed to Unsign Load Extra 1 routine' + end + + If ErrorMsg NE '' then + Error_Services('Add', ErrorMsg) end end service @@ -1589,6 +1621,8 @@ end service Service SignUnloadExtra2(RDSNo,LSLUserName) + ErrorMsg = '' + IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then If RowExists('RDS', RDSNo) then RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) @@ -1598,18 +1632,24 @@ Service SignUnloadExtra2(RDSNo,LSLUserName) RDSRec = SRP_Date('Today') RDSRec = SRP_Time('Now') Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) - Reactor = RDSRec If Error_Services('NoError') then + Reactor = RDSRec Reactor_Services('RemoveRDSFromReactorLoad', RDSNo, Reactor, LSLUserName) + end else + ErrorMsg = Error_Services('GetMessage') end end else - Error_Services('Add', 'Unload Extra 2 is not able to be signed at this stage') + ErrorMsg = 'Unload Extra 2 is not able to be signed at this stage' end end else - Error_Services('Add', 'RDS ' : RDSNo : ' does not exist.') + ErrorMsg = 'RDS ' : RDSNo : ' does not exist.' end end else - Error_Services('Add', 'Invalid user passed to Sign Unload Extra 1 routine') + ErrorMsg = 'Invalid user passed to Sign Unload Extra 1 routine' + end + + If ErrorMsg NE '' then + Error_Services('Add', ErrorMsg) end end service @@ -1617,6 +1657,8 @@ end service Service UnsignUnloadExtra2(RDSNo, LSLUserName) + ErrorMsg = '' + IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then If RowExists('RDS', RDSNo) then RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) @@ -1629,26 +1671,32 @@ Service UnsignUnloadExtra2(RDSNo, LSLUserName) RDSRec = '' RDSRec = '' RDSRec = '' - Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) Reactor = RDSRec + Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) If Error_Services('NoError') then Reactor_Services('AddRDSToReactorLoad', RDSNo, Reactor) + end else + ErrorMsg = Error_Services('GetMessage') end end else - Error_Services('Add', 'Unsign Load Extra 2 is not able to be unsigned.') + ErrorMsg = 'Unsign Load Extra 2 is not able to be unsigned.' end end else - Error_Services('Add', 'Reactor #' : Reactor : ' does not currently have the capacity to be loaded. Unload a lot to allow.') + ErrorMsg = 'Reactor #' : Reactor : ' does not currently have the capacity to be loaded. Unload a lot to allow.' end end else - Error_Services('Add', 'RDS is not assigned to a reactor.') + ErrorMsg = 'RDS is not assigned to a reactor.' end end else - Error_Services('Add', 'RDS ' : RDSNo : ' does not exist.') + ErrorMsg = 'RDS ' : RDSNo : ' does not exist.' end end else - Error_Services('Add', 'Invalid user passed to Unsign Unload Extra 1 routine') + ErrorMsg = 'Invalid user passed to Unsign Unload Extra 1 routine' + end + + If ErrorMsg NE '' then + Error_Services('Add', ErrorMsg) end end service @@ -1656,6 +1704,8 @@ end service Service SignLoadExtra2(RDSNo,LSLUserName) + ErrorMsg = '' + IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then If RowExists('RDS', RDSNo) then RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) @@ -1671,21 +1721,27 @@ Service SignLoadExtra2(RDSNo,LSLUserName) Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) If Error_Services('NoError') then Reactor_Services('AddRDSToReactorLoad', RDSNo, Reactor) + end else + ErrorMsg = Error_Services('GetMessage') end end else - Error_Services('Add', 'Load Extra 2 is not able to be signed at this stage') + ErrorMsg = 'Load Extra 2 is not able to be signed at this stage' end end else - Error_Services('Add', 'Reactor #' : Reactor : ' does not currently have the capacity to be loaded. Unload a lot to allow.') + ErrorMsg = 'Reactor #' : Reactor : ' does not currently have the capacity to be loaded. Unload a lot to allow.' end end else - Error_Services('Add', 'RDS is not assigned to a reactor.') + ErrorMsg = 'RDS is not assigned to a reactor.' end end else - Error_Services('Add', 'RDS ' : RDSNo : ' does not exist.') + ErrorMsg = 'RDS ' : RDSNo : ' does not exist.' end end else - Error_Services('Add', 'Invalid user passed to Sign Unload Extra 2 routine') + ErrorMsg = 'Invalid user passed to Sign Unload Extra 2 routine' + end + + If ErrorMsg NE '' then + Error_Services('Add', ErrorMsg) end end service @@ -1693,6 +1749,8 @@ end service Service UnsignLoadExtra2(RDSNo, LSLUserName) + ErrorMsg = '' + IF LSLUserName NE '' AND RowExists('LSL_USERS', LSLUserName) then If RowExists('RDS', RDSNo) then RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) @@ -1701,19 +1759,25 @@ Service UnsignLoadExtra2(RDSNo, LSLUserName) RDSRec = '' RDSRec = '' RDSRec = '' - Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) Reactor = RDSRec + Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, False$) If Error_Services('NoError') then Reactor_Services('RemoveRDSFromReactorLoad', RDSNo, Reactor, LSLUserName) + end else + ErrorMsg = Error_Services('GetMessage') end end else - Error_Services('Add', 'Unsign Load Extra 2 is not able to be unsigned.') + ErrorMsg = 'Unsign Load Extra 2 is not able to be unsigned.' end end else - Error_Services('Add', 'RDS ' : RDSNo : ' does not exist.') + ErrorMsg = 'RDS ' : RDSNo : ' does not exist.' end end else - Error_Services('Add', 'Invalid user passed to Unsign Unload Extra 1 routine') + ErrorMsg = 'Invalid user passed to Unsign Unload Extra 1 routine' + end + + If ErrorMsg NE '' then + Error_Services('Add', ErrorMsg) end end service @@ -2442,3 +2506,4 @@ ClearCursors: return +