Skip to main content

system.mes.oee.findOeeProductionRecords

Description

Retrieves OEE Production Records based on the specified pagination, sort, and column constraint parameters.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.findOeeProductionRecords(**queryRequest)

Parameters

Using Python keyword arguments, a Query Request can be passed to the findOeeProductionRecords function without specifying each parameter individually. Please refer to the Query Request documentation for a list of parameters.

ParameterTypeNullableDescription
queryRequestQuery RequestFalseA Query Request with the desired pagination, sorting, and filtering parameters.

Returns

Returns a Query Result object with the following properties:

NameTypeDescription
contentList<OeeProductionRecord>The list of all records found that meet the specified criteria
totalPagesIntegerIf pagination is used, this is the number of total pages of records in the database for the specified page size.
totalElementsLongIf pagination is used, this is the number of records in the database that meet the specified criteria.
pageSizeIntegerIf pagination is used, this is the specified page size.
pageIndexIntegerIf pagination is used, this is the specified page index.
hasContentBooleanTrue if any records were found that meet the specified criteria.
isFirstBooleanIf pagination is used, this is true if the first page was returned.
isLastBooleanIf pagination is used, this is true if the last page was returned.
hasNextBooleanIf pagination is used, this is true if there is a page of content available after this one.
hasPreviousBooleanIf pagination is used, this is true if there is a page of content available before this one.

Each OeeProductionRecordDTO in content has the following properties:

NameTypeNullableDescriptionDefault Value
idStringTrueThe id of the OEE Production Recordnull
locationIdStringFalseIdentifier of the associated location where this OEE production record was capturednull
locationPathStringTruePath of the location where this OEE production record was capturednull
locationNameStringTrueName of the associated locationnull
statusStatusFalseStatus of the OEE production record (e.g., running, faulted, canceled, complete)UNKNOWN
startDateInstantFalseStart date and time of the OEE production recordInstant.now()
endDateInstantTrueEnd date and time of the OEE production recordnull
totalDurationSecDoubleFalseTotal duration of the OEE production record in seconds0.0
performanceReasonIdStringTrueThe id of the associated performance reason, if applicablenull
performanceReasonNameStringTrueThe name of the associated performance reason, if applicablenull
performanceReasonPathStringTrueThe path of the associated performance reason, if applicablenull
infeedCountDoubleFalseTotal number of infeed units during this record period0.0
expectedInfeedCountDoubleFalseExpected number of infeed units during this record period0.0
qualityStrategyOeeQualityStrategyFalseQuality Strategy for this OEE Production RecordWASTE_COUNT
outfeedCountDoubleFalseTotal number of outfeed units recorded during this period0.0
infeedCountUnitOfMeasureIdStringTrueIdentifier of the unit of measure for the infeed countnull
infeedCountUnitOfMeasureNameStringTrueName of the unit of measure for the infeed countnull
infeedCountUnitOfMeasureSymbolStringTrueSymbol of the unit of measure for the infeed countnull
infeedRateTimeUnitsTimeUnitFalseUnit of measure for the machine infeed rate & standard rateMINUTES
stateRecordIdStringTrueIdentifier of the associated state recordnull
standardRateDoubleTrueThe standard rate for this record0.0
productionOrderIdStringTrueThe id of the production order associated with this OEE production recordnull
productionOrderNameStringTrueThe name of the production order associated with this OEE production recordnull
notesStringTrueNotes associated with the OEE Production Recordnull
enabledbooleanTrueIndicates whether the OEE Production Record is enabledtrue
spare1StringTrueExtra field 1null
spare2StringTrueExtra field 2null
spare3StringTrueExtra field 3null

Code Examples

Here is an example of how to use a Query Request to retrieve the first ten OEE production records created in 2025, sorted by start date.

# Generate the object structure for a new query request
queryRequest = system.mes.query.newQueryRequest()

# Set the basic attributes of the query request
queryRequest['pageSize'] = 10
queryRequest['pageIndex'] = 0

queryRequest['sortFields'] = ['startDate']
queryRequest['sortDirections'] = ['Ascending']

# Generate the object structure for a filter for the query request
filterRequest = system.mes.query.newFilterRequest()
filterRequest['field'] = 'startDate'
filterRequest['condition'] = 'between'
filterRequest['minDateValue'] = '2025-01-01T00:00:00Z' # OR system.date.getDate(2025, 0, 1)
filterRequest['maxDateValue'] = '2026-01-01T00:00:00Z' # OR system.date.getDate(2026, 0, 1)

filters = [filterRequest]

queryRequest['filters'] = filters

# Retrieve the OEE production records that match the filter
result = system.mes.oee.findOeeProductionRecords(**queryRequest)

# Output the OEE production records that match the filter
print(result)