public class MrpServices extends Object
Modifier and Type | Field and Description |
---|---|
static String |
module |
static String |
resource |
Constructor and Description |
---|
MrpServices() |
Modifier and Type | Method and Description |
---|---|
static Map<String,Object> |
executeMrp(DispatchContext ctx,
Map<String,? extends Object> context)
Launch the MRP.
|
static BigDecimal |
findProductMrpQoh(String mrpId,
GenericValue product,
String facilityId,
LocalDispatcher dispatcher,
Delegator delegator)
Find the quantity on hand of products for MRP.
|
static BigDecimal |
findProductMrpQoh(String mrpId,
String productId,
String facilityId,
LocalDispatcher dispatcher,
Delegator delegator) |
static Map<String,Object> |
initMrpEvents(DispatchContext ctx,
Map<String,? extends Object> context) |
static void |
logMrpError(String mrpId,
String productId,
String errorMessage,
Delegator delegator) |
static void |
logMrpError(String mrpId,
String productId,
Timestamp eventDate,
String errorMessage,
Delegator delegator) |
static void |
processBomComponent(String mrpId,
GenericValue product,
BigDecimal eventQuantity,
Timestamp startDate,
Map<String,Object> routingTaskStartDate,
List<BOMNode> listComponent)
Process the bill of material (bom) of the product to insert components in the MrpEvent table.
|
public static final String module
public static final String resource
public static Map<String,Object> initMrpEvents(DispatchContext ctx, Map<String,? extends Object> context)
public static BigDecimal findProductMrpQoh(String mrpId, GenericValue product, String facilityId, LocalDispatcher dispatcher, Delegator delegator)
product
- the product for which the Quantity Available is requiredpublic static BigDecimal findProductMrpQoh(String mrpId, String productId, String facilityId, LocalDispatcher dispatcher, Delegator delegator)
public static void logMrpError(String mrpId, String productId, String errorMessage, Delegator delegator)
public static void logMrpError(String mrpId, String productId, Timestamp eventDate, String errorMessage, Delegator delegator)
public static void processBomComponent(String mrpId, GenericValue product, BigDecimal eventQuantity, Timestamp startDate, Map<String,Object> routingTaskStartDate, List<BOMNode> listComponent)
mrpId
- the mrp idproduct
- GenericValue oject of the producteventQuantity
- the product quantity neededstartDate
- the startDate of the productionRun which will used to produce the productroutingTaskStartDate
- Map with all the routingTask as keys and startDate of each of themlistComponent
- a List with all the componentspublic static Map<String,Object> executeMrp(DispatchContext ctx, Map<String,? extends Object> context)
ctx
- The DispatchContext that this service is operating in.context
- Map containing the input parameters, productId routingId, quantity, startDate.