further optimized wip status forms
This commit is contained in:
@ -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,11 +104,61 @@ 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
|
||||
|
||||
|
||||
Service GetActiveOrders(EntityType=ENTITY_TYPES, EntityId, OrderTypes=ORDER_TYPES)
|
||||
|
||||
Response = Nica_Orders_Services('GetOrderIds', EntityType, EntityID, OrderTypes, '#cancelled', False$)
|
||||
@ -570,3 +620,4 @@ end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user