Skip to end of metadata
Go to start of metadata

Overview

This script function can be used to get all lots currently available at the specified equipment.

 Click here to see script examples...
Script Example - Object Aggregate Functions
Code Snippet
eqPath = '[global]\Nuts Unlimited\Folsom\Receiving\Nut Storage Silos\Peanut Silo'
lotInventory = system.mes.getLotInventoryByEquipment(eqPath)
print lotInventory
if lotInventory!= None:
    netQuant = lotInventory.getNetQuantitySum()
    inQuant  = lotInventory.getInQuantitySum()
    outQuant = lotInventory.getScheduledSum()
    schedule = lotInventory.getScheduledSum()
    print " Net Quantity Sum: %f\n In Quantity Sum: %f
\n Out Quantity Sum: %f\n Scheduled Sum:%f" % (netQuant, inQuant, outQuant, schedule)
>>>
[P1000 - 1 (23d33501-e774-4045-90bb-b4d1fde37d9a), P1001 - 1 (a3a466bb-3a10-4305-9d7a-4ccbf08b2ae3), P1002 - 2 (8218a5ba-4fc9-4667-b8f4-8ed44c58780b)]
 Net Quantity Sum: 5850.000000
 In Quantity Sum: 8450.000000
 Out Quantity Sum: 2600.000000
 Scheduled Sum:0.000000
>>>
Script Example - Accessing Individual Lot Objects
Code Snippet
eqPath = '[global]\Nuts Unlimited\Folsom\Receiving\Nut Storage Silos\Peanut Silo'
lotInventory = system.mes.getLotInventoryByEquipment(eqPath)
print lotInventory
for lotSummary in lotInventory:
    lotUUID = lotSummary.getMaterialLotUUID()
    lotNo = lotSummary.getLotNumber()
    lotSeq = lotSummary.getLotSequence()
    matUUID = lotSummary.getMaterialUUID()
    matName = lotSummary.getMaterialName()
    matDescription = lotSummary.getMaterialDescription()
    inQuant = lotSummary.getInQuantity()
    outQuant = lotSummary.getOutQuantity()
    schedule = lotSummary.getScheduled()
    available = lotSummary.getAvailable()
    netQuant = lotSummary.getNetQuantity()
    units = lotSummary.getUnits()
    locationLink = lotSummary.getLocationLink()
    print "lot uuid: %s, lot number: %s, lot sequence: %d, material UUID: %s, 
material name: %s, material Description: %s, In Quantity: %f, 
Out Quantity: %f, schedule: %f, available: %f, net quantity: %f, units: %s, 
locationLink: %s" % (lotUUID, lotNo, lotSeq, matUUID, matName, matDescription, 
inQuant, outQuant, schedule, available, netQuant, units, locationLink)
Jython 2.5.3 (v2.5.3:3d2dbae23c52+, Nov 17 2012, 11:51:23) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_91
>>> 
[P1000 - 1 (23d33501-e774-4045-90bb-b4d1fde37d9a), P1001 - 1 (a3a466bb-3a10-4305-9d7a-4ccbf08b2ae3), P1002 - 2 (8218a5ba-4fc9-4667-b8f4-8ed44c58780b)]
lot uuid: 23d33501-e774-4045-90bb-b4d1fde37d9a, lot number: P1000, lot sequence: 1, material UUID: 4f77a399-c0d0-42e5-89fb-075ca5a208df, material name: Bulk Peanuts, material Description: , In Quantity: 5000.000000, Out Quantity: 2600.000000, schedule: 0.000000, available: 2400.000000, net quantity: 2400.000000, units: lbs, locationLink: Peanut Silo
lot uuid: a3a466bb-3a10-4305-9d7a-4ccbf08b2ae3, lot number: P1001, lot sequence: 1, material UUID: 4f77a399-c0d0-42e5-89fb-075ca5a208df, material name: Bulk Peanuts, material Description: , In Quantity: 2500.000000, Out Quantity: 0.000000, schedule: 0.000000, available: 2500.000000, net quantity: 2500.000000, units: lbs, locationLink: Peanut Silo
lot uuid: 8218a5ba-4fc9-4667-b8f4-8ed44c58780b, lot number: P1002, lot sequence: 2, material UUID: 4f77a399-c0d0-42e5-89fb-075ca5a208df, material name: Bulk Peanuts, material Description: , In Quantity: 950.000000, Out Quantity: 0.000000, schedule: 0.000000, available: 950.000000, net quantity: 950.000000, units: lbs, locationLink: Peanut Silo
>>> 
 system.mes.getLotInventoryByEquipment(equipmentUUID, excludeScheduledRequestSegmentUUID)
