Class BTAlignWOOperationDuration
java.lang.Object
overit.geocall.bl.BusinessTask<Void>
overit.geocallapp.wfm.ai.bl.duration.prediction.task.BTAlignWOOperationDuration
- All Implemented Interfaces:
Serializable,Tool
- Since:
- 9.2
- See Also:
- GCApi:
- task
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DAOWOTimePredictionprotected overit.geocallapp.wfm.workorder.DAOWorkOrdersOperationsprotected static final LogChannel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidImplements this method to write the specific task logic to handle the input parameter.protected voidevaluateResourcesPredictions(LongSet timePredictionList, PoolKit pk) protected voidevaluateRulesOnOperations(DBView currentOperations, DBView rules, PoolKit pk) protected HashGettergetMatchingRule(HashGetter operation, DBView rules, boolean searchForAbsolute) protected DBViewprotected DBViewprotected voidinitDAO()booleanisValidRule(HashGetter validRule, HashGetter operation, boolean searchForAbsolute) voidsetFixedOperations(Set<Long> fixedOperations) protected voidupdateOperationTable(LongSet operationId, Long duration, Long originalDuration, Double reliability, boolean isRulePassed, PooledConnection conn) protected voidupdatePredictionTable(HashGetter operation, Long status, boolean isApplied, PoolKit pk) protected voidupdateWOHeaderTable(Long woId, Long duration, PooledConnection conn) Methods inherited from class overit.geocall.bl.BusinessTask
start, start, startAlone, startInBackground
-
Field Details
-
daoWoOperations
protected overit.geocallapp.wfm.workorder.DAOWorkOrdersOperations daoWoOperations -
daoTimePrediction
-
fixedOperations
-
LOG
-
-
Constructor Details
-
BTAlignWOOperationDuration
public BTAlignWOOperationDuration()
-
-
Method Details
-
getFixedOperations
-
setFixedOperations
-
body
Description copied from class:BusinessTaskImplements this method to write the specific task logic to handle the input parameter.- Specified by:
bodyin classBusinessTask<Void>- 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() -
getOperationsToElaborate
- Throws:
DAExceptionDAValidateException
-
getRules
- Throws:
DAExceptionDAValidateException
-
evaluateRulesOnOperations
protected void evaluateRulesOnOperations(DBView currentOperations, DBView rules, PoolKit pk) throws DAException, DAValidateException - Parameters:
currentOperations- is the set of operations evaluated. If cardinality > 1, is a order to order managementrules- is the set of prediction validation rulespk-- Throws:
DAExceptionDAValidateException
-
getMatchingRule
protected HashGetter getMatchingRule(HashGetter operation, DBView rules, boolean searchForAbsolute) throws DAException, DAValidateException - Parameters:
operation- is the map with prediction data and wo detailsrules- is the dbviewsearchForAbsolute- with all the available rules- Returns:
- Throws:
DAExceptionDAValidateException
-
isValidRule
-
updatePredictionTable
protected void updatePredictionTable(HashGetter operation, Long status, boolean isApplied, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
updateOperationTable
protected void updateOperationTable(LongSet operationId, Long duration, Long originalDuration, Double reliability, boolean isRulePassed, PooledConnection conn) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
updateWOHeaderTable
protected void updateWOHeaderTable(Long woId, Long duration, PooledConnection conn) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-
evaluateResourcesPredictions
protected void evaluateResourcesPredictions(LongSet timePredictionList, PoolKit pk) throws DAException, DAValidateException - Throws:
DAExceptionDAValidateException
-