@groovy.util.logging.Slf4j @groovy.lang.Singleton @javax.transaction.Transactional class OrderAssyService extends java.lang.Object implements org.simplemes.mes.demand.service.OrderReleasePoint, org.simplemes.eframe.search.AdjustQueryInterface
This service provides business logic used for the Assembly module that provides additions to the core Order service.
This also provides the main entry point for maintaining the assembled components for an order/LSN. This includes adding and removing the component information.
Type | Name and description |
---|---|
private static java.lang.Integer |
MAX_ASSY_DATA_STRING_LENGTH The maximum length of the assembly data string total. |
Constructor and description |
---|
OrderAssyService
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static void |
addAssemblyDataValues(OrderComponentState orderComponentState, OrderAssembledComponent orderAssembledComponent) Adds the assy data type's field values to the assemblyDataAsString for display. |
|
OrderAssembledComponent |
addComponent(AddOrderAssembledComponentRequest request) Adds a single component to the order/LSN. |
|
java.lang.String |
adjustQueryAssemblyData(java.lang.String queryString, java.lang.Class domainClass, java.lang.String coreQuery) This will change the query string if it detects an attempt to search on dynamic assembly data field and adjusts the query with the right document path. |
|
static void |
determineStateValues(OrderComponentState orderComponentState) Sets the various state values and flags based on the quantities in the state POGO. |
|
java.util.List<OrderComponentState> |
findComponentAssemblyState(FindComponentAssemblyStateRequest request) Finds the state of all the components needed for the given order/LSN. |
|
java.lang.String |
formatForRemoval(OrderAssembledComponent orderAssembledComponent) Formats the given assembled component, suitable for a removal confirmation. |
|
java.lang.String |
postAdjustQuery(java.lang.String response, java.lang.String queryString, java.lang.Class domainClass) ExtensionPoint post method to adjust the query string to make the input more user friendly. |
|
org.simplemes.mes.demand.OrderReleaseResponse |
postRelease(org.simplemes.mes.demand.OrderReleaseResponse coreResponse, org.simplemes.mes.demand.OrderReleaseRequest orderReleaseRequest) After an order is released by the mes-core module, this addition method will copy any ProductComponent (BOM) records to the order. |
|
void |
preAdjustQuery(java.lang.String queryString, java.lang.Class domainClass) ExtensionPoint pre method to adjust the query string to make the input more user friendly. |
|
void |
preRelease(org.simplemes.mes.demand.OrderReleaseRequest orderReleaseRequest) Pre-release extension method for the order release process. |
|
OrderAssembledComponent |
removeComponent(RemoveOrderAssembledComponentRequest request) Marks a single component as removed. |
|
void |
resolveComponentForRequest(AddOrderAssembledComponentRequest request) Resolves the component for the given request. |
|
OrderAssembledComponent |
undoComponentRemove(ComponentRemoveUndoRequest request) Un-removes a single component. |
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 maximum length of the assembly data string total. (Default: 300). Each single assembly record can contribute 100 chars to this string.
Adds the assy data type's field values to the assemblyDataAsString for display. It will all the assy data up to 300 chars total, eliminating duplicates sets. This updates the orderComponentState in place.
orderComponentState
- Component state POGO to add the assy data field values to.orderAssembledComponent
- The assembled component to pull the assy data from.Adds a single component to the order/LSN. Will auto-assign a unique sequence.
This method is part of the Stable API.request
- The component details to add to the order/LSN.This will change the query string if it detects an attempt to search on dynamic assembly data field and adjusts the query with the right document path. If the query string starts with a flex type, then it will be adjusted to the right field name to find the data.
queryString
- The input query string from the user.domainClass
- The domain class for domain-specific searches. Null allowed.coreQuery
- The results from the framework core adjustQuery() method.Sets the various state values and flags based on the quantities in the state POGO. This updates the value in place.
orderComponentState
- The component state POGO to update.Finds the state of all the components needed for the given order/LSN. If LSN is given, then the logic will attempt to reconcile order-based components with this single LSN. This will cause problems when mixing order-based and LSN-based component assembly for a given component.
This method does no pagination or filtering, but it does sort by sequence. It does group by the BOM component record.
request
- The find request.Formats the given assembled component, suitable for a removal confirmation.
orderAssembledComponent
- The component.ExtensionPoint post method to adjust the query string to make the input more user friendly.
response
- The core response.queryString
- The input query string from the user. Null not allowed.domainClass
- The domain class for domain-specific searches. Null allowed.After an order is released by the mes-core module, this addition method will copy any ProductComponent (BOM) records to the order.
Note: Do not call this directly. Call the mes-core OrderService.release() method instead.
coreResponse
- The response from the core method (or from other extensions that provide a response).orderReleaseRequest
- The details of the release request (order and qty).ExtensionPoint pre method to adjust the query string to make the input more user friendly.
This implementation will change the query string if it detects an attempt to search on dynamic assembly data field and adjusts the query with the right document path. If the query string starts with a flex type, then it will be adjusted to the right field name to find the data.
queryString
- The input query string from the user. Null not allowed.domainClass
- The domain class for domain-specific searches. Null allowed.Pre-release extension method for the order release process.
Note: This method is part of the Stable API.
orderReleaseRequest
- The details of the release request (order and qty).Marks a single component as removed.
This method is part of the Stable API.request
- The component to remove. The Sequence is used to update the record.Resolves the component for the given request. Updates the request's component, bomSequence and qty, if possible.
Uses these values (in order of precedence):
bomSequence
component
request
- The request. Modified.Un-removes a single component. Used to undo a removal from the client.
This method is part of the Stable API.request
- The component to restore. The Sequence is used to update the record.Groovy Documentation