Class BTAlignFsmPPMMaterials
java.lang.Object
overit.geocall.bl.BusinessTask<AlignFsmPPMMaterialsEvent>
overit.geocallapp.wfm.ai.bl.predictivepartsmanagement.task.BTAlignFsmPPMMaterials
- All Implemented Interfaces:
Serializable,Tool
@Event(AlignFsmPPMMaterialsEvent.class)
public class BTAlignFsmPPMMaterials
extends BusinessTask<AlignFsmPPMMaterialsEvent>
This task listen to the event
AlignFsmPPMMaterialsEvent defined in
module core.
When is called it will align the table DAOWorkOrderOperationMaterial
with the AI Predictions, updating only AI fields.- Since:
- 11.0
- See Also:
- GCApi:
- task
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DAOPPartsManagementSearchprotected DAOWorkOrderOperationMaterialprotected static final LogChannelstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody(AlignFsmPPMMaterialsEvent event, PoolKit pk) Implements this method to write the specific task logic to handle the input parameter.protected voidcreateInput(DBView currentOperations, DBView rules) This method creates the input needed for save event for RWOOMATERIAL.evaluateRule(HashGetter operation, HashGetter rule) This method evaluate the rule and returns a map with the info to be saved into RWOOMATERIALprotected HashGetterget1MatchingRule(DBView rules, HashGetter filters) protected HashGetterget2MatchingRule(DBView rules, HashGetter filters) protected HashGetterget3MatchingRule(DBView rules, HashGetter filters) protected HashGettergetAllMatchingRule(DBView rules, HashGetter filters) protected HashGettergetMatchingRule(HashGetter operation, DBView rules) This method get the matching rule given a set of rules for algorithm Predictive Parts Management.protected DBViewgetOperationsToElaborate(Set<Long> operationsIds, PoolKit pk) protected DBViewprotected voidinitDAO()Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
LOG
-
UPPER
- See Also:
-
PREDTYPE
- See Also:
-
LOW
- See Also:
-
daoPPMPredictions
-
daoWorkOrderOperationMaterials
-
-
Constructor Details
-
BTAlignFsmPPMMaterials
public BTAlignFsmPPMMaterials()
-
-
Method Details
-
getListInputs
-
body
protected void body(AlignFsmPPMMaterialsEvent event, PoolKit pk) throws DAException, DAValidateException Description copied from class:BusinessTaskImplements this method to write the specific task logic to handle the input parameter.- Specified by:
bodyin classBusinessTask<AlignFsmPPMMaterialsEvent>- Parameters:
event- the object upon which the task will works onpk- the poolkit containing the reference to the database connection that can be used- Throws:
DAException- in case of database errorDAValidateException- in case of database validation error
-
initDAO
protected void initDAO() -
getRules
- Throws:
DAExceptionDAValidateException
-
getOperationsToElaborate
protected DBView getOperationsToElaborate(Set<Long> operationsIds, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
createInput
This method creates the input needed for save event for RWOOMATERIAL.- Parameters:
currentOperations- is the set of operations evaluated.rules- is the set of prediction validation rules
-
evaluateRule
This method evaluate the rule and returns a map with the info to be saved into RWOOMATERIAL- Parameters:
operation-rule-- Returns:
-
getMatchingRule
This method get the matching rule given a set of rules for algorithm Predictive Parts Management. It will get the most restrictive rule. Restriction levels: [Operation Center, Material Class, Material Type, Unit of Measure]- Parameters:
operation-rules-- Returns:
- the matching rule
-
getAllMatchingRule
-
get3MatchingRule
-
get2MatchingRule
-
get1MatchingRule
-