Merged PR 11157: Removed setting the order type in GetOrderStatusUpdate service. Added more lo...

Removed setting the order type in GetOrderStatusUpdate service. Added more logging to CreateNewOrder service.
This commit is contained in:
Stieber Daniel (CSC FI SPS MESLEO) 2025-02-18 22:26:23 +01:00
parent 31d66da7d2
commit 806842fa54

View File

@ -250,6 +250,15 @@ Service CreateNewOrder(EntityType=ENTITY_TYPES, EntityID, OrderType=ORDER_TYPES)
end else end else
NicaOrderRec<NICA_ORDERS.PROGRESS_PERCENTAGE$> = 100 NicaOrderRec<NICA_ORDERS.PROGRESS_PERCENTAGE$> = 100
end end
LogNicaOrderRec = NicaOrderRec
Swap @FM with ',' in LogNicaOrderRec
LogData = ''
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
LogData<3> = 'Nica order record to write: ':LogNicaOrderRec
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
Database_Services('WriteDataRow', 'NICA_ORDERS', OrderId, NicaOrderRec, True$, False$, False$) Database_Services('WriteDataRow', 'NICA_ORDERS', OrderId, NicaOrderRec, True$, False$, False$)
If Error_Services('NoError') then If Error_Services('NoError') then
If ( (OrderType _EQC 'INITIATE_IDLE') and (EntityType _EQC 'REACTOR') ) then If ( (OrderType _EQC 'INITIATE_IDLE') and (EntityType _EQC 'REACTOR') ) then
@ -553,7 +562,6 @@ Service GetOrderStatusUpdate(OrderId)
ObjResponseJson = '' ObjResponseJson = ''
If SRP_JSON(ObjResponseJson, 'Parse', HttpResponseJson) EQ '' then If SRP_JSON(ObjResponseJson, 'Parse', HttpResponseJson) EQ '' then
IsComplete = SRP_JSON(ObjResponseJson, 'GetValue', 'isComplete') IsComplete = SRP_JSON(ObjResponseJson, 'GetValue', 'isComplete')
NicaOrderRec<NICA_ORDERS.ORDER_TYPE$> = SRP_JSON(ObjResponseJson, 'GetValue', 'type')
NicaOrderRec<NICA_ORDERS.ORDER_STATUS$> = SRP_JSON(ObjResponseJson, 'GetValue', 'state') NicaOrderRec<NICA_ORDERS.ORDER_STATUS$> = SRP_JSON(ObjResponseJson, 'GetValue', 'state')
NicaOrderRec<NICA_ORDERS.IS_COMPLETE$> = IsComplete NicaOrderRec<NICA_ORDERS.IS_COMPLETE$> = IsComplete
If IsComplete EQ False$ then If IsComplete EQ False$ then