Description

Get all lots currently available at the specified equipment.

Syntax

system.mes.getLotInventoryByEquipment(equipmentUUID, excludeScheduledRequestSegmentUUID)

 

  • Parameters

String equipmentUUID - The UUID of the equipment to return the available lot details for.

String excludeScheduledRequestSegmentUUID - Optionally, this is a UUID of a request segment to exclude from the results.

  • Returns

MES Lot Quantity Summary List - A collection object containing information about each lot at the specified equipment.

  • Scope

All

 system.mes.getLotInventoryByEquipment(equipmentPath)
Description

Get all lots currently available at the specified equipment.

Syntax

system.mes.getLotInventoryByEquipment(equipmentPath)

 

  • Parameters

String equipmentPath - Equipment path of the equipment to return the lot inventory information.

  • Returns

MES Lot Quantity Summary List - A collection object containing information about each lot at the specified equipment.

  • Scope

All

 system.mes.getLotInventoryByEquipment(equipmentPath, includeSupplementalEquipment)
Description

Get all lots currently available at the specified equipment. Includes the option to include Supplemental Equipment as objects to load (default setting is False = not included).

Syntax

system.mes.getLotInventoryByEquipment(equipmentPath, includeSupplementalEquipment)

 

  • Parameters

String equipmentPath - Equipment path of the equipment to return the lot inventory information.

Boolean includeSupplementalEquipment - If True, the lots in Supplemental Equipment will be included in the results. Default setting is False.

  • Returns

MES Lot Quantity Summary List - A collection object containing information about each lot at the specified equipment (including lots in Supplemental Equipment, if includeSupplementalEquipment = True).

  • Scope

All

 system.mes.getLotInventoryByEquipment(equipmentPath, lotNumberFilter, lotStatusFilter)
Description

Get all lots currently available at the specified equipment.

Syntax

system.mes. getLotInventoryByEquipment(equipmentPath, lotNumberFilter, lotStatusFilter)

 

  • Parameters

String equipmentPath - Equipment path of the equipment to return the lot inventory information.

String lotNumberFilter - Custom lot number to filter results.

String lotStatusFilter - Custom lot status value to filter results.

  • Returns

MES Lot Quantity Summary List - A collection object containing information about each lot at the specified equipment.

  • Scope

All

 system.mes.getLotInventoryByEquipment(equipmentPath, lotNumberFilter, lotStatusFilter, includeSupplementalEquipment)
Description

Get all lots currently available at the specified equipment. Includes the option to include Supplemental Equipment as objects to load (default setting is False = not included).

Syntax

system.mes. getLotInventoryByEquipment(equipmentPath, lotNumberFilter, lotStatusFilter, includeSupplementalEquipment)

 

  • Parameters

String equipmentPath - Equipment path of the equipment to return the lot inventory information.

String lotNumberFilter - Custom lot number to filter results.

String lotStatusFilter - Custom lot status value to filter results.

Boolean includeSupplementalEquipment - If True, the lots in Supplemental Equipment will be included in the results. Default setting is False.

  • Returns

MES Lot Quantity Summary List A collection object containing information about each lot at the specified equipment (including lots in Supplemental Equipment, if includeSupplementalEquipment = True).

  • Scope

All