Skip to main content

system.kanoa.event.getAssetProductionEventsSummary

This function requires KanoaOPS module

Description

Returns summarized production data filtered by the given parameters.

Syntax

getProductionEvents(paramsDict)
  • Parameters
      paramsDict (dict)
      - assetId (int)
      - startDate (datetime)
      - endDate (datetime)
      - modeId (int): i.e. 2 ('production') or None for all modes
      - workOrderId (int): None for all workorders
      - strictDates (bool): If true then counts and times will be limited to the range passed in, otherwise counts and times are for the entire run that started or ended during the range
  • Code Example

    # Example Usage:
    startDate = system.date.parse("2024-09-01 00:00:00")
    endDate= system.date.now()
    data = system.kanoa.event.getAssetProductionEventsSummary({'assetId': 510, 'startDate': startDate, 'endDate': endDate, 'strictDates': True})
    data = system.kanoa.utilities.convertDatasetToJSON(data)
    print data
    >>>