further optimized wip status forms

This commit is contained in:
Infineon\StieberD 2025-01-20 20:47:09 -07:00
parent 49f61982de
commit c8da9ee695
3 changed files with 60 additions and 5 deletions

View File

@ -29,7 +29,7 @@ $Insert REACTOR_LOG_EQUATES
$Insert NICA_ORDERS_EQUATES
Declare function Environment_Services, Database_Services, Error_Services, Logging_Services, Nica_Orders_Services
Declare function Httpclient_Services, SRP_JSON
Declare function Httpclient_Services, SRP_JSON, Reactor_Services, Reactor_Log_Services
Declare subroutine Error_Services, Btree.Extract, Database_Services, Logging_Services, Nica_Orders_Services, Delay
Declare subroutine Httpclient_Services, SRP_JSON, Mona_Services, Service_Services
@ -104,6 +104,56 @@ Service GetOrderUpdates()
Nica_Orders_Services('GetOrderStatusUpdate', OrderId)
Next OrderId
Unlock hSysLists, ServiceKeyID else Null
Nica_Orders_Services('UpdateNicaFlags')
end
end service
Service UpdateNicaFlags()
rv = ''
ErrCode = ''
ReactNos = Reactor_Services('GetReactorNumbers')
Open 'REACTOR' to hReactor then
Open 'REACTOR_LOG' to hReactorLog then
For each ReactNo in ReactNos using @FM
ProveInActive = Reactor_Services('GetProveInActive', ReactNo)
HgCVChecklistActive = (Nica_Orders_Services('GetActiveOrders', 'REACTOR', ReactNo, 'IQS_HGCV_ALARM') NE '')
Open 'REACTOR' to hReactor then
ReadV CacheProveInActive from hReactor, ReactNo, REACTOR_PROVE_IN_ACTIVE$ then
If CacheProveInActive NE ProveInActive then
Lock hReactor, ReactNo then
WriteV ProveInActive on hReactor, ReactNo, REACTOR_PROVE_IN_ACTIVE$ else Null
Unlock hReactor, ReactNo else Null
end
end
end
ReadV CacheHgCVChecklistActive from hReactor, ReactNo, REACTOR_HGCV_CHECKLIST_ACTIVE$ then
If CacheHgCVChecklistActive NE HgCVChecklistActive then
Lock hReactor, ReactNo then
WriteV HgCVChecklistActive on hReactor, ReactNo, REACTOR_HGCV_CHECKLIST_ACTIVE$ else Null
Unlock hReactor, ReactNo else Null
end
end
end
end
CurrModeKey = Xlate('REACTOR_CHILD_KEY_IDS_NG', ReactNo, 'REACT_MODE_KEY_IDS', 'X')
CurrModeKey = CurrModeKey[-1, 'B':@VM]
CurrRLKey = Xlate('REACT_MODE_NG', CurrModeKey, 'START_RL_ID', 'X')
RLChecklistActive = Reactor_Log_Services('GetRlChecklistActive', CurrRlKey)
Open 'REACTOR_LOG' to hReactorLog then
ReadV CacheRlChecklistActive from hReactorLog, CurrRlKey, REACTOR_LOG_CHECKLIST_ACTIVE$ then
If CacheRlChecklistActive NE RLChecklistActive then
Lock hReactorLog, CurrRlKey then
WriteV RlChecklistActive on hReactorLog, CurrRlKey, REACTOR_LOG_CHECKLIST_ACTIVE$ else Null
Unlock hReactorLog, CurrRlKey else Null
end
end
end
end
Next ReactNo
end
end
end service
@ -570,3 +620,4 @@ end service

View File

@ -164,6 +164,7 @@ FORM_CREATE:
IQSData = Database_Services('ReadDataRow', 'CONFIG', 'IQS_VIOL_DATA')
FOR I = StartReact TO EndReact STEP 2
ReactRec = Xlate('REACTOR',I,'','X')
LLDisabled = ReactRec<REACTOR_LL_DISABLED$>
ReactAssign = ReactRec<REACTOR_REACT_ASSIGNMENT$>
@ -248,7 +249,7 @@ FORM_CREATE:
RPanelTitle := ' - PP'
END
Status_ProveIn = Reactor_Services('GetProveInActive', I)
Status_ProveIn = Xlate('REACTOR', I, REACTOR_PROVE_IN_ACTIVE$, 'X')
Status_0311 = XLATE('REACTOR', I, REACTOR_0311_ACTIVE$, 'X')
@ -267,8 +268,9 @@ FORM_CREATE:
end
CurrModeKey = Xlate('REACTOR_CHILD_KEY_IDS_NG', I, 'REACT_MODE_KEY_IDS', 'X')
CurrModeKey = CurrModeKey[-1, 'B':@VM]
CurrRLKey = Xlate('REACT_MODE_NG', CurrModeKey, 'START_RL_ID', 'X')
Status_ReactorPM = Reactor_Log_Services('GetRlChecklistActive', CurrRLKey)
Status_ReactorPM = Xlate('REACTOR_LOG', CurrRLKey, REACTOR_LOG_CHECKLIST_ACTIVE$, 'X')
If Status_ReactorPM EQ '' then Status_ReactorPM = False$
@ -276,7 +278,7 @@ FORM_CREATE:
Set_Property(Window:'.OLE_PIC_':I, 'OLE.Image', '.\BMPS\ActiveReactorPM.png')
end
Status_HgCV_Alarm = (Nica_Orders_Services('GetActiveOrders', 'REACTOR', I, 'IQS_HGCV_ALARM') NE '')
Status_HgCV_Alarm = Xlate('REACTOR', I, REACTOR_HGCV_CHECKLIST_ACTIVE$, 'X')
If Status_HgCV_Alarm EQ True$ then
Set_Property(Window:'.OLE_PIC_':I, 'OLE.Image', '.\BMPS\ActiveProveIn.png')
@ -333,3 +335,4 @@ return

View File

@ -79,3 +79,4 @@ Equ REACTOR_PROVE_IN_ORDER_ID$ To 67
Equ REACTOR_IDLE_STARTUP_REQUIRED$ To 68
Equ REACTOR_IQS_ALARM_DTM$ To 69
Equ REACTOR_IQS_ALARM_TEST$ To 70
Equ REACTOR_HGCV_CHECKLIST_ACTIVE$ To 71