Class ProductionRunServices
java.lang.Object
org.apache.ofbiz.manufacturing.jobshopmgt.ProductionRunServices
Services for Production Run maintenance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddProductionRunComponent
(DispatchContext ctx, Map<String, ? extends Object> context) addProductionRunRoutingTask
(DispatchContext ctx, Map<String, ? extends Object> context) approveRequirement
(DispatchContext ctx, Map<String, ? extends Object> context) cancelProductionRun
(DispatchContext ctx, Map<String, ? extends Object> context) Cancels a ProductionRun.changeProductionRunStatus
(DispatchContext ctx, Map<String, ? extends Object> context) changeProductionRunTaskStatus
(DispatchContext ctx, Map<String, ? extends Object> context) checkDecomposeInventoryItem
(DispatchContext ctx, Map<String, ? extends Object> context) checkUpdatePrunRoutingTask
(DispatchContext ctx, Map<String, ? extends Object> context) Check if field for routingTask update are correct and if need recalculated data in Production Run.createProductionRun
(DispatchContext ctx, Map<String, ? extends Object> context) Creates a Production Run.createProductionRunForMktgPkg
(DispatchContext ctx, Map<String, ? extends Object> context) createProductionRunFromConfiguration
(DispatchContext ctx, Map<String, ? extends Object> context) createProductionRunFromRequirement
(DispatchContext ctx, Map<String, ? extends Object> context) createProductionRunsForOrder
(DispatchContext dctx, Map<String, ? extends Object> context) createProductionRunsForProductBom
(DispatchContext dctx, Map<String, ? extends Object> context) createProductionRunTaskCosts
(DispatchContext ctx, Map<String, ? extends Object> context) decomposeInventoryItem
(DispatchContext ctx, Map<String, ? extends Object> context) getProductionRunCost
(DispatchContext ctx, Map<String, ? extends Object> context) getProductionRunTotResQty
(DispatchContext ctx, Map<String, ? extends Object> context) Given a productId and an optional date, returns the total qty of productId reserved by production runs.getWorkEffortCosts
(DispatchContext ctx, Map<String, ? extends Object> context) productionRunDeclareAndProduce
(DispatchContext ctx, Map<String, ? extends Object> context) productionRunProduce
(DispatchContext ctx, Map<String, ? extends Object> context) productionRunTaskProduce
(DispatchContext ctx, Map<String, ? extends Object> context) productionRunTaskReturnMaterial
(DispatchContext ctx, Map<String, ? extends Object> context) quickChangeProductionRunStatus
(DispatchContext ctx, Map<String, ? extends Object> context) Quick moves a ProductionRun to the passed in status, performing all the needed tasks in the way.quickRunAllProductionRunTasks
(DispatchContext ctx, Map<String, ? extends Object> context) Quick runs all the tasks of a ProductionRun to the completed status, also issuing components if necessary.quickRunProductionRunTask
(DispatchContext ctx, Map<String, ? extends Object> context) Quick runs a ProductionRun task to the completed status, also issuing components if necessary.quickStartAllProductionRunTasks
(DispatchContext ctx, Map<String, ? extends Object> context) setEstimatedDeliveryDates
(DispatchContext ctx, Map<String, ? extends Object> context) updateProductionRun
(DispatchContext ctx, Map<String, ? extends Object> context) Update a Production Run.updateProductionRunComponent
(DispatchContext ctx, Map<String, ? extends Object> context) updateProductionRunTask
(DispatchContext ctx, Map<String, ? extends Object> context)
-
Constructor Details
-
ProductionRunServices
public ProductionRunServices()
-
-
Method Details
-
cancelProductionRun
public static Map<String,Object> cancelProductionRun(DispatchContext ctx, Map<String, ? extends Object> context) Cancels a ProductionRun.- Parameters:
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters.- Returns:
- Map with the result of the service, the output parameters.
-
createProductionRun
public static Map<String,Object> createProductionRun(DispatchContext ctx, Map<String, ? extends Object> context) Creates a Production Run.- check if routing - product link exist
- check if product have a Bill Of Material
- check if routing have routingTask
- create the workEffort for ProductionRun
- create the WorkEffortGoodStandard for link between ProductionRun and the product it will produce
- for each valid routingTask of the routing create a workeffort-task
- for the first routingTask, create for all the valid productIdTo with no associateRoutingTask a WorkEffortGoodStandard
- for each valid routingTask of the routing and valid productIdTo associate with this RoutingTask create a WorkEffortGoodStandard
- Parameters:
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters, productId, routingId, pRQuantity, startDate, workEffortName, description- Returns:
- Map with the result of the service, the output parameters.
-
updateProductionRun
public static Map<String,Object> updateProductionRun(DispatchContext ctx, Map<String, ? extends Object> context) Update a Production Run.- update field and after recalculate the entire ProductionRun data (routingTask and productComponent)
- create the WorkEffortGoodStandard for link between ProductionRun and the product it will produce
- for each valid routingTask of the routing create a workeffort-task
- for the first routingTask, create for all the valid productIdTo with no associateRoutingTask a WorkEffortGoodStandard
- for each valid routingTask of the routing and valid productIdTo associate with this RoutingTask create a WorkEffortGoodStandard
- Parameters:
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters, productId, routingId, quantity, estimatedStartDate, workEffortName, description- Returns:
- Map with the result of the service, the output parameters.
-
changeProductionRunStatus
-
changeProductionRunTaskStatus
-
getWorkEffortCosts
-
getProductionRunCost
-
createProductionRunTaskCosts
-
checkUpdatePrunRoutingTask
public static Map<String,Object> checkUpdatePrunRoutingTask(DispatchContext ctx, Map<String, ? extends Object> context) Check if field for routingTask update are correct and if need recalculated data in Production Run. Check- if estimatedStartDate is not before Production Run estimatedStartDate.
- if there is not a another routingTask with the same priority
- If priority or estimatedStartDate has changed recalculated data for routingTask after that one.
- Parameters:
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters, productId, routingId, priority, estimatedStartDate, estimatedSetupMillis, estimatedMilliSeconds- Returns:
- Map with the result of the service, the output parameters, estimatedCompletionDate.
-
addProductionRunComponent
-
updateProductionRunComponent
-
addProductionRunRoutingTask
-
productionRunProduce
-
productionRunDeclareAndProduce
-
productionRunTaskProduce
-
productionRunTaskReturnMaterial
-
updateProductionRunTask
-
approveRequirement
-
createProductionRunFromRequirement
-
createProductionRunFromConfiguration
-
createProductionRunForMktgPkg
-
createProductionRunsForOrder
-
createProductionRunsForProductBom
-
quickRunProductionRunTask
public static Map<String,Object> quickRunProductionRunTask(DispatchContext ctx, Map<String, ? extends Object> context) Quick runs a ProductionRun task to the completed status, also issuing components if necessary.- Parameters:
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters.- Returns:
- Map with the result of the service, the output parameters.
-
quickRunAllProductionRunTasks
public static Map<String,Object> quickRunAllProductionRunTasks(DispatchContext ctx, Map<String, ? extends Object> context) Quick runs all the tasks of a ProductionRun to the completed status, also issuing components if necessary.- Parameters:
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters.- Returns:
- Map with the result of the service, the output parameters.
-
quickStartAllProductionRunTasks
-
quickChangeProductionRunStatus
public static Map<String,Object> quickChangeProductionRunStatus(DispatchContext ctx, Map<String, ? extends Object> context) Quick moves a ProductionRun to the passed in status, performing all the needed tasks in the way.- Parameters:
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters.- Returns:
- Map with the result of the service, the output parameters.
-
getProductionRunTotResQty
public static Map<String,Object> getProductionRunTotResQty(DispatchContext ctx, Map<String, ? extends Object> context) Given a productId and an optional date, returns the total qty of productId reserved by production runs.- Parameters:
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters.- Returns:
- Map with the result of the service, the output parameters.
-
checkDecomposeInventoryItem
-
decomposeInventoryItem
-
setEstimatedDeliveryDates
-