added intrusive maintenance flow logic

updated headers for nica order request

Added reactor type support to nica checklists. Refactored flow logic to just use NICA_CHECKLISTS table.

added feature flag support

gated Feature Flags menu item to supervisors

removed debug

added auto comment for intr maint flows on reactor log, intr maint flow id to react servs form, and cancel order on unsign reactor log

added exceptions for lamp and tc services, added control to edit flow id on react servs form, added auto-reactor log comment, added cancel order on unsign event

removed debug

modified NicaOrdersServices to use env variables for group resource name

added logic to filter out service flow ids for servics with is_intrusive set to false, modified security group for feature flag menu, added ability to clear intr main flow id to react serv form

removed unused equates
This commit is contained in:
Infineon\StieberD
2025-02-25 09:39:41 -07:00
parent 8f339106bd
commit 9d4ae3c5b3
38 changed files with 8351 additions and 13489 deletions

View File

@ -52,6 +52,7 @@ $Insert WO_LOG_EQUATES
$Insert REACTOR_DAILY_UPTIME_EQUATES
$Insert REACT_LL_EQUATES
$Insert IQS_VIOL_DATA_EQUATES
$Insert FEATURE_FLAGS_EQUATES
Equ WOCust$ to 2
@ -1884,8 +1885,8 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
ErrorMsg = ''
IF ForceModeChange NE True$ then ForceModeChange = False$
If ( (UserID NE '') and (ReactNo NE '') and (Mode NE '') and (ModeSubCat NE '')) then
CurTime = time()
CurDate = date()
CurTime = Time()
CurDate = Date()
NGPrevModeKey = Xlate('REACTOR_CHILD_KEY_IDS_NG', ReactNo, REACTOR_CHILD_KEY_IDS_REACT_MODE_KEY_IDS$, 'X')<1, 1>
PrevModeRec = Reactor_Services('GetReactCurrModeRec', ReactNo)
SelectedModeRec = Database_Services('ReadDataRow', 'REACTOR_MODES', Mode)
@ -1913,18 +1914,18 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
CommentException = True$
End Case
if ((ModeText NE '') and (Len(ModeText) GE 4)) OR CommentException then
If ((ModeText NE '') and (Len(ModeText) GE 4)) OR CommentException then
NewModeCategory = SelectedModeRec<REACTOR_MODES_MODE_CATEGORY$>
OldRlRecordKey = PrevModeRec<REACT_MODE_NG_START_RL_ID$>
if Reactor_Log_Services('IsMaint', OldRlRecordKey) AND ForceModeChange EQ False$ then
if (NOT(Reactor_Log_Services('IsSigned', OldRlRecordKey))) then
If Reactor_Log_Services('IsMaint', OldRlRecordKey) AND ForceModeChange EQ False$ then
If (NOT(Reactor_Log_Services('IsSigned', OldRlRecordKey))) then
ErrorMsg = 'The current mode cannot be changed until the technician has signed off on the Reactor Log.'
end
end
ModeSubCatID = ''
LOCATE ModeSubCat in SelectedModeRec<REACTOR_MODES_SERVICE_CATEGORIES$> using @VM setting SvcPos then
Locate ModeSubCat in SelectedModeRec<REACTOR_MODES_SERVICE_CATEGORIES$> using @VM setting SvcPos then
NewModeSvcList = SelectedModeRec<REACTOR_MODES_SERVICE_CATEGORY_ID$>
ModeSubCatID = NewModeSvcList<1,SvcPos>
end else
@ -1957,7 +1958,7 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
If ErrorMsg EQ '' and IdleStartupRequired and Mode[1, 2] EQ 'UP' then
ProveInTypes = Reactor_Services('GetActiveProveInTypes', ReactNo)
IdleStartupActive = False$
for each ProveInType in ProveInTypes using @VM setting Idx
For each ProveInType in ProveInTypes using @VM setting Idx
If ProveInType EQ 'IDLE' then
IdleStartupActive = True$
end
@ -1978,6 +1979,17 @@ Service CreateReactModeChange(UserID, ReactNo, Mode, ModeSubCat, ModeText, Force
end
end
If ErrorMsg EQ '' then
IntrMaintFeatureFlag = Xlate('FEATURE_FLAGS', 'NICA_INTRUSIVE_MAINTENANCE', FEATURE_FLAGS.ENABLED$, 'X')
If IntrMaintFeatureFlag EQ True$ then
ActiveIntrusiveMaintChecklists = Nica_Orders_Services('GetActiveOrders', 'REACTOR', ReactNo, 'INTRUSIVE_MAINT')
IntrusiveMaintChecklistActive = (ActiveIntrusiveMaintChecklists NE '')
If ( IntrusiveMaintChecklistActive and (SelE10State _EQC 'Productive') ) then
ErrorMsg = "An Intrusive Maintenance Checklist is active for this reactor and must be completed or overridden in order to change to a productive state."
end
end
end
If ErrorMsg EQ '' then
If Len(Mode) GT 10 and Mode[1, 10] EQ 'CHANGEOVER' then
Nica_Orders_Services('CreateNewOrder', 'REACTOR', ReactNo, 'CHANGEOVER')
@ -3707,5 +3719,3 @@ ClearCursors:
return