Alarm trigger with NICA_ORDERS table
solution tested and ready for deployment updated SRP_Git_Services to handle creating local copies of inherited entities updated HgCV OCAP order trigger to also look for active prove-in orders moved error services common into sysprog to avoid compilation issues
This commit is contained in:
		| @ -14,12 +14,13 @@ Declare Subroutine obj_Tables, Print_RootCause_Analysis, Database_Services, obj_ | ||||
| Declare Subroutine ErrMsg, Send_Message, Set_Property, Send_Event, Btree.Extract, obj_AppWindow, Dialog_Box, Yield | ||||
| Declare Subroutine obj_Notes, Security_Err_Msg, End_Window, Forward_Event, Start_Window, obj_Reactor_Log, obj_Post_Log | ||||
| Declare Subroutine Reactor_Log_Events, Reactor_Log_Services, Error_Services, React_Servs_Services, Reactor_Services | ||||
| Declare Subroutine Override_Log_Services, SRP_List | ||||
| Declare Subroutine Override_Log_Services, SRP_List, Nica_Orders_Services | ||||
|  | ||||
| Declare Function Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals, EntID, Repository, NextKey | ||||
| Declare Function Send_Message, Msg, Security_Check, obj_React_Item, Select_Into, MemberOf, Create_Dialog, obj_Calendar | ||||
| Declare Function GetAsyncKeyState, obj_Tables, MemberOf, Environment_Services, Database_Services, Rds_Services | ||||
| Declare function Reactor_Services, Error_Services, React_Servs_Services, Reactor_Log_Services, Send_Event, SRP_List | ||||
| Declare Function Reactor_Services, Error_Services, React_Servs_Services, Reactor_Log_Services, Send_Event, SRP_List | ||||
| Declare Function Nica_Orders_Services | ||||
|  | ||||
| $Insert MSG_EQUATES | ||||
| $Insert APPCOLORS | ||||
| @ -676,8 +677,9 @@ TechSign: | ||||
| 		If Valid then | ||||
| 			SuccessfulSign = Reactor_Log_Services('SignReactorLog', ReactorLogNo, @USER4) | ||||
| 			If SuccessfulSign EQ 0 then | ||||
| 				Error_Services('DisplayError')				 | ||||
| 				ActiveChecklist = Xlate('REACTOR_LOG', ReactorLogNo, REACTOR_LOG_CHECKLIST_ACTIVE$, 'X') | ||||
| 				Error_Services('DisplayError') | ||||
| 				ActiveRlNicaOrderIds = Nica_Orders_Services('GetActiveOrders', 'REACTOR_LOG', ReactorLogNo) | ||||
| 				ActiveChecklist      = (ActiveRlNicaOrderIds NE '') | ||||
| 				If ActiveChecklist then | ||||
| 					OverrideGroups    = 'MAINTENANCE':@VM:'SUPERVISOR' | ||||
| 					UserMsg           = "Reactor Log PM must be processed in NICA. Override required from a member of " | ||||
| @ -685,22 +687,14 @@ TechSign: | ||||
| 					UserVerification  = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:OverrideGroups:@FM:'':@FM:UserMsg) | ||||
| 					Override          = UserVerification<1> | ||||
| 					If Override EQ True$ then | ||||
| 						PmOrderIds  = Xlate('REACTOR_LOG', ReactorLogNo, REACTOR_LOG_CHECKLIST_ORDER_ID$, 'X') | ||||
| 						PmOrderList = SRP_List('Create', PmOrderIds, @VM) | ||||
| 						PmTypes     = Xlate('REACTOR_LOG', ReactorLogNo, REACTOR_LOG_CHECKLIST_TYPE$, 'X') | ||||
| 						PmTypeList  = SRP_List('Create', PmTypes, @VM) | ||||
|  | ||||
| 						ResponseComment = Dialog_Box('NDW_ADD_COMMENT', @WINDOW)<2> | ||||
| 						 | ||||
| 						ResponseComment = '' | ||||
| 						For each PmType in PmTypes using @VM setting Idx | ||||
| 							PmOrderId = SRP_List('GetAt', PmOrderList, Idx) | ||||
| 							Reactor_Log_Services('CancelReactorLogPMOrder', ReactorLogNo, PmOrderId) | ||||
| 							If ResponseComment NE '' then | ||||
| 								ResponseComment := ', ' | ||||
| 							end | ||||
| 							ResponseComment := PmType | ||||
| 						Next ProveInType | ||||
| 						ResponseComment        = '' | ||||
| 						ActiveRlNicaOrderTypes = Xlate('NICA_ORDERS', ActiveRlNicaOrderIds, 'ORDER_TYPE', 'X') | ||||
| 						For each ActiveRlNicaOrderId in ActiveRlNicaOrderIds using @VM setting Idx | ||||
| 							Nica_Orders_Services('CancelOrder', ActiveRlNicaOrderId) | ||||
| 							If ResponseComment NE '' then ResponseComment := ', ' | ||||
| 							ResponseComment := ActiveRlNicaOrderTypes<0, Idx> | ||||
| 						Next ActiveRlNicaOrderId | ||||
| 						 | ||||
| 						Override_Log_Services('Create', 'REACTOR_LOG', ReactorLogNo, UserVerification<2>, ResponseComment, 'REACTOR_LOG_PM') | ||||
| 						 | ||||
| @ -732,7 +726,6 @@ TechSign: | ||||
| 				Error_Services('DisplayError') | ||||
| 			end | ||||
| 		end | ||||
| 		 | ||||
| 	end | ||||
| 	 | ||||
| RETURN | ||||
| @ -1666,3 +1659,4 @@ ColorRemRiTable: | ||||
| return | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user