@io.micronaut.data.annotation.MappedEntity(value: ordr) @org.simplemes.eframe.domain.annotation.DomainEntity @java.lang.SuppressWarnings(value: unused) @com.fasterxml.jackson.annotation.JsonFilter(value: searchableFilter) @groovy.transform.ToString(includeNames: true, includePackage: false, excludes: [dateCreated, dateUpdated]) @groovy.transform.EqualsAndHashCode(includes: [order]) class Order extends java.lang.Object implements DemandObject, RoutingTrait, WorkStateTrait, WorkableInterface
This is a manufacturing order that is used to produce a product on the shop floor. This is the primary object that a production operator interacts with on the shop floor.
Note: This object is stored in the table 'ORDR'Type | Name and description |
---|---|
private java.util.Date |
dateCompleted The date this order was completed or marked as done. |
private java.util.Date |
dateCreated |
private java.util.Date |
dateFirstQueued The date/time any quantity was first queued at this point (operation or top-level). |
private java.util.Date |
dateFirstStarted The date/time any quantity was first started at this point (operation or top-level). |
private java.util.Date |
dateQtyQueued The date/time any quantity was queued at this point (operation or top-level). |
private java.util.Date |
dateQtyStarted The date/time any quantity was started at this point (operation or top-level). |
private java.util.Date |
dateReleased The date this order was released. |
private java.util.Date |
dateUpdated |
private static java.lang.Object |
fieldOrder |
private java.lang.String |
fields The custom field holder. |
private org.simplemes.mes.demand.LSNTrackingOption |
lsnTrackingOption Copied from Product on creation to determine what type of tracking is needed. |
private java.util.List<LSN> |
lsns The Order can have child lot/serial numbers (LSNs) that can be processed for many actions. |
private java.util.List<OrderOperState> |
operationStates This is the list operation states that corresponds to the current operations. |
private java.util.List<OperationTrait> |
operations This is the list of operations this order should be processed at. |
private java.lang.String |
order The order's name as it is known to the users. |
private OrderStatus |
overallStatus The Order's overall status. |
private Product |
product The product to be produced by this order. |
private BigDecimal |
qtyDone The number of pieces to completed (done) on this object. |
private BigDecimal |
qtyInQueue The number of pieces waiting to be worked (in queue) for this object. |
private BigDecimal |
qtyInWork The number of pieces actively in work for this object. |
private BigDecimal |
qtyReleased The number of released to production. |
private BigDecimal |
qtyToBuild The number of pieces to produce for this order. |
private static java.lang.Object |
searchable This domain is a top-level searchable element. |
private java.util.UUID |
uuid |
private java.lang.Integer |
version |
Constructor and description |
---|
Order
() |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.Object |
beforeValidate() Called before validate happens. |
|
void |
checkForOrderDone(CompleteRequest request) Checks to determine if the order is done and sets the right flags/statuses as needed. |
|
WorkableInterface |
determineNextWorkable(OrderOperState currentOperState) Determines the next workable to be performed after the given operation is done. |
|
WorkableInterface |
determineNextWorkable() Determines the next workable to be performed after this workable is completed. |
|
java.util.List<java.lang.Object> |
findRelatedRecords() Finds objects the related for archiving. |
|
void |
markAsDone() Mark the current order as Done (fully completed). |
|
void |
populateLSNs() Populate the LSN with a system generated sequence. |
|
LSN[] |
resolveSpecificLSNs(BigDecimal qtyNeeded) Find the first N LSNs with a QTY in queue |
|
void |
saveChanges() Saves any changes to this record. |
|
java.util.List<ValidationError> |
validate() Validates the record before save. |
|
java.util.List<ValidationError> |
validateLSNs() Validates that the LSNs are legal for the given Order. |
|
java.util.List<ValidationError> |
validateQtyReleased() Validates that the qtyReleased is legal for the given Order. |
|
java.util.List<ValidationError> |
validateQtyToBuild() Validates that the qtyToBuild is legal for the given Order. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The date this order was completed or marked as done.
The date/time any quantity was first queued at this point (operation or top-level).
WorkStateTrait field.The date/time any quantity was first started at this point (operation or top-level).
WorkStateTrait field.The date/time any quantity was queued at this point (operation or top-level). Can be null if the nothing is in queue.
WorkStateTrait field.The date/time any quantity was started at this point (operation or top-level). Can be null if the nothing is in work.
WorkStateTrait field.The date this order was released.
The custom field holder. Unlimited size.
Copied from Product on creation to determine what type of tracking is needed. If product is not given, then defaults to Order only.
The Order can have child lot/serial numbers (LSNs) that can be processed for many actions. Order is not guaranteed. (Optional)
This is the list operation states that corresponds to the current operations. This holds the quantities in queue, in work, etc for a given operation.
This is the list of operations this order should be processed at.
The order's name as it is known to the users. Upon creation, if an order is not provided, then one is generated from the Sequence. Primary Key Field.
Maximum length is defined by FieldSizes#MAX_CODE_LENGTH#MAX_CODE_LENGTH. This value is stored in the column 'ORDR'The Order's overall status. This is one of the pre-defined OrderStatus codes.
The product to be produced by this order. (Optional)
The number of pieces to completed (done) on this object.
WorkStateTrait field.The number of pieces waiting to be worked (in queue) for this object.
WorkStateTrait field.The number of pieces actively in work for this object.
WorkStateTrait field.The number of released to production. This is released manually in the GUI or by using the OrderService.
Non-CRUD Field.The number of pieces to produce for this order.
Default value=1.0 Must be greater than 0.0.This domain is a top-level searchable element.
Called before validate happens. Used to set the order if needed.
Checks to determine if the order is done and sets the right flags/statuses as needed. This is called when any workable on the order is completed.
request
- The Complete request that triggered this possible order done processing.Determines the next workable to be performed after the given operation is done.
currentOperState
- The current operation to find the next operation for.Determines the next workable to be performed after this workable is completed.
Finds objects the related for archiving.
Mark the current order as Done (fully completed).
Populate the LSN with a system generated sequence. Uses the product's sequence and lotSize when possible. A default lot size of 1.0 is used of product is not available.
Does nothing if no unreleased quantity is available.Find the first N LSNs with a QTY in queue
qtyNeeded
- The qty needed to be satisfied by the LSN(s).Saves any changes to this record.
Validates the record before save.
Validates that the LSNs are legal for the given Order.
Validates that the qtyReleased is legal for the given Order.
Validates that the qtyToBuild is legal for the given Order.
Groovy Documentation